Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
This module contains a wrappers and utility functions for accessing GHC module information. It should NEVER depend on ANY module inside the Language.Haskell.Liquid.* tree.
Synopsis
- isAnonBinder :: TyConBinder -> Bool
- mkAlive :: Var -> Id
- tickSrcSpan :: CoreTickish -> SrcSpan
- stringTyVar :: String -> TyVar
- stringVar :: String -> Type -> Var
- maybeAuxVar :: Symbol -> Maybe Var
- stringTyCon :: Char -> Int -> String -> TyCon
- stringTyConWithKind :: Kind -> Char -> Int -> String -> TyCon
- hasBaseTypeVar :: Var -> Bool
- isBaseType :: Type -> Bool
- isTmpVar :: Var -> Bool
- isTmpSymbol :: Symbol -> Bool
- validTyVar :: String -> Bool
- tvId :: TyVar -> String
- tidyCBs :: [CoreBind] -> [CoreBind]
- unTick :: CoreBind -> CoreBind
- unTickExpr :: CoreExpr -> CoreExpr
- isFractionalClass :: Class -> Bool
- isOrdClass :: Class -> Bool
- notracePpr :: Outputable a => String -> a -> a
- tracePpr :: Outputable a => String -> a -> a
- pprShow :: Show a => a -> SDoc
- toFixSDoc :: Fixpoint a => a -> Doc
- sDocDoc :: SDoc -> Doc
- pprDoc :: Outputable a => a -> Doc
- showPpr :: Outputable a => a -> String
- showSDoc :: SDoc -> String
- myQualify :: PrintUnqualified
- showSDocDump :: SDoc -> String
- typeUniqueString :: Outputable a => a -> String
- newtype Loc = L (Int, Int)
- fSrcSpan :: Loc a => a -> SrcSpan
- fSourcePos :: Loc a => a -> SourcePos
- fSrcSpanSrcSpan :: SrcSpan -> SrcSpan
- srcSpanFSrcSpan :: SrcSpan -> SrcSpan
- sourcePos2SrcSpan :: SourcePos -> SourcePos -> SrcSpan
- sourcePosSrcSpan :: SourcePos -> SrcSpan
- sourcePosSrcLoc :: SourcePos -> SrcLoc
- srcSpanSourcePos :: SrcSpan -> SourcePos
- srcSpanSourcePosE :: SrcSpan -> SourcePos
- srcSpanFilename :: SrcSpan -> String
- srcSpanStartLoc :: RealSrcSpan -> Loc
- srcSpanEndLoc :: RealSrcSpan -> Loc
- oneLine :: RealSrcSpan -> Bool
- lineCol :: RealSrcSpan -> (Int, Int)
- realSrcSpanSourcePos :: RealSrcSpan -> SourcePos
- realSrcLocSourcePos :: RealSrcLoc -> SourcePos
- realSrcSpanSourcePosE :: RealSrcSpan -> SourcePos
- getSourcePos :: NamedThing a => a -> SourcePos
- getSourcePosE :: NamedThing a => a -> SourcePos
- locNamedThing :: NamedThing a => a -> Located a
- namedLocSymbol :: (Symbolic a, NamedThing a) => a -> Located Symbol
- varLocInfo :: (Type -> a) -> Var -> Located a
- namedPanic :: NamedThing a => a -> String -> b
- collectArguments :: Int -> CoreExpr -> [Var]
- collectValBinders' :: Expr Var -> ([Var], Expr Var)
- ignoreLetBinds :: Expr t -> Expr t
- isExternalId :: Id -> Bool
- isTupleId :: Id -> Bool
- idDataConM :: Id -> Maybe DataCon
- isDataConId :: Id -> Bool
- getDataConVarUnique :: Var -> Unique
- isDictionaryExpression :: Expr Id -> Maybe Id
- realTcArity :: TyCon -> Arity
- kindTCArity :: TyCon -> Arity
- kindArity :: Kind -> Arity
- uniqueHash :: Uniquable a => Int -> a -> Int
- lookupRdrName :: HscEnv -> ModuleName -> RdrName -> IO (Maybe Name)
- ignoreInline :: ParsedModule -> ParsedModule
- symbolTyConWithKind :: Kind -> Char -> Int -> Symbol -> TyCon
- symbolTyCon :: Char -> Int -> Symbol -> TyCon
- symbolTyVar :: Symbol -> TyVar
- localVarSymbol :: Var -> Symbol
- exportedVarSymbol :: Var -> Symbol
- qualifiedNameSymbol :: Name -> Symbol
- fastStringText :: FastString -> Text
- tyConTyVarsDef :: TyCon -> [TyVar]
- noTyVars :: TyCon -> Bool
- takeModuleUnique :: Symbol -> Symbol
- splitModuleUnique :: Symbol -> (Symbol, Int)
- base62ToI :: Symbol -> Int
- splitModuleName :: Symbol -> (Symbol, Symbol)
- dropModuleNamesAndUnique :: Symbol -> Symbol
- dropModuleNames :: Symbol -> Symbol
- dropModuleNamesCorrect :: Symbol -> Symbol
- takeModuleNames :: Symbol -> Symbol
- dropModuleUnique :: Symbol -> Symbol
- cmpSymbol :: Symbol -> Symbol -> Bool
- sepModNames :: Text
- sepUnique :: Text
- mungeNames :: (String -> [Text] -> Symbol) -> Text -> String -> Symbol -> Symbol
- qualifySymbol :: Symbol -> Symbol -> Symbol
- isQualifiedSym :: Symbol -> Bool
- isQualified :: Text -> Bool
- wrapParens :: (IsString a, Monoid a) => a -> a
- isParened :: Text -> Bool
- isDictionary :: Symbolic a => a -> Bool
- isMethod :: Symbolic a => a -> Bool
- isInternal :: Symbolic a => a -> Bool
- isWorker :: Symbolic a => a -> Bool
- isSCSel :: Symbolic a => a -> Bool
- stripParens :: Text -> Text
- stripParensSym :: Symbol -> Symbol
- desugarModule :: TypecheckedModule -> Ghc DesugaredModule
- gHC_VERSION :: String
- symbolFastString :: Symbol -> FastString
- synTyConRhs_maybe :: TyCon -> Maybe Type
- tcRnLookupRdrName :: HscEnv -> LocatedN RdrName -> IO (Messages DecoratedSDoc, Maybe [Name])
- showCBs :: Bool -> [CoreBind] -> String
- ignoreCoreBinds :: HashSet Var -> [CoreBind] -> [CoreBind]
- findVarDef :: Symbol -> [CoreBind] -> Maybe (Var, CoreExpr)
- findVarDefMethod :: Symbol -> [CoreBind] -> Maybe (Var, CoreExpr)
- dictionarySymbols :: CoreBind -> [Symbol]
- methodSymbols :: CoreBind -> [Symbol]
- coreBindSymbols :: CoreBind -> [Symbol]
- simplesymbol :: NamedThing t => t -> Symbol
- binders :: Bind a -> [a]
- expandVarType :: Var -> Type
- isEmbeddedDictExpr :: CoreExpr -> Bool
- isEmbeddedDictVar :: Var -> Bool
- isEmbeddedDictType :: Type -> Bool
- isPrelEqPred :: Type -> Bool
- isPrelEqTyCon :: TyCon -> Bool
- isOrdPred :: Type -> Bool
- isNumericPred :: Type -> Bool
- isPredExpr :: CoreExpr -> Bool
- isPredVar :: Var -> Bool
- isPredType :: Type -> Bool
- anyF :: [a -> Bool] -> a -> Bool
- defaultDataCons :: Type -> [AltCon] -> Maybe [(DataCon, [TyVar], [Type])]
- isEvVar :: Id -> Bool
- elabRnExpr :: LHsExpr GhcPs -> TcRn CoreExpr
- newtype HashableType = HashableType {}
- canonSelectorChains :: PredType -> Map HashableType [Id]
- buildCoherenceOblig :: Class -> [[([Id], [Id])]]
- coherenceObligToRef :: Symbolic s => s -> [Id] -> [Id] -> Reft
- coherenceObligToRefE :: Expr -> [Id] -> [Id] -> Reft
- data TcWiredIn = TcWiredIn {}
- withWiredIn :: TcM a -> TcM a
- prependGHCRealQual :: FastString -> RdrName
- isFromGHCReal :: NamedThing a => a -> Bool
Documentation
isAnonBinder :: TyConBinder -> Bool Source #
tickSrcSpan :: CoreTickish -> SrcSpan Source #
Encoding and Decoding Location --------------------------------------------
stringTyVar :: String -> TyVar Source #
Generic Helpers for Accessing GHC Innards ---------------------------------
hasBaseTypeVar :: Var -> Bool Source #
isBaseType :: Type -> Bool Source #
isTmpSymbol :: Symbol -> Bool Source #
validTyVar :: String -> Bool Source #
unTickExpr :: CoreExpr -> CoreExpr Source #
isFractionalClass :: Class -> Bool Source #
isOrdClass :: Class -> Bool Source #
notracePpr :: Outputable a => String -> a -> a Source #
Pretty Printers -----------------------------------------------------------
tracePpr :: Outputable a => String -> a -> a Source #
pprDoc :: Outputable a => a -> Doc Source #
showPpr :: Outputable a => a -> String Source #
showSDocDump :: SDoc -> String Source #
typeUniqueString :: Outputable a => a -> String Source #
Manipulating Source Spans -------------------------------------------------
fSourcePos :: Loc a => a -> SourcePos Source #
fSrcSpanSrcSpan :: SrcSpan -> SrcSpan Source #
srcSpanFSrcSpan :: SrcSpan -> SrcSpan Source #
sourcePosSrcSpan :: SourcePos -> SrcSpan Source #
sourcePosSrcLoc :: SourcePos -> SrcLoc Source #
srcSpanSourcePos :: SrcSpan -> SourcePos Source #
srcSpanSourcePosE :: SrcSpan -> SourcePos Source #
srcSpanFilename :: SrcSpan -> String Source #
srcSpanStartLoc :: RealSrcSpan -> Loc Source #
srcSpanEndLoc :: RealSrcSpan -> Loc Source #
oneLine :: RealSrcSpan -> Bool Source #
getSourcePos :: NamedThing a => a -> SourcePos Source #
getSourcePosE :: NamedThing a => a -> SourcePos Source #
locNamedThing :: NamedThing a => a -> Located a Source #
namedLocSymbol :: (Symbolic a, NamedThing a) => a -> Located Symbol Source #
namedPanic :: NamedThing a => a -> String -> b Source #
collectArguments :: Int -> CoreExpr -> [Var] Source #
Manipulating CoreExpr -----------------------------------------------------
ignoreLetBinds :: Expr t -> Expr t Source #
isExternalId :: Id -> Bool Source #
Predicates on CoreExpr and DataCons ---------------------------------------
isDataConId :: Id -> Bool Source #
getDataConVarUnique :: Var -> Unique Source #
realTcArity :: TyCon -> Arity Source #
kindTCArity :: TyCon -> Arity Source #
lookupRdrName :: HscEnv -> ModuleName -> RdrName -> IO (Maybe Name) Source #
symbolTyConWithKind :: Kind -> Char -> Int -> Symbol -> TyCon Source #
Symbol Conversions --------------------------------------------------------
symbolTyVar :: Symbol -> TyVar Source #
localVarSymbol :: Var -> Symbol Source #
exportedVarSymbol :: Var -> Symbol Source #
qualifiedNameSymbol :: Name -> Symbol Source #
fastStringText :: FastString -> Text Source #
tyConTyVarsDef :: TyCon -> [TyVar] Source #
takeModuleUnique :: Symbol -> Symbol Source #
Manipulating Symbols ------------------------------------------------------
dropModuleNames :: Symbol -> Symbol Source #
takeModuleNames :: Symbol -> Symbol Source #
dropModuleUnique :: Symbol -> Symbol Source #
sepModNames :: Text Source #
isQualifiedSym :: Symbol -> Bool Source #
isQualified :: Text -> Bool Source #
wrapParens :: (IsString a, Monoid a) => a -> a Source #
isDictionary :: Symbolic a => a -> Bool Source #
isInternal :: Symbolic a => a -> Bool Source #
stripParens :: Text -> Text Source #
stripParensSym :: Symbol -> Symbol Source #
gHC_VERSION :: String Source #
GHC Compatibility Layer ---------------------------------------------------
symbolFastString :: Symbol -> FastString Source #
tcRnLookupRdrName :: HscEnv -> LocatedN RdrName -> IO (Messages DecoratedSDoc, Maybe [Name]) Source #
dictionarySymbols :: CoreBind -> [Symbol] Source #
methodSymbols :: CoreBind -> [Symbol] Source #
coreBindSymbols :: CoreBind -> [Symbol] Source #
simplesymbol :: NamedThing t => t -> Symbol Source #
expandVarType :: Var -> Type Source #
isEmbeddedDictExpr :: CoreExpr -> Bool Source #
The following functions test if a CoreExpr
or CoreVar
can be
embedded in logic. With type-class support, we can no longer erase
such expressions arbitrarily.
isEmbeddedDictVar :: Var -> Bool Source #
isEmbeddedDictType :: Type -> Bool Source #
isPrelEqPred :: Type -> Bool Source #
isPrelEqTyCon :: TyCon -> Bool Source #
isNumericPred :: Type -> Bool Source #
isPredExpr :: CoreExpr -> Bool Source #
isPredType :: Type -> Bool Source #
defaultDataCons :: Type -> [AltCon] -> Maybe [(DataCon, [TyVar], [Type])] Source #
'defaultDataCons t ds' returns the list of '(dc, types)' pairs,
corresponding to the _missing_ cases, i.e. _other_ than those in ds
,
that are being handled by DEFAULT.
newtype HashableType Source #
Instances
Outputable HashableType Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc ppr :: HashableType -> SDoc # | |
Eq HashableType Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc (==) :: HashableType -> HashableType -> Bool # (/=) :: HashableType -> HashableType -> Bool # | |
Ord HashableType Source # | |
Defined in Language.Haskell.Liquid.GHC.Misc compare :: HashableType -> HashableType -> Ordering # (<) :: HashableType -> HashableType -> Bool # (<=) :: HashableType -> HashableType -> Bool # (>) :: HashableType -> HashableType -> Bool # (>=) :: HashableType -> HashableType -> Bool # max :: HashableType -> HashableType -> HashableType # min :: HashableType -> HashableType -> HashableType # |
canonSelectorChains :: PredType -> Map HashableType [Id] Source #
Superclass coherence
withWiredIn :: TcM a -> TcM a Source #
Run a computation in GHC's typechecking monad with wired in values locally bound in the typechecking environment.
isFromGHCReal :: NamedThing a => a -> Bool Source #
Orphan instances
Show Class Source # | |
Show TyCon Source # | |
Show Name Source # | |
Show Var Source # | |
NFData Class Source # | |
NFData Type Source # | |
NFData TyCon Source # | |
NFData Var Source # | |
Hashable Class Source # | |
Hashable DataCon Source # | |
Hashable TyCon Source # | |
Hashable SrcSpan Source # | |
Hashable Var Source # | |
Symbolic Class Source # | |
Symbolic TyCon Source # | Symbol Instances |
Symbolic FastString Source # | |
symbol :: FastString -> Symbol # | |
Symbolic Name Source # | |
Symbolic Var Source # |
|
Fixpoint Type Source # | |
Fixpoint Name Source # | |
Fixpoint Var Source # | |
Loc Var Source # | |
Outputable a => Outputable (HashSet a) Source # | |