liquidhaskell-0.8.10.1: Liquid Types for Haskell
Safe HaskellNone
LanguageHaskell98

Language.Haskell.Liquid.GHC.API

Description

This module re-exports a bunch of the GHC API.

Synopsis

Documentation

parser #

Arguments

:: String

Haskell module source text (full Unicode is supported)

-> DynFlags

the flags

-> FilePath

the filename (for source locations)

-> (WarningMessages, Either ErrorMessages (Located (HsModule GhcPs))) 

A pure interface to the module parser.

lookupName :: GhcMonad m => Name -> m (Maybe TyThing) #

Returns the TyThing for a Name. The Name may refer to any entity known to GHC, including Names defined using runStmt.

obtainTermFromVal :: GhcMonad m => Int -> Bool -> Type -> a -> m Term #

getGHCiMonad :: GhcMonad m => m Name #

Get the monad GHCi lifts user statements into.

setGHCiMonad :: GhcMonad m => String -> m () #

Set the monad GHCi lifts user statements into.

Checks that a type (in string form) is an instance of the GHC.GHCi.GHCiSandboxIO type class. Sets it to be the GHCi monad if it is, throws an error otherwise.

moduleTrustReqs :: GhcMonad m => Module -> m (Bool, Set InstalledUnitId) #

Return if a module is trusted and the pkgs it depends on to be trusted.

isModuleTrusted :: GhcMonad m => Module -> m Bool #

Check that a module is safe to import (according to Safe Haskell).

We return True to indicate the import is safe and False otherwise although in the False case an error may be thrown first.

lookupModule :: GhcMonad m => ModuleName -> Maybe FastString -> m Module #

Like findModule, but differs slightly when the module refers to a source file, and the file has not been loaded via load. In this case, findModule will throw an error (module not loaded), but lookupModule will check to see whether the module can also be found in a package, and if so, that package Module will be returned. If not, the usual module-not-found error will be thrown.

findModule :: GhcMonad m => ModuleName -> Maybe FastString -> m Module #

Takes a ModuleName and possibly a UnitId, and consults the filesystem and package database to find the corresponding Module, using the algorithm that is used for an import declaration.

showRichTokenStream :: [(Located Token, String)] -> String #

Take a rich token stream such as produced from getRichTokenStream and return source code almost identical to the original code (except for insignificant whitespace.)

addSourceToTokens :: RealSrcLoc -> StringBuffer -> [Located Token] -> [(Located Token, String)] #

Given a source location and a StringBuffer corresponding to this location, return a rich token stream with the source associated to the tokens.

getRichTokenStream :: GhcMonad m => Module -> m [(Located Token, String)] #

Give even more information on the source than getTokenStream This function allows reconstructing the source completely with showRichTokenStream.

getTokenStream :: GhcMonad m => Module -> m [Located Token] #

Return module source as token stream, including comments.

The module must be in the module graph and its source must be available. Throws a SourceError on parse error.

pprParenSymName :: NamedThing a => a -> SDoc #

print a NamedThing, adding parentheses if the name is an operator.

getNameToInstancesIndex #

Arguments

:: GhcMonad m 
=> [Module]

visible modules. An orphan instance will be returned if it is visible from at least one module in the list.

-> Maybe [Module]

modules to load. If this is not specified, we load modules for everything that is in scope unqualified.

-> m (Messages, Maybe (NameEnv ([ClsInst], [FamInst]))) 

Retrieve all type and family instances in the environment, indexed by Name. Each name's lists will contain every instance in which that name is mentioned in the instance head.

getGRE :: GhcMonad m => m GlobalRdrEnv #

get the GlobalRdrEnv for a session

findGlobalAnns :: (GhcMonad m, Typeable a) => ([Word8] -> a) -> AnnTarget Name -> m [a] #

lookupGlobalName :: GhcMonad m => Name -> m (Maybe TyThing) #

Looks up a global name: that is, any top-level name in any visible module. Unlike lookupName, lookupGlobalName does not use the interactive context, and therefore does not require a preceding setContext.

modInfoSafe :: ModuleInfo -> SafeHaskellMode #

Retrieve module safe haskell mode

modInfoInstances :: ModuleInfo -> [ClsInst] #

Returns the instances defined by the specified module. Warning: currently unimplemented for package modules.

modInfoTyThings :: ModuleInfo -> [TyThing] #

The list of top-level entities defined in a module

getModuleInfo :: GhcMonad m => Module -> m (Maybe ModuleInfo) #

Request information about a loaded Module

getInsts :: GhcMonad m => m ([ClsInst], [FamInst]) #

Return the instances for the current interactive session.

getBindings :: GhcMonad m => m [TyThing] #

Return the bindings for the current interactive session.

isLoaded :: GhcMonad m => ModuleName -> m Bool #

Return True == module is loaded.

getModuleGraph :: GhcMonad m => m ModuleGraph #

Get the module dependency graph.

compileToCoreSimplified :: GhcMonad m => FilePath -> m CoreModule #

Like compileToCoreModule, but invokes the simplifier, so as to return simplified and tidied Core.

compileToCoreModule :: GhcMonad m => FilePath -> m CoreModule #

This is the way to get access to the Core bindings corresponding to a module. compileToCore parses, typechecks, and desugars the module, then returns the resulting Core module (consisting of the module name, type declarations, and function declarations) if successful.

loadModule :: (TypecheckedMod mod, GhcMonad m) => mod -> m mod #

Load a module. Input doesn't need to be desugared.

A module must be loaded before dependent modules can be typechecked. This always includes generating a ModIface and, depending on the hscTarget, may also include code generation.

This function will always cause recompilation and will always overwrite previous compilation results (potentially files on disk).

desugarModule :: GhcMonad m => TypecheckedModule -> m DesugaredModule #

Desugar a typechecked module.

typecheckModule :: GhcMonad m => ParsedModule -> m TypecheckedModule #

Typecheck and rename a parsed module.

Throws a SourceError if either fails.

parseModule :: GhcMonad m => ModSummary -> m ParsedModule #

Parse a module.

Throws a SourceError on parse error.

getModSummary :: GhcMonad m => ModuleName -> m ModSummary #

Return the ModSummary of a module with the given name.

The module must be part of the module graph (see hsc_mod_graph and ModuleGraph). If this is not the case, this function will throw a GhcApiError.

This function ignores boot modules and requires that there is only one non-boot module with the given name.

workingDirectoryChanged :: GhcMonad m => m () #

Inform GHC that the working directory has changed. GHC will flush its cache of module locations, since it may no longer be valid.

Note: Before changing the working directory make sure all threads running in the same session have stopped. If you change the working directory, you should also unload the current program (set targets to empty, followed by load).

guessTarget :: GhcMonad m => String -> Maybe Phase -> m Target #

Attempts to guess what Target a string refers to. This function implements the --make/GHCi command-line syntax for filenames:

  • if the string looks like a Haskell source filename, then interpret it as such
  • if adding a .hs or .lhs suffix yields the name of an existing file, then use that
  • otherwise interpret the string as a module name

removeTarget :: GhcMonad m => TargetId -> m () #

Remove a target

addTarget :: GhcMonad m => Target -> m () #

Add another target.

getTargets :: GhcMonad m => m [Target] #

Returns the current set of targets

setTargets :: GhcMonad m => [Target] -> m () #

Sets the targets for this session. Each target may be a module name or a filename. The targets correspond to the set of root modules for the program/library. Unloading the current program is achieved by setting the current set of targets to be empty, followed by load.

getInteractiveDynFlags :: GhcMonad m => m DynFlags #

Get the DynFlags used to evaluate interactive expressions.

setInteractiveDynFlags :: GhcMonad m => DynFlags -> m () #

Set the DynFlags used to evaluate interactive expressions. Note: this cannot be used for changes to packages. Use setSessionDynFlags, or setProgramDynFlags and then copy the pkgState into the interactive DynFlags.

getProgramDynFlags :: GhcMonad m => m DynFlags #

Returns the program DynFlags.

setLogAction :: GhcMonad m => LogAction -> m () #

Set the action taken when the compiler produces a message. This can also be accomplished using setProgramDynFlags, but using setLogAction avoids invalidating the cached module graph.

setProgramDynFlags :: GhcMonad m => DynFlags -> m [InstalledUnitId] #

Sets the program DynFlags. Note: this invalidates the internal cached module graph, causing more work to be done the next time load is called.

setSessionDynFlags :: GhcMonad m => DynFlags -> m [InstalledUnitId] #

Updates both the interactive and program DynFlags in a Session. This also reads the package database (unless it has already been read), and prepares the compilers knowledge about packages. It can be called again to load new packages: just add new package flags to (packageFlags dflags).

Returns a list of new packages that may need to be linked in using the dynamic linker (see linkPackages) as a result of new package flags. If you are not doing linking or doing static linking, you can ignore the list of packages returned.

initGhcMonad :: GhcMonad m => Maybe FilePath -> m () #

Initialise a GHC session.

If you implement a custom GhcMonad you must call this function in the monad run function. It will initialise the session variable and clear all warnings.

The first argument should point to the directory where GHC's library files reside. More precisely, this should be the output of ghc --print-libdir of the version of GHC the module using this API is compiled with. For portability, you should use the ghc-paths package, available at http://hackage.haskell.org/package/ghc-paths.

withCleanupSession :: GhcMonad m => m a -> m a #

runGhcT #

Arguments

:: ExceptionMonad m 
=> Maybe FilePath

See argument to initGhcMonad.

-> GhcT m a

The action to perform.

-> m a 

Run function for GhcT monad transformer.

It initialises the GHC session and warnings via initGhcMonad. Each call to this function will create a new session which should not be shared among several threads.

runGhc #

Arguments

:: Maybe FilePath

See argument to initGhcMonad.

-> Ghc a

The action to perform.

-> IO a 

Run function for the Ghc monad.

It initialises the GHC session and warnings via initGhcMonad. Each call to this function will create a new session which should not be shared among several threads.

Any errors not handled inside the Ghc action are propagated as IO exceptions.

defaultCleanupHandler :: ExceptionMonad m => DynFlags -> m a -> m a #

This function is no longer necessary, cleanup is now done by runGhc/runGhcT.

defaultErrorHandler :: ExceptionMonad m => FatalMessager -> FlushOut -> m a -> m a #

Install some default exception handlers and run the inner computation. Unless you want to handle exceptions yourself, you should wrap this around the top level of your program. The default handlers output the error message(s) to stderr and exit cleanly.

class ParsedMod m where #

Minimal complete definition

modSummary, parsedSource

Methods

parsedSource :: m -> ParsedSource #

data ParsedModule #

The result of successful parsing.

Instances

Instances details
ParsedMod ParsedModule 
Instance details

Defined in GHC

data DesugaredModule #

The result of successful desugaring (i.e., translation to core). Also contains all the information of a typechecked module.

data CoreModule #

A CoreModule consists of just the fields of a ModGuts that are needed for the compileToCoreModule interface.

Constructors

CoreModule 

Fields

Instances

Instances details
Outputable CoreModule 
Instance details

Defined in GHC

data ModuleInfo #

Container for information about a Module.

topSortModuleGraph #

Arguments

:: Bool

Drop hi-boot nodes? (see below)

-> ModuleGraph 
-> Maybe ModuleName

Root module name. If Nothing, use the full graph.

-> [SCC ModSummary] 

Topological sort of the module graph

Calculate SCCs of the module graph, possibly dropping the hi-boot nodes The resulting list of strongly-connected-components is in topologically sorted order, starting with the module(s) at the bottom of the dependency graph (ie compile them first) and ending with the ones at the top.

Drop hi-boot nodes (first boolean arg)?

  • False: treat the hi-boot summaries as nodes of the graph, so the graph must be acyclic
  • True: eliminate the hi-boot nodes, and instead pretend the a source-import of Foo is an import of Foo The resulting graph has no hi-boot nodes, but can be cyclic

load :: GhcMonad m => LoadHowMuch -> m SuccessFlag #

Try to load the program. See LoadHowMuch for the different modes.

This function implements the core of GHC's --make mode. It preprocesses, compiles and loads the specified modules, avoiding re-compilation wherever possible. Depending on the target (see hscTarget) compiling and loading may result in files being created on disk.

Calls the defaultWarnErrLogger after each compiling each module, whether successful or not.

Throw a SourceError if errors are encountered before the actual compilation starts (e.g., during dependency analysis). All other errors are reported using the defaultWarnErrLogger.

depanal #

Arguments

:: GhcMonad m 
=> [ModuleName]

excluded modules

-> Bool

allow duplicate roots

-> m ModuleGraph 

Perform a dependency analysis starting from the current targets and update the session with the new module graph.

Dependency analysis entails parsing the import directives and may therefore require running certain preprocessors.

Note that each ModSummary in the module graph caches its DynFlags. These DynFlags are determined by the current session DynFlags and the OPTIONS and LANGUAGE pragmas of the parsed module. Thus if you want changes to the DynFlags to take effect you need to call this function again.

data LoadHowMuch #

Describes which modules of the module graph need to be loaded.

Constructors

LoadAllTargets

Load all targets and its dependencies.

LoadUpTo ModuleName

Load only the given module and its dependencies.

LoadDependenciesOf ModuleName

Load only the dependencies of the given module, but not the module itself.

dynCompileExpr :: GhcMonad m => String -> m Dynamic #

Compile an expression, run it and return the result as a Dynamic.

compileParsedExprRemote :: GhcMonad m => LHsExpr GhcPs -> m ForeignHValue #

Compile a parsed expression (before renaming), run it, and deliver the resulting HValue.

compileExprRemote :: GhcMonad m => String -> m ForeignHValue #

Compile an expression, run it, and deliver the resulting HValue.

compileExpr :: GhcMonad m => String -> m HValue #

Compile an expression, run it, and deliver the resulting HValue.

parseExpr :: GhcMonad m => String -> m (LHsExpr GhcPs) #

Parse an expression, the parsed expression can be further processed and passed to compileParsedExpr.

typeKind :: GhcMonad m => Bool -> String -> m (Type, Kind) #

Get the kind of a type

exprType :: GhcMonad m => TcRnExprMode -> String -> m Type #

Get the type of an expression Returns the type as described by TcRnExprMode

isDecl :: DynFlags -> String -> Bool #

Returns True if passed string is a declaration but not a splice.

isImport :: DynFlags -> String -> Bool #

Returns True if passed string is an import declaration.

hasImport :: DynFlags -> String -> Bool #

Returns True if passed string has an import declaration.

isStmt :: DynFlags -> String -> Bool #

Returns True if passed string is a statement.

parseName :: GhcMonad m => String -> m [Name] #

Parses a string as an identifier, and returns the list of Names that the identifier can refer to in the current interactive context.

getRdrNamesInScope :: GhcMonad m => m [RdrName] #

Returns all RdrNames in scope in the current interactive context, excluding any that are internally-generated.

getNamesInScope :: GhcMonad m => m [Name] #

Returns all names in scope in the current interactive context

getInfo :: GhcMonad m => Bool -> Name -> m (Maybe (TyThing, Fixity, [ClsInst], [FamInst], SDoc)) #

Looks up an identifier in the current interactive context (for :info) Filter the instances by the ones whose tycons (or clases resp) are in scope (qualified or otherwise). Otherwise we list a whole lot too many! The exact choice of which ones to show, and which to hide, is a judgement call. (see #1581)

moduleIsInterpreted :: GhcMonad m => Module -> m Bool #

Returns True if the specified module is interpreted, and hence has its full top-level scope available.

getContext :: GhcMonad m => m [InteractiveImport] #

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 of modules from which we take just the exports respectively.

setContext :: GhcMonad m => [InteractiveImport] -> m () #

Set the interactive evaluation context.

(setContext imports) sets the ic_imports field (which in turn determines what is in scope at the prompt) to imports, and constructs the ic_rn_glb_env environment to reflect it.

We retain in scope all the things defined at the prompt, and kept in ic_tythings. (Indeed, they shadow stuff from ic_imports.)

forward :: GhcMonad m => Int -> m ([Name], Int, SrcSpan, String) #

back :: GhcMonad m => Int -> m ([Name], Int, SrcSpan, String) #

runParsedDecls :: GhcMonad m => [LHsDecl GhcPs] -> m [Name] #

Like runDeclsWithLocation, but takes parsed declarations as argument. Useful when doing preprocessing on the AST before execution, e.g. in GHCi (see GHCi.UI.runStmt).

runDeclsWithLocation :: GhcMonad m => String -> Int -> String -> m [Name] #

Run some declarations and return any user-visible names that were brought into scope.

runDecls :: GhcMonad m => String -> m [Name] #

execStmt' :: GhcMonad m => GhciLStmt GhcPs -> String -> ExecOptions -> m ExecResult #

Like execStmt, but takes a parsed statement as argument. Useful when doing preprocessing on the AST before execution, e.g. in GHCi (see GHCi.UI.runStmt).

execStmt #

Arguments

:: GhcMonad m 
=> String

a statement (bind or expression)

-> ExecOptions 
-> m ExecResult 

Run a statement in the current interactive context.

execOptions :: ExecOptions #

default ExecOptions

data GetDocsFailure #

Failure modes for getDocs.

Constructors

NameHasNoModule Name

nameModule_maybe returned Nothing.

NoDocsInIface Module Bool

True: The module was compiled. False: The module was :loaded.

InteractiveName

The Name was defined interactively.

Instances

Instances details
Outputable GetDocsFailure 
Instance details

Defined in InteractiveEval

hscKcType #

Arguments

:: HscEnv 
-> Bool

Normalise the type

-> String

The type as a string

-> IO (Type, Kind)

Resulting type (possibly normalised) and kind

Find the kind of a type, after generalisation

hscTcExpr #

Arguments

:: HscEnv 
-> TcRnExprMode 
-> String

The expression

-> IO Type 

Typecheck an expression (but don't run it)

hscAddSptEntries :: HscEnv -> [SptEntry] -> IO () #

Load the given static-pointer table entries into the interpreter. See Note [Grand plan for static forms] in StaticPtrTable.

hscDeclsWithLocation #

Arguments

:: HscEnv 
-> String

The statement

-> String

The source

-> Int

Starting line

-> IO ([TyThing], InteractiveContext) 

Compile a decls

hscDecls #

Arguments

:: HscEnv 
-> String

The statement

-> IO ([TyThing], InteractiveContext) 

Compile a decls

hscParsedStmt #

Arguments

:: HscEnv 
-> GhciLStmt GhcPs

The parsed statement

-> IO (Maybe ([Id], ForeignHValue, FixityEnv)) 

hscStmtWithLocation #

Arguments

:: HscEnv 
-> String

The statement

-> String

The source

-> Int

Starting line

-> IO (Maybe ([Id], ForeignHValue, FixityEnv)) 

Compile a stmt all the way to an HValue, but don't run it

We return Nothing to indicate an empty statement (or comment only), not a parse error.

hscStmt :: HscEnv -> String -> IO (Maybe ([Id], ForeignHValue, FixityEnv)) #

Compile a stmt all the way to an HValue, but don't run it

We return Nothing to indicate an empty statement (or comment only), not a parse error.

hscGenHardCode #

Arguments

:: HscEnv 
-> CgGuts 
-> ModLocation 
-> FilePath 
-> IO (FilePath, Maybe FilePath, [(ForeignSrcLang, FilePath)])

Just f = _stub.c is f

Compile to hard-code.

hscGetSafe :: HscEnv -> Module -> SrcSpan -> IO (Bool, Set InstalledUnitId) #

Return if a module is trusted and the pkgs it depends on to be trusted.

hscCheckSafe :: HscEnv -> Module -> SrcSpan -> IO Bool #

Check that a module is safe to import.

We return True to indicate the import is safe and False otherwise although in the False case an exception may be thrown first.

hscFileFrontEnd :: ModSummary -> Hsc TcGblEnv #

Given a ModSummary, parses and typechecks it, returning the TcGblEnv resulting from type-checking.

hscIncrementalCompile :: Bool -> Maybe TcGblEnv -> Maybe Messager -> HscEnv -> ModSummary -> SourceModified -> Maybe ModIface -> (Int, Int) -> IO (HscStatus, ModDetails, DynFlags) #

Used by both OneShot and batch mode. Runs the pipeline HsSyn and Core parts of the pipeline. We return a interface if we already had an old one around and recompilation was not needed. Otherwise it will be created during later passes when we run the compilation pipeline.

makeSimpleDetails :: HscEnv -> TcGblEnv -> IO ModDetails #

Make a ModDetails from the results of typechecking. Used when typechecking only, as opposed to full compilation.

hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts #

Convert a typechecked module to Core

hscTypecheckRename :: HscEnv -> ModSummary -> HsParsedModule -> IO (TcGblEnv, RenamedStuff) #

Rename and typecheck a module, additionally returning the renamed syntax

hscParse :: HscEnv -> ModSummary -> IO HsParsedModule #

parse a file, returning the abstract syntax

hscRnImportDecls :: HscEnv -> [LImportDecl GhcPs] -> IO GlobalRdrEnv #

Rename some import declarations

hscTcRnLookupRdrName :: HscEnv -> Located RdrName -> IO [Name] #

Lookup things in the compiler's environment

ioMsgMaybe :: IO (Messages, Maybe a) -> Hsc a #

Deal with errors and warnings returned by a compilation step

In order to reduce dependencies to other parts of the compiler, functions outside the "main" parts of GHC return warnings and errors as a parameter and signal success via by wrapping the result in a Maybe type. This function logs the returned warnings and propagates errors as exceptions (of type SourceError).

This function assumes the following invariants:

  1. If the second result indicates success (is of the form 'Just x'), there must be no error messages in the first result.
  2. If there are no error messages, but the second result indicates failure there should be warnings in the first result. That is, if the action failed, it must have been due to the warnings (i.e., -Werror).

data TcRnExprMode #

How should we infer a type? See Note [TcRnExprMode]

Constructors

TM_Inst

Instantiate the type fully (:type)

TM_NoInst

Do not instantiate the type (:type +v)

TM_Default

Default the type eagerly (:type +d)

pprFamInst :: FamInst -> SDoc #

Pretty-prints a FamInst (type/data family instance) with its defining location.

printException :: GhcMonad m => SourceError -> m () #

Print the error message and all warnings. Useful inside exception handlers. Clears warnings after printing.

getSessionDynFlags :: GhcMonad m => m DynFlags #

Grabs the DynFlags from the Session

class (Functor m, MonadIO m, ExceptionMonad m, HasDynFlags m) => GhcMonad (m :: Type -> Type) where #

A monad that has all the features needed by GHC API calls.

In short, a GHC monad

  • allows embedding of IO actions,
  • can log warnings,
  • allows handling of (extensible) exceptions, and
  • maintains a current session.

If you do not use Ghc or GhcT, make sure to call initGhcMonad before any call to the GHC API functions can occur.

Methods

getSession :: m HscEnv #

setSession :: HscEnv -> m () #

Instances

Instances details
GhcMonad Ghc 
Instance details

Defined in GhcMonad

ExceptionMonad m => GhcMonad (GhcT m) 
Instance details

Defined in GhcMonad

Methods

getSession :: GhcT m HscEnv #

setSession :: HscEnv -> GhcT m () #

data Ghc a #

A minimal implementation of a GhcMonad. If you need a custom monad, e.g., to maintain additional state consider wrapping this monad or using GhcT.

Instances

Instances details
Monad Ghc 
Instance details

Defined in GhcMonad

Methods

(>>=) :: Ghc a -> (a -> Ghc b) -> Ghc b #

(>>) :: Ghc a -> Ghc b -> Ghc b #

return :: a -> Ghc a #

Functor Ghc 
Instance details

Defined in GhcMonad

Methods

fmap :: (a -> b) -> Ghc a -> Ghc b #

(<$) :: a -> Ghc b -> Ghc a #

MonadFix Ghc 
Instance details

Defined in GhcMonad

Methods

mfix :: (a -> Ghc a) -> Ghc a #

Applicative Ghc 
Instance details

Defined in GhcMonad

Methods

pure :: a -> Ghc a #

(<*>) :: Ghc (a -> b) -> Ghc a -> Ghc b #

liftA2 :: (a -> b -> c) -> Ghc a -> Ghc b -> Ghc c #

(*>) :: Ghc a -> Ghc b -> Ghc b #

(<*) :: Ghc a -> Ghc b -> Ghc a #

MonadIO Ghc 
Instance details

Defined in GhcMonad

Methods

liftIO :: IO a -> Ghc a #

GhcMonad Ghc 
Instance details

Defined in GhcMonad

HasDynFlags Ghc 
Instance details

Defined in GhcMonad

ExceptionMonad Ghc 
Instance details

Defined in GhcMonad

Methods

gcatch :: Exception e => Ghc a -> (e -> Ghc a) -> Ghc a #

gmask :: ((Ghc a -> Ghc a) -> Ghc b) -> Ghc b #

gbracket :: Ghc a -> (a -> Ghc b) -> (a -> Ghc c) -> Ghc c #

gfinally :: Ghc a -> Ghc b -> Ghc a #

GhcMonadLike Ghc # 
Instance details

Defined in Language.Haskell.Liquid.GHC.GhcMonadLike

HasHscEnv Ghc # 
Instance details

Defined in Language.Haskell.Liquid.GHC.GhcMonadLike

Methods

askHscEnv :: Ghc HscEnv #

data GhcT (m :: Type -> Type) a #

A monad transformer to add GHC specific features to another monad.

Note that the wrapped monad must support IO and handling of exceptions.

Instances

Instances details
Monad m => Monad (GhcT m) 
Instance details

Defined in GhcMonad

Methods

(>>=) :: GhcT m a -> (a -> GhcT m b) -> GhcT m b #

(>>) :: GhcT m a -> GhcT m b -> GhcT m b #

return :: a -> GhcT m a #

Functor m => Functor (GhcT m) 
Instance details

Defined in GhcMonad

Methods

fmap :: (a -> b) -> GhcT m a -> GhcT m b #

(<$) :: a -> GhcT m b -> GhcT m a #

Applicative m => Applicative (GhcT m) 
Instance details

Defined in GhcMonad

Methods

pure :: a -> GhcT m a #

(<*>) :: GhcT m (a -> b) -> GhcT m a -> GhcT m b #

liftA2 :: (a -> b -> c) -> GhcT m a -> GhcT m b -> GhcT m c #

(*>) :: GhcT m a -> GhcT m b -> GhcT m b #

(<*) :: GhcT m a -> GhcT m b -> GhcT m a #

MonadIO m => MonadIO (GhcT m) 
Instance details

Defined in GhcMonad

Methods

liftIO :: IO a -> GhcT m a #

ExceptionMonad m => GhcMonad (GhcT m) 
Instance details

Defined in GhcMonad

Methods

getSession :: GhcT m HscEnv #

setSession :: HscEnv -> GhcT m () #

MonadIO m => HasDynFlags (GhcT m) 
Instance details

Defined in GhcMonad

ExceptionMonad m => ExceptionMonad (GhcT m) 
Instance details

Defined in GhcMonad

Methods

gcatch :: Exception e => GhcT m a -> (e -> GhcT m a) -> GhcT m a #

gmask :: ((GhcT m a -> GhcT m a) -> GhcT m b) -> GhcT m b #

gbracket :: GhcT m a -> (a -> GhcT m b) -> (a -> GhcT m c) -> GhcT m c #

gfinally :: GhcT m a -> GhcT m b -> GhcT m a #

(ExceptionMonad m, GhcMonadLike m) => GhcMonadLike (GhcT m) # 
Instance details

Defined in Language.Haskell.Liquid.GHC.GhcMonadLike

(ExceptionMonad m, HasHscEnv m) => HasHscEnv (GhcT m) # 
Instance details

Defined in Language.Haskell.Liquid.GHC.GhcMonadLike

Methods

askHscEnv :: GhcT m HscEnv #

type WarnErrLogger = forall (m :: Type -> Type). GhcMonad m => Maybe SourceError -> m () #

A function called to log warnings and errors.

phaseForeignLanguage :: Phase -> Maybe ForeignSrcLang #

Foreign language of the phase if the phase deals with a foreign code

byteCodeOfObject :: Unlinked -> CompiledByteCode #

Retrieve the compiled byte-code if possible. Panic if it is a file-based linkable

nameOfObject :: Unlinked -> FilePath #

Retrieve the filename of the linkable if possible. Panic if it is a byte-code object

isInterpretable :: Unlinked -> Bool #

Is this a bytecode linkable with no file on disk?

isObject :: Unlinked -> Bool #

Is this an actual file on disk we can link in somehow?

isHpcUsed :: HpcInfo -> AnyHpcUsage #

Find out if HPC is used by this module or any of the modules it depends upon

isBootSummary :: ModSummary -> Bool #

Did this ModSummary originate from a hs-boot file?

ms_home_imps :: ModSummary -> [Located ModuleName] #

All of the (possibly) home module imports from a ModSummary; that is to say, each of these module names could be a home import if an appropriately named file existed. (This is in contrast to package qualified imports, which are guaranteed not to be home imports.)

ms_home_srcimps :: ModSummary -> [Located ModuleName] #

Like ms_home_imps, but for SOURCE imports.

extendMG :: ModuleGraph -> ModSummary -> ModuleGraph #

Add a ModSummary to ModuleGraph. Assumes that the new ModSummary is not an element of the ModuleGraph.

mgLookupModule :: ModuleGraph -> Module -> Maybe ModSummary #

Look up a ModSummary in the ModuleGraph

mapMG :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph #

Map a function f over all the ModSummaries. To preserve invariants f can't change the isBoot status.

needsTemplateHaskellOrQQ :: ModuleGraph -> Bool #

Determines whether a set of modules requires Template Haskell or Quasi Quotes

Note that if the session's DynFlags enabled Template Haskell when depanal was called, then each module in the returned module graph will have Template Haskell enabled whether it is actually needed or not.

addEpsInStats :: EpsStats -> Int -> Int -> Int -> EpsStats #

Add stats for one newly-read interface

mkIfaceFixCache :: [(OccName, Fixity)] -> OccName -> Maybe Fixity #

Creates cached lookup for the mi_fix_fn field of ModIface

mkIfaceWarnCache :: Warnings -> OccName -> Maybe WarningTxt #

Constructs the cache for the mi_warn_fn field of a ModIface

tyThingId :: TyThing -> Id #

Get the Id from a TyThing if it is a id *or* data constructor thing. Panics otherwise

tyThingConLike :: TyThing -> ConLike #

Get the ConLike from a TyThing if it is a data constructor thing. Panics otherwise

tyThingDataCon :: TyThing -> DataCon #

Get the DataCon from a TyThing if it is a data constructor thing. Panics otherwise

tyThingCoAxiom :: TyThing -> CoAxiom Branched #

Get the CoAxiom from a TyThing if it is a coercion axiom thing. Panics otherwise

tyThingTyCon :: TyThing -> TyCon #

Get the TyCon from a TyThing if it is a type constructor thing. Panics otherwise

lookupTypeHscEnv :: HscEnv -> Name -> IO (Maybe TyThing) #

As lookupType, but with a marginally easier-to-use interface if you have a HscEnv

lookupType :: DynFlags -> HomePackageTable -> PackageTypeEnv -> Name -> Maybe TyThing #

Find the TyThing for the given Name by using all the resources at our disposal: the compiled modules in the HomePackageTable and the compiled modules in other packages that live in PackageTypeEnv. Note that this does NOT look up the TyThing in the module being compiled: you have to do that yourself, if desired

tyThingAvailInfo :: TyThing -> [AvailInfo] #

The Names that a TyThing should bring into scope. Used to build the GlobalRdrEnv for the InteractiveContext.

tyThingParent_maybe :: TyThing -> Maybe TyThing #

tyThingParent_maybe x returns (Just p) when pprTyThingInContext should print a declaration for p (albeit with some "..." in it) when asked to show x It returns the *immediate* parent. So a datacon returns its tycon but the tycon could be the associated type of a class, so it in turn might have a parent.

isImplicitTyThing :: TyThing -> Bool #

Returns True if there should be no interface-file declaration for this thing on its own: either it is built-in, or it is part of some other declaration, or it is generated implicitly by some other declaration.

implicitTyThings :: TyThing -> [TyThing] #

Determine the TyThings brought into scope by another TyThing other than itself. For example, Id's don't have any implicit TyThings as they just bring themselves into scope, but classes bring their dictionary datatype, type constructor and some selector functions into scope, just for a start!

pkgQual :: DynFlags -> PrintUnqualified #

A function which only qualifies package names if necessary; but qualifies all other identifiers.

mkQualPackage :: DynFlags -> QueryQualifyPackage #

Creates a function for formatting packages based on two heuristics: (1) don't qualify if the package in question is "main", and (2) only qualify with a unit id if the package ID would be ambiguous.

mkQualModule :: DynFlags -> QueryQualifyModule #

Creates a function for formatting modules based on two heuristics: (1) if the module is the current module, don't qualify, and (2) if there is only one exposed package which exports this module, don't qualify.

mkPrintUnqualified :: DynFlags -> GlobalRdrEnv -> PrintUnqualified #

Creates some functions that work out the best ways to format names for the user according to a set of heuristics.

icExtendGblRdrEnv :: GlobalRdrEnv -> [TyThing] -> GlobalRdrEnv #

Add TyThings to the GlobalRdrEnv, earlier ones in the list shadowing later ones, and shadowing existing entries in the GlobalRdrEnv.

extendInteractiveContext :: InteractiveContext -> [TyThing] -> [ClsInst] -> [FamInst] -> Maybe [Type] -> FixityEnv -> InteractiveContext #

extendInteractiveContext is called with new TyThings recently defined to update the InteractiveContext to include them. Ids are easily removed when shadowed, but Classes and TyCons are not. Some work could be done to determine whether they are entirely shadowed, but as you could still have references to them (e.g. instances for classes or values of the type for TyCons), it's not clear whether removing them is even the appropriate behavior.

icPrintUnqual :: DynFlags -> InteractiveContext -> PrintUnqualified #

Get the PrintUnqualified function based on the flags and this InteractiveContext

icInScopeTTs :: InteractiveContext -> [TyThing] #

This function returns the list of visible TyThings (useful for e.g. showBindings)

emptyInteractiveContext :: DynFlags -> InteractiveContext #

Constructs an empty InteractiveContext.

emptyModDetails :: ModDetails #

Constructs an empty ModDetails

mkIfaceHashCache :: [(Fingerprint, IfaceDecl)] -> OccName -> Maybe (OccName, Fingerprint) #

Constructs cache for the mi_hash_fn field of a ModIface

renameFreeHoles :: UniqDSet ModuleName -> [(ModuleName, Module)] -> UniqDSet ModuleName #

Given a set of free holes, and a unit identifier, rename the free holes according to the instantiation of the unit identifier. For example, if we have A and B free, and our unit identity is p[A=C,B=impl:B], the renamed free holes are just C.

mi_free_holes :: ModIface -> UniqDSet ModuleName #

The "precise" free holes, e.g., the signatures that this ModIface depends on.

mi_semantic_module :: forall (a :: ModIfacePhase). ModIface_ a -> Module #

The semantic module for this interface; e.g., if it's a interface for a signature, if mi_module is p[A=A]:A, mi_semantic_module will be A.

mi_fix :: ModIface -> OccName -> Fixity #

Lookups up a (possibly cached) fixity from a ModIface. If one cannot be found, defaultFixity is returned instead.

mi_boot :: ModIface -> Bool #

Old-style accessor for whether or not the ModIface came from an hs-boot file.

prepareAnnotations :: HscEnv -> Maybe ModGuts -> IO AnnEnv #

Deal with gathering annotations in from all possible places and combining them into a single AnnEnv

hptRules :: HscEnv -> [(ModuleName, IsBootInterface)] -> [CoreRule] #

Get rules from modules "below" this one (in the dependency sense)

hptInstances :: HscEnv -> (ModuleName -> Bool) -> ([ClsInst], [FamInst]) #

Find all the instance declarations (of classes and families) from the Home Package Table filtered by the provided predicate function. Used in tcRnImports, to select the instances that are in the transitive closure of imports from the currently compiled module.

lookupIfaceByModule :: HomePackageTable -> PackageIfaceTable -> Module -> Maybe ModIface #

Find the ModIface for a Module, searching in both the loaded home and external package module information

emptyPackageIfaceTable :: PackageIfaceTable #

Constructs an empty PackageIfaceTable

emptyHomePackageTable :: HomePackageTable #

Constructs an empty HomePackageTable

hscEPS :: HscEnv -> IO ExternalPackageState #

Retrieve the ExternalPackageState cache.

printOrThrowWarnings :: DynFlags -> Bag WarnMsg -> IO () #

Given a bag of warnings, turn them into an exception if -Werror is enabled, or print them out otherwise.

handleSourceError #

Arguments

:: ExceptionMonad m 
=> (SourceError -> m a)

exception handler

-> m a

action to perform

-> m a 

Perform the given action and call the exception handler if the action throws a SourceError. See SourceError for more information.

throwOneError :: MonadIO io => ErrMsg -> io a #

runHsc :: HscEnv -> Hsc a -> IO a #

data HscStatus #

Status of a compilation to hard-code

Constructors

HscNotGeneratingCode ModIface

Nothing to do.

HscUpToDate ModIface

Nothing to do because code already exists.

HscUpdateBoot ModIface

Update boot file result.

HscUpdateSig ModIface

Generate signature file (backpack)

HscRecomp

Recompile this module.

Fields

newtype Hsc a #

Constructors

Hsc (HscEnv -> WarningMessages -> IO (a, WarningMessages)) 

Instances

Instances details
Monad Hsc 
Instance details

Defined in HscTypes

Methods

(>>=) :: Hsc a -> (a -> Hsc b) -> Hsc b #

(>>) :: Hsc a -> Hsc b -> Hsc b #

return :: a -> Hsc a #

Functor Hsc 
Instance details

Defined in HscTypes

Methods

fmap :: (a -> b) -> Hsc a -> Hsc b #

(<$) :: a -> Hsc b -> Hsc a #

Applicative Hsc 
Instance details

Defined in HscTypes

Methods

pure :: a -> Hsc a #

(<*>) :: Hsc (a -> b) -> Hsc a -> Hsc b #

liftA2 :: (a -> b -> c) -> Hsc a -> Hsc b -> Hsc c #

(*>) :: Hsc a -> Hsc b -> Hsc b #

(<*) :: Hsc a -> Hsc b -> Hsc a #

MonadIO Hsc 
Instance details

Defined in HscTypes

Methods

liftIO :: IO a -> Hsc a #

HasDynFlags Hsc 
Instance details

Defined in HscTypes

GhcMonadLike Hsc # 
Instance details

Defined in Language.Haskell.Liquid.GHC.GhcMonadLike

HasHscEnv Hsc # 
Instance details

Defined in Language.Haskell.Liquid.GHC.GhcMonadLike

Methods

askHscEnv :: Hsc HscEnv #

data SourceError #

A source error is an error that is caused by one or more errors in the source code. A SourceError is thrown by many functions in the compilation pipeline. Inside GHC these errors are merely printed via log_action, but API clients may treat them differently, for example, insert them into a list box. If you want the default behaviour, use the idiom:

handleSourceError printExceptionAndWarnings $ do
  ... api calls that may fail ...

The SourceErrors error messages can be accessed via srcErrorMessages. This list may be empty if the compiler failed due to -Werror (Opt_WarnIsError).

See printExceptionAndWarnings for more information on what to take care of when writing a custom error handler.

Instances

Instances details
Show SourceError 
Instance details

Defined in HscTypes

Exception SourceError 
Instance details

Defined in HscTypes

PPrint SourceError # 
Instance details

Defined in Language.Haskell.Liquid.Types.PrettyPrint

Methods

pprintTidy :: Tidy -> SourceError -> Doc #

pprintPrec :: Int -> Tidy -> SourceError -> Doc #

Result SourceError # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Interface

Methods

result :: SourceError -> FixResult UserError #

data GhcApiError #

An error thrown if the GHC API is used in an incorrect fashion.

Instances

Instances details
Show GhcApiError 
Instance details

Defined in HscTypes

Exception GhcApiError 
Instance details

Defined in HscTypes

data HscEnv #

HscEnv is like Session, except that some of the fields are immutable. An HscEnv is used to compile a single module from plain Haskell source code (after preprocessing) to either C, assembly or C--. It's also used to store the dynamic linker state to allow for multiple linkers in the same address space. Things like the module graph don't change during a single compilation.

Historical note: "hsc" used to be the name of the compiler binary, when there was a separate driver and compiler. To compile a single module, the driver would invoke hsc on the source code... so nowadays we think of hsc as the layer of the compiler that deals with compiling a single module.

Constructors

HscEnv 

Fields

  • hsc_dflags :: DynFlags

    The dynamic flag settings

  • hsc_targets :: [Target]

    The targets (or roots) of the current session

  • hsc_mod_graph :: ModuleGraph

    The module graph of the current session

  • hsc_IC :: InteractiveContext

    The context for evaluating interactive statements

  • hsc_HPT :: HomePackageTable

    The home package table describes already-compiled home-package modules, excluding the module we are compiling right now. (In one-shot mode the current module is the only home-package module, so hsc_HPT is empty. All other modules count as "external-package" modules. However, even in GHCi mode, hi-boot interfaces are demand-loaded into the external-package table.)

    hsc_HPT is not mutable because we only demand-load external packages; the home package is eagerly loaded, module by module, by the compilation manager.

    The HPT may contain modules compiled earlier by --make but not actually below the current module in the dependency graph.

    (This changes a previous invariant: changed Jan 05.)

  • hsc_EPS :: !(IORef ExternalPackageState)

    Information about the currently loaded external packages. This is mutable because packages will be demand-loaded during a compilation run as required.

  • hsc_NC :: !(IORef NameCache)

    As with hsc_EPS, this is side-effected by compiling to reflect sucking in interface files. They cache the state of external interface files, in effect.

  • hsc_FC :: !(IORef FinderCache)

    The cached result of performing finding in the file system

  • hsc_type_env_var :: Maybe (Module, IORef TypeEnv)

    Used for one-shot compilation only, to initialise the IfGblEnv. See tcg_type_env_var for TcGblEnv. See also Note [hsc_type_env_var hack]

  • hsc_iserv :: MVar (Maybe IServ)

    interactive server process. Created the first time it is needed.

  • hsc_dynLinker :: DynLinker

    dynamic linker.

data Target #

A compilation target.

A target may be supplied with the actual text of the module. If so, use this instead of the file contents (this is for use in an IDE where the file hasn't been saved by the user yet).

Constructors

Target 

Fields

  • targetId :: TargetId

    module or filename

  • targetAllowObjCode :: Bool

    object code allowed?

  • targetContents :: Maybe (InputFileBuffer, UTCTime)

    Optional in-memory buffer containing the source code GHC should use for this target instead of reading it from disk.

    Since GHC version 8.10 modules which require preprocessors such as Literate Haskell or CPP to run are also supported.

    If a corresponding source file does not exist on disk this will result in a SourceError exception if targetId = TargetModule _ is used. However together with targetId = TargetFile _ GHC will not complain about the file missing.

Instances

Instances details
Outputable Target 
Instance details

Defined in HscTypes

Methods

ppr :: Target -> SDoc #

pprPrec :: Rational -> Target -> SDoc #

data TargetId #

Constructors

TargetModule ModuleName

A module name: search for the file

TargetFile FilePath (Maybe Phase)

A filename: preprocess & parse it to find the module name. If specified, the Phase indicates how to compile this file (which phase to start from). Nothing indicates the starting phase should be determined from the suffix of the filename.

Instances

Instances details
Eq TargetId 
Instance details

Defined in HscTypes

Outputable TargetId 
Instance details

Defined in HscTypes

type HomePackageTable = DModuleNameEnv HomeModInfo #

Helps us find information about modules in the home package

type PackageIfaceTable = ModuleEnv ModIface #

Helps us find information about modules in the imported packages

data HomeModInfo #

Information about modules in the package being compiled

Constructors

HomeModInfo 

Fields

data MetaRequest #

The supported metaprogramming result types

data MetaResult #

data constructors not exported to ensure correct result type

type FinderCache = InstalledModuleEnv InstalledFindResult #

The FinderCache maps modules to the result of searching for that module. It records the results of searching for modules along the search path. On :load, we flush the entire contents of this cache.

data FindResult #

The result of searching for an imported module.

NB: FindResult manages both user source-import lookups (which can result in Module) as well as direct imports for interfaces (which always result in InstalledModule).

Constructors

Found ModLocation Module

The module was found

NoPackage UnitId

The requested package was not found

FoundMultiple [(Module, ModuleOrigin)]

_Error_: both in multiple packages

NotFound

Not found

type PartialModIface = ModIface_ 'ModIfaceCore #

type ModIface = ModIface_ 'ModIfaceFinal #

data ModIfaceBackend #

Extends a PartialModIface with information which is either: * Computed after codegen * Or computed just before writing the iface to disk. (Hashes) In order to fully instantiate it.

Constructors

ModIfaceBackend 

Fields

data ModIface_ (phase :: ModIfacePhase) #

A ModIface plus a ModDetails summarises everything we know about a compiled module. The ModIface is the stuff *before* linking, and can be written out to an interface file. The 'ModDetails is after linking and can be completely recovered from just the ModIface.

When we read an interface file, we also construct a ModIface from it, except that we explicitly make the mi_decls and a few other fields empty; as when reading we consolidate the declarations etc. into a number of indexed maps and environments in the ExternalPackageState.

Constructors

ModIface 

Fields

  • mi_module :: !Module

    Name of the module we are for

  • mi_sig_of :: !(Maybe Module)

    Are we a sig of another mod?

  • mi_hsc_src :: !HscSource

    Boot? Signature?

  • mi_deps :: Dependencies

    The dependencies of the module. This is consulted for directly-imported modules, but not for anything else (hence lazy)

  • mi_usages :: [Usage]

    Usages; kept sorted so that it's easy to decide whether to write a new iface file (changing usages doesn't affect the hash of this module) NOT STRICT! we read this field lazily from the interface file It is *only* consulted by the recompilation checker

  • mi_exports :: ![IfaceExport]

    Exports Kept sorted by (mod,occ), to make version comparisons easier Records the modules that are the declaration points for things exported by this module, and the OccNames of those things

  • mi_used_th :: !Bool

    Module required TH splices when it was compiled. This disables recompilation avoidance (see #481).

  • mi_fixities :: [(OccName, Fixity)]

    Fixities NOT STRICT! we read this field lazily from the interface file

  • mi_warns :: Warnings

    Warnings NOT STRICT! we read this field lazily from the interface file

  • mi_anns :: [IfaceAnnotation]

    Annotations NOT STRICT! we read this field lazily from the interface file

  • mi_decls :: [IfaceDeclExts phase]

    Type, class and variable declarations The hash of an Id changes if its fixity or deprecations change (as well as its type of course) Ditto data constructors, class operations, except that the hash of the parent class/tycon changes

  • mi_globals :: !(Maybe GlobalRdrEnv)

    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 may contains declarations for things not actually defined by the user). Used for GHCi and for inspecting the contents of modules via the GHC API only.

    (We need the source file to figure out the top-level environment, if we didn't compile this module from source then this field contains Nothing).

    Strictly speaking this field should live in the HomeModInfo, but that leads to more plumbing.

  • mi_insts :: [IfaceClsInst]

    Sorted class instance

  • mi_fam_insts :: [IfaceFamInst]

    Sorted family instances

  • mi_rules :: [IfaceRule]

    Sorted rules

  • mi_hpc :: !AnyHpcUsage

    True if this program uses Hpc at any point in the program.

  • mi_trust :: !IfaceTrustInfo

    Safe Haskell Trust information for this module.

  • mi_trust_pkg :: !Bool

    Do we require the package this module resides in be trusted to trust this module? This is used for the situation where a module is Safe (so doesn't require the package be trusted itself) but imports some trustworthy modules from its own package (which does require its own package be trusted). See Note [RnNames . Trust Own Package]

  • mi_complete_sigs :: [IfaceCompleteMatch]
     
  • mi_doc_hdr :: Maybe HsDocString

    Module header.

  • mi_decl_docs :: DeclDocMap

    Docs on declarations.

  • mi_arg_docs :: ArgDocMap

    Docs on arguments.

  • mi_final_exts :: !(IfaceBackendExts phase)

    Either () or ModIfaceBackend for a fully instantiated interface.

Instances

Instances details
Binary ModIface 
Instance details

Defined in HscTypes

(NFData (IfaceBackendExts phase), NFData (IfaceDeclExts phase)) => NFData (ModIface_ phase) 
Instance details

Defined in HscTypes

Methods

rnf :: ModIface_ phase -> () #

type IfaceExport = AvailInfo #

The original names declared of a certain module that are exported

data ModDetails #

The ModDetails is essentially a cache for information in the ModIface for home modules only. Information relating to packages will be loaded into global environments in ExternalPackageState.

Constructors

ModDetails 

Fields

type ImportedMods = ModuleEnv [ImportedBy] #

Records the modules directly imported by a module for extracting e.g. usage information, and also to give better error message

data ImportedBy #

If a module was "imported" by the user, we associate it with more detailed usage information ImportedModsVal; a module imported by the system only gets used for usage information.

data ImportedModsVal #

Constructors

ImportedModsVal 

Fields

data ModGuts #

A ModGuts is carried through the compiler, accumulating stuff as it goes There is only one ModGuts at any time, the one for the module being compiled right now. Once it is compiled, a ModIface and ModDetails are extracted and the ModGuts is discarded.

Constructors

ModGuts 

Fields

data CgGuts #

A restricted form of ModGuts for code generation purposes

Constructors

CgGuts 

Fields

data ForeignStubs #

Foreign export stubs

Constructors

NoStubs

We don't have any stubs

ForeignStubs SDoc SDoc

There are some stubs. Parameters:

1) Header file prototypes for "foreign exported" functions

2) C stubs to use when calling "foreign exported" functions

data InteractiveContext #

Interactive context, recording information about the state of the context in which statements are executed in a GHCi session.

Constructors

InteractiveContext 

Fields

  • ic_dflags :: DynFlags

    The DynFlags used to evaluate interative expressions and statements.

  • ic_mod_index :: Int

    Each GHCi stmt or declaration brings some new things into scope. We give them names like interactive:Ghci9.T, where the ic_index is the '9'. The ic_mod_index is incremented whenever we add something to ic_tythings See Note [The interactive package]

  • ic_imports :: [InteractiveImport]

    The GHCi top-level scope (ic_rn_gbl_env) is extended with these imports

    This field is only stored here so that the client can retrieve it with GHC.getContext. GHC itself doesn't use it, but does reset it to empty sometimes (such as before a GHC.load). The context is set with GHC.setContext.

  • ic_tythings :: [TyThing]

    TyThings defined by the user, in reverse order of definition (ie most recent at the front) See Note [ic_tythings]

  • ic_rn_gbl_env :: GlobalRdrEnv

    The cached GlobalRdrEnv, built by setContext and updated regularly It contains everything in scope at the command line, including everything in ic_tythings

  • ic_instances :: ([ClsInst], [FamInst])

    All instances and family instances created during this session. These are grabbed en masse after each update to be sure that proper overlapping is retained. That is, rather than re-check the overlapping each time we update the context, we just take the results from the instance code that already does that.

  • ic_fix_env :: FixityEnv

    Fixities declared in let statements

  • ic_default :: Maybe [Type]

    The current default types, set by a 'default' declaration

  • ic_resume :: [Resume]

    The stack of breakpoint contexts

  • ic_monad :: Name

    The monad that GHCi is executing in

  • ic_int_print :: Name

    The function that is used for printing results of expressions in ghci and -e mode.

  • ic_cwd :: Maybe FilePath
     

data InteractiveImport #

Constructors

IIDecl (ImportDecl GhcPs)

Bring the exports of a particular module (filtered by an import decl) into scope

IIModule ModuleName

Bring into scope the entire top-level envt of of this module, including the things imported into it.

Instances

Instances details
Outputable InteractiveImport 
Instance details

Defined in HscTypes

type TypeEnv = NameEnv TyThing #

A map from Names to TyThings, constructed by typechecking local declarations or interface files

class Monad m => MonadThings (m :: Type -> Type) where #

Class that abstracts out the common ability of the monads in GHC to lookup a TyThing in the monadic environment by Name. Provides a number of related convenience functions for accessing particular kinds of TyThing

Minimal complete definition

lookupThing

data Warnings #

Warning information for a module

Constructors

NoWarnings

Nothing deprecated

WarnAll WarningTxt

Whole module deprecated

WarnSome [(OccName, WarningTxt)]

Some specific things deprecated

Instances

Instances details
Eq Warnings 
Instance details

Defined in HscTypes

Binary Warnings 
Instance details

Defined in HscTypes

type FixityEnv = NameEnv FixItem #

Fixity environment mapping names to their fixities

data FixItem #

Fixity information for an Name. We keep the OccName in the range so that we can generate an interface from it

Constructors

FixItem OccName Fixity 

Instances

Instances details
Outputable FixItem 
Instance details

Defined in HscTypes

Methods

ppr :: FixItem -> SDoc #

pprPrec :: Rational -> FixItem -> SDoc #

type WhetherHasOrphans = Bool #

Records whether a module has orphans. An "orphan" is one of:

  • An instance declaration in a module other than the definition module for one of the type constructors or classes in the instance head
  • A transformation rule in a module other than the one defining the function in the head of the rule

type IsBootInterface = Bool #

Did this module originate from a *-boot file?

data Dependencies #

Dependency information about ALL modules and packages below this one in the import hierarchy.

Invariant: the dependencies of a module M never includes M.

Invariant: none of the lists contain duplicates.

Constructors

Deps 

Fields

  • dep_mods :: [(ModuleName, IsBootInterface)]

    All home-package modules transitively below this one I.e. modules that this one imports, or that are in the dep_mods of those directly-imported modules

  • dep_pkgs :: [(InstalledUnitId, Bool)]

    All packages transitively below this module I.e. packages to which this module's direct imports belong, or that are in the dep_pkgs of those modules The bool indicates if the package is required to be trusted when the module is imported as a safe import (Safe Haskell). See Note [RnNames . Tracking Trust Transitively]

  • dep_orphs :: [Module]

    Transitive closure of orphan modules (whether home or external pkg).

    (Possible optimization: don't include family instance orphans as they are anyway included in dep_finsts. But then be careful about code which relies on dep_orphs having the complete list!) This does NOT include us, unlike imp_orphs.

  • dep_finsts :: [Module]

    Transitive closure of depended upon modules which contain family instances (whether home or external). This is used by checkFamInstConsistency. This does NOT include us, unlike imp_finsts. See Note [The type family instance consistency story].

  • dep_plgins :: [ModuleName]

    All the plugins used while compiling this module.

Instances

Instances details
Eq Dependencies 
Instance details

Defined in HscTypes

Binary Dependencies 
Instance details

Defined in HscTypes

data Usage #

Records modules for which changes may force recompilation of this module See wiki: https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/recompilation-avoidance

This differs from Dependencies. A module X may be in the dep_mods of this module (via an import chain) but if we don't use anything from X it won't appear in our Usage

Constructors

UsagePackageModule

Module from another package

Fields

UsageHomeModule

Module from the current package | A file upon which the module depends, e.g. a CPP #include, or using TH's addDependentFile

Fields

UsageFile 

Fields

UsageMergedRequirement

A requirement which was merged into this one.

Fields

Instances

Instances details
Eq Usage 
Instance details

Defined in HscTypes

Methods

(==) :: Usage -> Usage -> Bool #

(/=) :: Usage -> Usage -> Bool #

Binary Usage 
Instance details

Defined in HscTypes

Methods

put_ :: BinHandle -> Usage -> IO () #

put :: BinHandle -> Usage -> IO (Bin Usage) #

get :: BinHandle -> IO Usage #

data ExternalPackageState #

Information about other packages that we have slurped in by reading their interface files

Constructors

EPS 

Fields

data EpsStats #

Accumulated statistics about what we are putting into the ExternalPackageState. "In" means stuff that is just read from interface files, "Out" means actually sucked in and type-checked

Constructors

EpsStats 

data ModuleGraph #

A ModuleGraph contains all the nodes from the home package (only). There will be a node for each source module, plus a node for each hi-boot module.

The graph is not necessarily stored in topologically-sorted order. Use topSortModuleGraph and flattenSCC to achieve this.

data ModSummary #

A single node in a ModuleGraph. The nodes of the module graph are one of:

  • A regular Haskell source module
  • A hi-boot source module

Constructors

ModSummary 

Fields

Instances

Instances details
Outputable ModSummary 
Instance details

Defined in HscTypes

data SourceModified #

Indicates whether a given module's source has been modified since it was last compiled.

Constructors

SourceModified

the source has been modified

SourceUnmodified

the source has not been modified. Compilation may or may not be necessary, depending on whether any dependencies have changed since we last compiled.

SourceUnmodifiedAndStable

the source has not been modified, and furthermore all of its (transitive) dependencies are up to date; it definitely does not need to be recompiled. This is important for two reasons: (a) we can omit the version check in checkOldIface, and (b) if the module used TH splices we don't need to force recompilation.

data HpcInfo #

Information about a modules use of Haskell Program Coverage

Constructors

HpcInfo 
NoHpcInfo 

Fields

type AnyHpcUsage = Bool #

This is used to signal if one of my imports used HPC instrumentation even if there is no module-local HPC usage

type IsSafeImport = Bool #

Is an import a safe import?

data IfaceTrustInfo #

Safe Haskell information for ModIface Simply a wrapper around SafeHaskellMode to sepperate iface and flags

Instances

Instances details
Binary IfaceTrustInfo 
Instance details

Defined in HscTypes

Outputable IfaceTrustInfo 
Instance details

Defined in HscTypes

data HsParsedModule #

Constructors

HsParsedModule 

Fields

data CompleteMatch #

A list of conlikes which represents a complete pattern match. These arise from COMPLETE signatures.

Constructors

CompleteMatch 

Fields

Instances

Instances details
Outputable CompleteMatch 
Instance details

Defined in HscTypes

data HsModule pass #

Haskell Module

All we actually declare here is the top-level structure for a module.

Constructors

HsModule

AnnKeywordIds

Fields

Instances

Instances details
Data (HsModule GhcPs) 
Instance details

Defined in GHC.Hs

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule GhcPs -> c (HsModule GhcPs) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsModule GhcPs) #

toConstr :: HsModule GhcPs -> Constr #

dataTypeOf :: HsModule GhcPs -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsModule GhcPs)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsModule GhcPs)) #

gmapT :: (forall b. Data b => b -> b) -> HsModule GhcPs -> HsModule GhcPs #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcPs -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcPs -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsModule GhcPs -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule GhcPs -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule GhcPs -> m (HsModule GhcPs) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcPs -> m (HsModule GhcPs) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcPs -> m (HsModule GhcPs) #

Data (HsModule GhcRn) 
Instance details

Defined in GHC.Hs

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule GhcRn -> c (HsModule GhcRn) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsModule GhcRn) #

toConstr :: HsModule GhcRn -> Constr #

dataTypeOf :: HsModule GhcRn -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsModule GhcRn)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsModule GhcRn)) #

gmapT :: (forall b. Data b => b -> b) -> HsModule GhcRn -> HsModule GhcRn #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcRn -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcRn -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsModule GhcRn -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule GhcRn -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule GhcRn -> m (HsModule GhcRn) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcRn -> m (HsModule GhcRn) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcRn -> m (HsModule GhcRn) #

Data (HsModule GhcTc) 
Instance details

Defined in GHC.Hs

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule GhcTc -> c (HsModule GhcTc) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsModule GhcTc) #

toConstr :: HsModule GhcTc -> Constr #

dataTypeOf :: HsModule GhcTc -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsModule GhcTc)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsModule GhcTc)) #

gmapT :: (forall b. Data b => b -> b) -> HsModule GhcTc -> HsModule GhcTc #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcTc -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcTc -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsModule GhcTc -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule GhcTc -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule GhcTc -> m (HsModule GhcTc) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcTc -> m (HsModule GhcTc) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcTc -> m (HsModule GhcTc) #

OutputableBndrId p => Outputable (HsModule (GhcPass p)) 
Instance details

Defined in GHC.Hs

Methods

ppr :: HsModule (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsModule (GhcPass p) -> SDoc #

hsValBindsImplicits :: forall (idR :: Pass). HsValBindsLR GhcRn (GhcPass idR) -> [(SrcSpan, [Name])] #

lStmtsImplicits :: forall (idR :: Pass) body. [LStmtLR GhcRn (GhcPass idR) (Located (body (GhcPass idR)))] -> [(SrcSpan, [Name])] #

hsDataFamInstBinders :: forall (p :: Pass). DataFamInstDecl (GhcPass p) -> ([Located (IdP (GhcPass p))], [LFieldOcc (GhcPass p)]) #

the SrcLoc returned are for the whole declarations, not just the names

hsPatSynSelectors :: forall (p :: Pass). HsValBinds (GhcPass p) -> [IdP (GhcPass p)] #

Collects record pattern-synonym selectors only; the pattern synonym names are collected by collectHsValBinders.

hsForeignDeclsBinders :: [LForeignDecl pass] -> [Located (IdP pass)] #

See Note [SrcSpan for binders]

hsLTyClDeclBinders :: forall (p :: Pass). Located (TyClDecl (GhcPass p)) -> ([Located (IdP (GhcPass p))], [LFieldOcc (GhcPass p)]) #

Returns all the binding names of the decl. The first one is guaranteed to be the name of the decl. The first component represents all binding names except record fields; the second represents field occurrences. For record fields mentioned in multiple constructors, the SrcLoc will be from the first occurrence.

Each returned (Located name) has a SrcSpan for the whole declaration. See Note [SrcSpan for binders]

collectPatsBinders :: forall (p :: Pass). [LPat (GhcPass p)] -> [IdP (GhcPass p)] #

collectPatBinders :: forall (p :: Pass). LPat (GhcPass p) -> [IdP (GhcPass p)] #

collectStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. StmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)] #

collectLStmtBinders :: forall (idL :: Pass) (idR :: Pass) body. LStmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)] #

collectStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. [StmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)] #

collectLStmtsBinders :: forall (idL :: Pass) (idR :: Pass) body. [LStmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)] #

collectMethodBinders :: LHsBindsLR idL idR -> [Located (IdP idL)] #

Used exclusively for the bindings of an instance decl which are all FunBinds

collectHsBindListBinders :: forall (p :: Pass) idR. [LHsBindLR (GhcPass p) idR] -> [IdP (GhcPass p)] #

Same as collectHsBindsBinders, but works over a list of bindings

collectHsBindsBinders :: forall (p :: Pass) idR. LHsBindsLR (GhcPass p) idR -> [IdP (GhcPass p)] #

collectHsBindBinders :: (SrcSpanLess (LPat p) ~ Pat p, HasSrcSpan (LPat p)) => HsBindLR p idR -> [IdP p] #

Collect both Ids and pattern-synonym binders

collectHsValBinders :: forall (idL :: Pass) (idR :: Pass). HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)] #

Collect Id binders only, or Ids + pattern synonyms, respectively

collectHsIdBinders :: forall (idL :: Pass) (idR :: Pass). HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)] #

Collect Id binders only, or Ids + pattern synonyms, respectively

collectLocalBinders :: forall (idL :: Pass) (idR :: Pass). HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)] #

isBangedHsBind :: HsBind GhcTc -> Bool #

Is a binding a strict variable or pattern bind (e.g. !x = ...)?

isUnliftedHsBind :: HsBind GhcTc -> Bool #

Should we treat this as an unlifted bind? This will be true for any bind that binds an unlifted variable, but we must be careful around AbsBinds. See Note [Unlifted id check in isUnliftedHsBind]. For usage information, see Note [Strict binds check] is DsBinds.

mkPrefixFunRhs :: Located id -> HsMatchContext id #

Make a prefix, non-strict function HsMatchContext

mkSimpleGeneratedFunBind :: SrcSpan -> RdrName -> [LPat GhcPs] -> LHsExpr GhcPs -> LHsBind GhcPs #

Convenience function using mkFunBind. This is for generated bindings only, do not use for user-written code.

isInfixFunBind :: HsBindLR id1 id2 -> Bool #

If any of the matches in the FunBind are infix, the FunBind is considered infix.

mkVarBind :: forall (p :: Pass). IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p) #

mkTopFunBind :: Origin -> Located Name -> [LMatch GhcRn (LHsExpr GhcRn)] -> HsBind GhcRn #

In Name-land, with empty bind_fvs

mkFunBind :: Origin -> Located RdrName -> [LMatch GhcPs (LHsExpr GhcPs)] -> HsBind GhcPs #

Not infix, with place holders for coercion and free vars

mkHsWrapPatCo :: forall (id :: Pass). TcCoercionN -> Pat (GhcPass id) -> Type -> Pat (GhcPass id) #

mkHsWrapPat :: forall (id :: Pass). HsWrapper -> Pat (GhcPass id) -> Type -> Pat (GhcPass id) #

mkLHsCmdWrap :: forall (p :: Pass). HsWrapper -> LHsCmd (GhcPass p) -> LHsCmd (GhcPass p) #

mkHsCmdWrap :: forall (p :: Pass). HsWrapper -> HsCmd (GhcPass p) -> HsCmd (GhcPass p) #

mkLHsWrapCo :: forall (id :: Pass). TcCoercionN -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #

mkHsWrapCoR :: forall (id :: Pass). TcCoercionR -> HsExpr (GhcPass id) -> HsExpr (GhcPass id) #

mkHsWrapCo :: forall (id :: Pass). TcCoercionN -> HsExpr (GhcPass id) -> HsExpr (GhcPass id) #

mkHsWrap :: forall (id :: Pass). HsWrapper -> HsExpr (GhcPass id) -> HsExpr (GhcPass id) #

Avoid (HsWrap co (HsWrap co' _)). See Note [Detecting forced eta expansion] in DsExpr

mkLHsWrap :: forall (id :: Pass). HsWrapper -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #

typeToLHsType :: Type -> LHsType GhcPs #

Converting a Type to an HsType RdrName This is needed to implement GeneralizedNewtypeDeriving.

Note that we use getRdrName extensively, which generates Exact RdrNames rather than strings.

mkClassOpSigs :: [LSig GhcPs] -> [LSig GhcPs] #

Convert TypeSig to ClassOpSig The former is what is parsed, but the latter is what we need in class/instance declarations

chunkify :: [a] -> [[a]] #

Split a list into lists that are small enough to have a corresponding tuple arity. The sub-lists of the result all have length <= mAX_TUPLE_SIZE But there may be more than mAX_TUPLE_SIZE sub-lists

mkChunkified #

Arguments

:: ([a] -> a)

"Small" constructor function, of maximum input arity mAX_TUPLE_SIZE

-> [a]

Possible "big" list of things to construct from

-> a

Constructed thing made possible by recursive decomposition

Lifts a "small" constructor into a "big" constructor by recursive decompositon

mkBigLHsVarPatTup :: [IdP GhcRn] -> LPat GhcRn #

The Big equivalents for the source tuple patterns

mkBigLHsTup :: forall (id :: Pass). [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id) #

mkBigLHsVarTup :: forall (id :: Pass). [IdP (GhcPass id)] -> LHsExpr (GhcPass id) #

The Big equivalents for the source tuple expressions

mkLHsVarTuple :: forall (a :: Pass). [IdP (GhcPass a)] -> LHsExpr (GhcPass a) #

mkLHsTupleExpr :: forall (a :: Pass). [LHsExpr (GhcPass a)] -> LHsExpr (GhcPass a) #

nlHsAppKindTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsKind (GhcPass p) -> LHsType (GhcPass p) #

nlHsTyConApp :: forall (p :: Pass). IdP (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p) #

nlHsParTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) #

nlHsFunTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #

nlHsTyVar :: forall (p :: Pass). IdP (GhcPass p) -> LHsType (GhcPass p) #

nlHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #

nlHsIf :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #

Note [Rebindable nlHsIf] nlHsIf should generate if-expressions which are NOT subject to RebindableSyntax, so the first field of HsIf is Nothing. (#12080)

nlHsPar :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #

nlWildPatName :: LPat GhcRn #

Wildcard pattern - after renaming

nlWildPat :: LPat GhcPs #

Wildcard pattern - after parsing

nlNullaryConPat :: forall (p :: Pass). IdP (GhcPass p) -> LPat (GhcPass p) #

nlHsVarApps :: forall (id :: Pass). IdP (GhcPass id) -> [IdP (GhcPass id)] -> LHsExpr (GhcPass id) #

nlHsApps :: forall (id :: Pass). IdP (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id) #

nlHsSyntaxApps :: forall (id :: Pass). SyntaxExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id) #

nlHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #

nlVarPat :: forall (id :: Pass). IdP (GhcPass id) -> LPat (GhcPass id) #

nlHsIntLit :: forall (p :: Pass). Integer -> LHsExpr (GhcPass p) #

nlHsLit :: forall (p :: Pass). HsLit (GhcPass p) -> LHsExpr (GhcPass p) #

nlHsDataCon :: DataCon -> LHsExpr GhcTc #

NB: Only for LHsExpr **Id**

nlHsVar :: forall (id :: Pass). IdP (GhcPass id) -> LHsExpr (GhcPass id) #

mkHsStringPrimLit :: forall (p :: Pass). FastString -> HsLit (GhcPass p) #

mkHsString :: forall (p :: Pass). String -> HsLit (GhcPass p) #

mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs #

A useful function for building OpApps. The operator is always a variable, and we don't know the fixity yet.

mkRecStmt :: forall (idL :: Pass) bodyR. [LStmtLR (GhcPass idL) GhcPs bodyR] -> StmtLR (GhcPass idL) GhcPs bodyR #

emptyRecStmt :: forall (idL :: Pass) bodyR. StmtLR (GhcPass idL) GhcPs bodyR #

mkBindStmt :: forall (idL :: Pass) (idR :: Pass) bodyR. XBindStmt (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR))) ~ NoExtField => LPat (GhcPass idL) -> Located (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR))) #

mkBodyStmt :: forall bodyR (idL :: Pass). Located (bodyR GhcPs) -> StmtLR (GhcPass idL) GhcPs (Located (bodyR GhcPs)) #

mkLastStmt :: forall bodyR (idR :: Pass) (idL :: Pass). Located (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR))) #

mkHsCmdIf :: forall (p :: Pass). LHsExpr (GhcPass p) -> LHsCmd (GhcPass p) -> LHsCmd (GhcPass p) -> HsCmd (GhcPass p) #

mkHsIf :: forall (p :: Pass). LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) -> HsExpr (GhcPass p) #

nlParPat :: forall (name :: Pass). LPat (GhcPass name) -> LPat (GhcPass name) #

mkParPat :: forall (name :: Pass). LPat (GhcPass name) -> LPat (GhcPass name) #

mkLHsPar :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #

Wrap in parens if (hsExprNeedsParens appPrec) says it needs them So 'f x' becomes '(f x)', but '3' stays as '3'

nlHsTyApps :: forall (id :: Pass). IdP (GhcPass id) -> [Type] -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id) #

nlHsTyApp :: forall (id :: Pass). IdP (GhcPass id) -> [Type] -> LHsExpr (GhcPass id) #

mkHsCaseAlt :: forall (p :: Pass) body. LPat (GhcPass p) -> Located (body (GhcPass p)) -> LMatch (GhcPass p) (Located (body (GhcPass p))) #

A simple case alternative with a single pattern, no binds, no guards; pre-typechecking

mkHsLam :: forall (p :: Pass). XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ NoExtField => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) #

mkHsAppType :: forall (id :: Pass). NoGhcTc (GhcPass id) ~ GhcRn => LHsExpr (GhcPass id) -> LHsWcType GhcRn -> LHsExpr (GhcPass id) #

mkHsApp :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #

mkMatchGroup :: XMG name (Located (body name)) ~ NoExtField => Origin -> [LMatch name (Located (body name))] -> MatchGroup name (Located (body name)) #

unguardedRHS :: forall body (p :: Pass). SrcSpan -> Located (body (GhcPass p)) -> [LGRHS (GhcPass p) (Located (body (GhcPass p)))] #

unguardedGRHSs :: forall body (p :: Pass). Located (body (GhcPass p)) -> GRHSs (GhcPass p) (Located (body (GhcPass p))) #

mkSimpleMatch :: forall (p :: Pass) body. HsMatchContext (NameOrRdrName (IdP (GhcPass p))) -> [LPat (GhcPass p)] -> Located (body (GhcPass p)) -> LMatch (GhcPass p) (Located (body (GhcPass p))) #

mkHsPar :: forall (id :: Pass). LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) #

e => (e)

pprStmtInCtxt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Outputable body) => HsStmtContext (IdP (GhcPass idL)) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc #

pprMatchInCtxt :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable (NameOrRdrName (NameOrRdrName (IdP (GhcPass idR)))), Outputable body) => Match (GhcPass idR) body -> SDoc #

isMonadFailStmtContext :: HsStmtContext id -> Bool #

Should pattern match failure in a HsStmtContext be desugared using MonadFail?

pprHsBracket :: forall (p :: Pass). OutputableBndrId p => HsBracket (GhcPass p) -> SDoc #

ppr_splice :: forall (p :: Pass). OutputableBndrId p => SDoc -> IdP (GhcPass p) -> LHsExpr (GhcPass p) -> SDoc -> SDoc #

pprQuals :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body) => [LStmt (GhcPass p) body] -> SDoc #

pprComp :: forall (p :: Pass) body. (OutputableBndrId p, Outputable body) => [LStmt (GhcPass p) body] -> SDoc #

ppr_do_stmts :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Outputable body) => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc #

pprDo :: forall (p :: Pass) body any. (OutputableBndrId p, Outputable body) => HsStmtContext any -> [LStmt (GhcPass p) body] -> SDoc #

pprBy :: Outputable body => Maybe body -> SDoc #

pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc #

pprTransformStmt :: forall (p :: Pass). OutputableBndrId p => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc #

pprArg :: forall (idL :: Pass). OutputableBndrId idL => ApplicativeArg (GhcPass idL) -> SDoc #

pprStmt :: forall (idL :: Pass) (idR :: Pass) body. (OutputableBndrId idL, OutputableBndrId idR, Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc #

pp_rhs :: Outputable body => HsMatchContext idL -> body -> SDoc #

pprGRHS :: forall (idR :: Pass) body idL. (OutputableBndrId idR, Outputable body) => HsMatchContext idL -> GRHS (GhcPass idR) body -> SDoc #

pprGRHSs :: forall (idR :: Pass) body idL. (OutputableBndrId idR, Outputable body) => HsMatchContext idL -> GRHSs (GhcPass idR) body -> SDoc #

pprMatch :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc #

pprMatches :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => MatchGroup (GhcPass idR) body -> SDoc #

hsLMatchPats :: forall (id :: Pass) body. LMatch (GhcPass id) body -> [LPat (GhcPass id)] #

matchGroupArity :: forall (id :: Pass) body. MatchGroup (GhcPass id) body -> Arity #

isSingletonMatchGroup :: [LMatch id body] -> Bool #

Is there only one RHS in this list of matches?

isInfixMatch :: Match id body -> Bool #

pprCmdArg :: forall (p :: Pass). OutputableBndrId p => HsCmdTop (GhcPass p) -> SDoc #

ppr_cmd :: forall (p :: Pass). OutputableBndrId p => HsCmd (GhcPass p) -> SDoc #

ppr_lcmd :: forall (p :: Pass). OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc #

pprCmd :: forall (p :: Pass). OutputableBndrId p => HsCmd (GhcPass p) -> SDoc #

pprLCmd :: forall (p :: Pass). OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc #

parenthesizeHsExpr :: forall (p :: Pass). PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) #

parenthesizeHsExpr p e checks if hsExprNeedsParens p e is true, and if so, surrounds e with an HsPar. Otherwise, it simply returns e.

hsExprNeedsParens :: PprPrec -> HsExpr p -> Bool #

hsExprNeedsParens p e returns True if the expression e needs parentheses under precedence p.

pprParendExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> HsExpr (GhcPass p) -> SDoc #

pprParendLExpr :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc #

ppr_apps :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (LHsWcType (NoGhcTc (GhcPass p)))] -> SDoc #

ppr_expr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> SDoc #

ppr_lexpr :: forall (p :: Pass). OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc #

pprBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc #

mkRnSyntaxExpr :: Name -> SyntaxExpr GhcRn #

Make a 'SyntaxExpr Name' (the "rn" is because this is used in the renamer), missing its HsWrappers.

mkSyntaxExpr :: forall (p :: Pass). HsExpr (GhcPass p) -> SyntaxExpr (GhcPass p) #

Make a 'SyntaxExpr (HsExpr _)', missing its HsWrappers.

noSyntaxExpr :: forall (p :: Pass). SyntaxExpr (GhcPass p) #

noExpr :: forall (p :: Pass). HsExpr (GhcPass p) #

This is used for rebindable-syntax pieces that are too polymorphic for tcSyntaxOp (trS_fmap and the mzip in ParStmt)

type PostTcExpr = HsExpr GhcTc #

Post-Type checking Expression

PostTcExpr is an evidence expression attached to the syntax tree by the type checker (c.f. postTcType).

type PostTcTable = [(Name, PostTcExpr)] #

Post-Type checking Table

We use a PostTcTable where there are a bunch of pieces of evidence, more than is convenient to keep individually.

type CmdSyntaxTable p = [(Name, HsExpr p)] #

Command Syntax Table (for Arrow syntax)

data UnboundVar #

An unbound variable; used for treating out-of-scope variables as expression holes

Either "x", "y" Plain OutOfScope or "_", "_x" A TrueExprHole

Both forms indicate an out-of-scope variable, but the latter indicates that the user expects it to be out of scope, and just wants GHC to report its type

Constructors

OutOfScope OccName GlobalRdrEnv

An (unqualified) out-of-scope variable, together with the GlobalRdrEnv with respect to which it is unbound

TrueExprHole OccName

A "true" expression hole (_ or _x)

Instances

Instances details
Data UnboundVar 
Instance details

Defined in GHC.Hs.Expr

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnboundVar -> c UnboundVar #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnboundVar #

toConstr :: UnboundVar -> Constr #

dataTypeOf :: UnboundVar -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UnboundVar) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnboundVar) #

gmapT :: (forall b. Data b => b -> b) -> UnboundVar -> UnboundVar #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnboundVar -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnboundVar -> r #

gmapQ :: (forall d. Data d => d -> u) -> UnboundVar -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UnboundVar -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnboundVar -> m UnboundVar #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnboundVar -> m UnboundVar #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnboundVar -> m UnboundVar #

Outputable UnboundVar 
Instance details

Defined in GHC.Hs.Expr

data RecordConTc #

Extra data fields for a RecordCon, added by the type checker

data RecordUpdTc #

Extra data fields for a RecordUpd, added by the type checker

Instances

Instances details
Data RecordUpdTc 
Instance details

Defined in GHC.Hs.Expr

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RecordUpdTc -> c RecordUpdTc #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RecordUpdTc #

toConstr :: RecordUpdTc -> Constr #

dataTypeOf :: RecordUpdTc -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RecordUpdTc) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RecordUpdTc) #

gmapT :: (forall b. Data b => b -> b) -> RecordUpdTc -> RecordUpdTc #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RecordUpdTc -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RecordUpdTc -> r #

gmapQ :: (forall d. Data d => d -> u) -> RecordUpdTc -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RecordUpdTc -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RecordUpdTc -> m RecordUpdTc #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RecordUpdTc -> m RecordUpdTc #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RecordUpdTc -> m RecordUpdTc #

type LHsTupArg id = Located (HsTupArg id) #

Located Haskell Tuple Argument

HsTupArg is used for tuple sections (,a,) is represented by ExplicitTuple [Missing ty1, Present a, Missing ty3] Which in turn stands for (x:ty1 y:ty2. (x,a,y))

data HsTupArg id #

Haskell Tuple Argument

Constructors

Present (XPresent id) (LHsExpr id)

The argument

Missing (XMissing id)

The argument is missing, but this is its type

XTupArg (XXTupArg id)

Note [Trees that Grow] extension point

type LHsCmd id = Located (HsCmd id) #

Located Haskell Command (for arrow syntax)

data HsArrAppType #

Haskell Array Application Type

Instances

Instances details
Data HsArrAppType 
Instance details

Defined in GHC.Hs.Expr

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsArrAppType -> c HsArrAppType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsArrAppType #

toConstr :: HsArrAppType -> Constr #

dataTypeOf :: HsArrAppType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsArrAppType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsArrAppType) #

gmapT :: (forall b. Data b => b -> b) -> HsArrAppType -> HsArrAppType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsArrAppType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsArrAppType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType #

type LHsCmdTop p = Located (HsCmdTop p) #

Top-level command, introducing a new arrow. This may occur inside a proc (where the stack is empty) or as an argument of a command-forming operator.

Located Haskell Top-level Command

data HsCmdTop p #

Haskell Top-level Command

Constructors

HsCmdTop (XCmdTop p) (LHsCmd p) 
XCmdTop (XXCmdTop p) 

Instances

Instances details
OutputableBndrId p => Outputable (HsCmdTop (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: HsCmdTop (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsCmdTop (GhcPass p) -> SDoc #

type HsRecordBinds p = HsRecFields p (LHsExpr p) #

Haskell Record Bindings

data MatchGroupTc #

Constructors

MatchGroupTc 

Fields

Instances

Instances details
Data MatchGroupTc 
Instance details

Defined in GHC.Hs.Expr

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroupTc -> c MatchGroupTc #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MatchGroupTc #

toConstr :: MatchGroupTc -> Constr #

dataTypeOf :: MatchGroupTc -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MatchGroupTc) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MatchGroupTc) #

gmapT :: (forall b. Data b => b -> b) -> MatchGroupTc -> MatchGroupTc #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r #

gmapQ :: (forall d. Data d => d -> u) -> MatchGroupTc -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroupTc -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc #

type LMatch id body = Located (Match id body) #

Located Match

May have AnnKeywordId : AnnSemi when in a list

data Match p body #

Constructors

Match 

Fields

XMatch (XXMatch p body) 

Instances

Instances details
(OutputableBndrId pr, Outputable body) => Outputable (Match (GhcPass pr) body) 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: Match (GhcPass pr) body -> SDoc #

pprPrec :: Rational -> Match (GhcPass pr) body -> SDoc #

type LGRHS id body = Located (GRHS id body) #

Located Guarded Right-Hand Side

data GRHS p body #

Guarded Right Hand Side.

Constructors

GRHS (XCGRHS p body) [GuardLStmt p] body 
XGRHS (XXGRHS p body) 

type LStmt id body = Located (StmtLR id id body) #

Located do block Statement

type LStmtLR idL idR body = Located (StmtLR idL idR body) #

Located Statement with separate Left and Right id's

type Stmt id body = StmtLR id id body #

do block Statement

type CmdLStmt id = LStmt id (LHsCmd id) #

Command Located Statement

type CmdStmt id = Stmt id (LHsCmd id) #

Command Statement

type ExprLStmt id = LStmt id (LHsExpr id) #

Expression Located Statement

type ExprStmt id = Stmt id (LHsExpr id) #

Expression Statement

type GuardLStmt id = LStmt id (LHsExpr id) #

Guard Located Statement

type GuardStmt id = Stmt id (LHsExpr id) #

Guard Statement

type GhciLStmt id = LStmt id (LHsExpr id) #

Ghci Located Statement

type GhciStmt id = Stmt id (LHsExpr id) #

Ghci Statement

data StmtLR idL idR body #

API Annotations when in qualifier lists or guards - AnnKeywordId : AnnVbar, AnnComma,AnnThen, AnnBy,AnnBy, AnnGroup,AnnUsing

Constructors

LastStmt (XLastStmt idL idR body) body Bool (SyntaxExpr idR) 
BindStmt (XBindStmt idL idR body) (LPat idL) body (SyntaxExpr idR) (SyntaxExpr idR) 
ApplicativeStmt (XApplicativeStmt idL idR body) [(SyntaxExpr idR, ApplicativeArg idL)] (Maybe (SyntaxExpr idR))

ApplicativeStmt represents an applicative expression built with <$> and <*>. It is generated by the renamer, and is desugared into the appropriate applicative expression by the desugarer, but it is intended to be invisible in error messages.

For full details, see Note [ApplicativeDo] in RnExpr

BodyStmt (XBodyStmt idL idR body) body (SyntaxExpr idR) (SyntaxExpr idR) 
LetStmt (XLetStmt idL idR body) (LHsLocalBindsLR idL idR)
ParStmt (XParStmt idL idR body) [ParStmtBlock idL idR] (HsExpr idR) (SyntaxExpr idR) 
TransStmt 

Fields

RecStmt

Fields

XStmtLR (XXStmtLR idL idR body) 

Instances

Instances details
(OutputableBndrId pl, OutputableBndrId pr, Outputable body) => Outputable (StmtLR (GhcPass pl) (GhcPass pr) body) 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: StmtLR (GhcPass pl) (GhcPass pr) body -> SDoc #

pprPrec :: Rational -> StmtLR (GhcPass pl) (GhcPass pr) body -> SDoc #

data TransForm #

Constructors

ThenForm 
GroupForm 

Instances

Instances details
Data TransForm 
Instance details

Defined in GHC.Hs.Expr

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TransForm -> c TransForm #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TransForm #

toConstr :: TransForm -> Constr #

dataTypeOf :: TransForm -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TransForm) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TransForm) #

gmapT :: (forall b. Data b => b -> b) -> TransForm -> TransForm #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TransForm -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TransForm -> r #

gmapQ :: (forall d. Data d => d -> u) -> TransForm -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TransForm -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TransForm -> m TransForm #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TransForm -> m TransForm #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TransForm -> m TransForm #

data ParStmtBlock idL idR #

Parenthesised Statement Block

Constructors

ParStmtBlock (XParStmtBlock idL idR) [ExprLStmt idL] [IdP idR] (SyntaxExpr idR) 
XParStmtBlock (XXParStmtBlock idL idR) 

Instances

Instances details
(Outputable (StmtLR idL idL (LHsExpr idL)), Outputable (XXParStmtBlock idL idR)) => Outputable (ParStmtBlock idL idR) 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: ParStmtBlock idL idR -> SDoc #

pprPrec :: Rational -> ParStmtBlock idL idR -> SDoc #

data ApplicativeArg idL #

Applicative Argument

Instances

Instances details
OutputableBndrId idL => Outputable (ApplicativeArg (GhcPass idL)) 
Instance details

Defined in GHC.Hs.Expr

data SpliceDecoration #

A splice can appear with various decorations wrapped around it. This data type captures explicitly how it was originally written, for use in the pretty printer.

Constructors

HasParens

$( splice ) or $$( splice )

HasDollar

$splice or $$splice

NoParens

bare splice

Instances

Instances details
Eq SpliceDecoration 
Instance details

Defined in GHC.Hs.Expr

Data SpliceDecoration 
Instance details

Defined in GHC.Hs.Expr

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpliceDecoration -> c SpliceDecoration #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SpliceDecoration #

toConstr :: SpliceDecoration -> Constr #

dataTypeOf :: SpliceDecoration -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SpliceDecoration) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SpliceDecoration) #

gmapT :: (forall b. Data b => b -> b) -> SpliceDecoration -> SpliceDecoration #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpliceDecoration -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpliceDecoration -> r #

gmapQ :: (forall d. Data d => d -> u) -> SpliceDecoration -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SpliceDecoration -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpliceDecoration -> m SpliceDecoration #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceDecoration -> m SpliceDecoration #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceDecoration -> m SpliceDecoration #

Show SpliceDecoration 
Instance details

Defined in GHC.Hs.Expr

Outputable SpliceDecoration 
Instance details

Defined in GHC.Hs.Expr

newtype ThModFinalizers #

Finalizers produced by a splice with addModFinalizer

See Note [Delaying modFinalizers in untyped splices] in RnSplice. For how this is used.

Constructors

ThModFinalizers [ForeignRef (Q ())] 

Instances

Instances details
Data ThModFinalizers 
Instance details

Defined in GHC.Hs.Expr

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ThModFinalizers -> c ThModFinalizers #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ThModFinalizers #

toConstr :: ThModFinalizers -> Constr #

dataTypeOf :: ThModFinalizers -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ThModFinalizers) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ThModFinalizers) #

gmapT :: (forall b. Data b => b -> b) -> ThModFinalizers -> ThModFinalizers #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ThModFinalizers -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ThModFinalizers -> r #

gmapQ :: (forall d. Data d => d -> u) -> ThModFinalizers -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ThModFinalizers -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ThModFinalizers -> m ThModFinalizers #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ThModFinalizers -> m ThModFinalizers #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ThModFinalizers -> m ThModFinalizers #

data DelayedSplice #

Instances

Instances details
Data DelayedSplice 
Instance details

Defined in GHC.Hs.Expr

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DelayedSplice -> c DelayedSplice #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DelayedSplice #

toConstr :: DelayedSplice -> Constr #

dataTypeOf :: DelayedSplice -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DelayedSplice) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DelayedSplice) #

gmapT :: (forall b. Data b => b -> b) -> DelayedSplice -> DelayedSplice #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DelayedSplice -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DelayedSplice -> r #

gmapQ :: (forall d. Data d => d -> u) -> DelayedSplice -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DelayedSplice -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DelayedSplice -> m DelayedSplice #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DelayedSplice -> m DelayedSplice #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DelayedSplice -> m DelayedSplice #

data HsSplicedThing id #

Haskell Spliced Thing

Values that can result from running a splice.

Constructors

HsSplicedExpr (HsExpr id)

Haskell Spliced Expression

HsSplicedTy (HsType id)

Haskell Spliced Type

HsSplicedPat (Pat id)

Haskell Spliced Pattern

Instances

Instances details
OutputableBndrId p => Outputable (HsSplicedThing (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

data PendingRnSplice #

Pending Renamer Splice

Instances

Instances details
Outputable PendingRnSplice 
Instance details

Defined in GHC.Hs.Expr

data UntypedSpliceFlavour #

Instances

Instances details
Data UntypedSpliceFlavour 
Instance details

Defined in GHC.Hs.Expr

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UntypedSpliceFlavour -> c UntypedSpliceFlavour #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UntypedSpliceFlavour #

toConstr :: UntypedSpliceFlavour -> Constr #

dataTypeOf :: UntypedSpliceFlavour -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UntypedSpliceFlavour) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UntypedSpliceFlavour) #

gmapT :: (forall b. Data b => b -> b) -> UntypedSpliceFlavour -> UntypedSpliceFlavour #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r #

gmapQ :: (forall d. Data d => d -> u) -> UntypedSpliceFlavour -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UntypedSpliceFlavour -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UntypedSpliceFlavour -> m UntypedSpliceFlavour #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UntypedSpliceFlavour -> m UntypedSpliceFlavour #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UntypedSpliceFlavour -> m UntypedSpliceFlavour #

data PendingTcSplice #

Pending Type-checker Splice

Instances

Instances details
Outputable PendingTcSplice 
Instance details

Defined in GHC.Hs.Expr

data HsBracket p #

Haskell Bracket

Constructors

ExpBr (XExpBr p) (LHsExpr p) 
PatBr (XPatBr p) (LPat p) 
DecBrL (XDecBrL p) [LHsDecl p] 
DecBrG (XDecBrG p) (HsGroup p) 
TypBr (XTypBr p) (LHsType p) 
VarBr (XVarBr p) Bool (IdP p) 
TExpBr (XTExpBr p) (LHsExpr p) 
XBracket (XXBracket p) 

Instances

Instances details
OutputableBndrId p => Outputable (HsBracket (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

data ArithSeqInfo id #

Arithmetic Sequence Information

Constructors

From (LHsExpr id) 
FromThen (LHsExpr id) (LHsExpr id) 
FromTo (LHsExpr id) (LHsExpr id) 
FromThenTo (LHsExpr id) (LHsExpr id) (LHsExpr id) 

Instances

Instances details
OutputableBndrId p => Outputable (ArithSeqInfo (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

data HsMatchContext id #

Haskell Match Context

Context of a pattern match. This is more subtle than it would seem. See Note [Varieties of pattern matches].

Constructors

FunRhs

A pattern matching on an argument of a function binding

Fields

LambdaExpr

Patterns of a lambda

CaseAlt

Patterns and guards on a case alternative

IfAlt

Guards of a multi-way if alternative

ProcExpr

Patterns of a proc

PatBindRhs

A pattern binding eg [y] <- e = e

PatBindGuards

Guards of pattern bindings, e.g., (Just b) | Just _ <- x = e | otherwise = e'

RecUpd

Record update [used only in DsExpr to tell matchWrapper what sort of runtime error message to generate]

StmtCtxt (HsStmtContext id)

Pattern of a do-stmt, list comprehension, pattern guard, etc

ThPatSplice

A Template Haskell pattern splice

ThPatQuote

A Template Haskell pattern quotation [p| (a,b) |]

PatSyn

A pattern synonym declaration

Instances

Instances details
Functor HsMatchContext 
Instance details

Defined in GHC.Hs.Expr

Methods

fmap :: (a -> b) -> HsMatchContext a -> HsMatchContext b #

(<$) :: a -> HsMatchContext b -> HsMatchContext a #

Data id => Data (HsMatchContext id) 
Instance details

Defined in GHC.Hs.Expr

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsMatchContext id -> c (HsMatchContext id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsMatchContext id) #

toConstr :: HsMatchContext id -> Constr #

dataTypeOf :: HsMatchContext id -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsMatchContext id)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsMatchContext id)) #

gmapT :: (forall b. Data b => b -> b) -> HsMatchContext id -> HsMatchContext id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsMatchContext id -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsMatchContext id -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsMatchContext id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsMatchContext id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsMatchContext id -> m (HsMatchContext id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsMatchContext id -> m (HsMatchContext id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsMatchContext id -> m (HsMatchContext id) #

OutputableBndr id => Outputable (HsMatchContext id) 
Instance details

Defined in GHC.Hs.Expr

data HsStmtContext id #

Haskell Statement Context. It expects to be parameterised with one of RdrName, Name or Id

Constructors

ListComp 
MonadComp 
DoExpr

do { ... }

MDoExpr

mdo { ... } ie recursive do-expression

ArrowExpr

do-notation in an arrow-command context

GhciStmtCtxt

A command-line Stmt in GHCi pat <- rhs

PatGuard (HsMatchContext id)

Pattern guard for specified thing

ParStmtCtxt (HsStmtContext id)

A branch of a parallel stmt

TransStmtCtxt (HsStmtContext id)

A branch of a transform stmt

Instances

Instances details
Functor HsStmtContext 
Instance details

Defined in GHC.Hs.Expr

Methods

fmap :: (a -> b) -> HsStmtContext a -> HsStmtContext b #

(<$) :: a -> HsStmtContext b -> HsStmtContext a #

Data id => Data (HsStmtContext id) 
Instance details

Defined in GHC.Hs.Expr

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsStmtContext id -> c (HsStmtContext id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsStmtContext id) #

toConstr :: HsStmtContext id -> Constr #

dataTypeOf :: HsStmtContext id -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsStmtContext id)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsStmtContext id)) #

gmapT :: (forall b. Data b => b -> b) -> HsStmtContext id -> HsStmtContext id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsStmtContext id -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsStmtContext id -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsStmtContext id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsStmtContext id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsStmtContext id -> m (HsStmtContext id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsStmtContext id -> m (HsStmtContext id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsStmtContext id -> m (HsStmtContext id) #

(Outputable (GhcPass p), Outputable (NameOrRdrName (GhcPass p))) => Outputable (HsStmtContext (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

roleAnnotDeclName :: forall (p :: Pass). RoleAnnotDecl (GhcPass p) -> IdP (GhcPass p) #

mapDerivStrategy :: forall p (pass :: Pass). p ~ GhcPass pass => (XViaStrategy p -> XViaStrategy p) -> DerivStrategy p -> DerivStrategy p #

Map over the via type if dealing with ViaStrategy. Otherwise, return the DerivStrategy unchanged.

foldDerivStrategy :: forall p (pass :: Pass) r. p ~ GhcPass pass => r -> (XViaStrategy p -> r) -> DerivStrategy p -> r #

Eliminate a DerivStrategy.

derivStrategyName :: DerivStrategy a -> SDoc #

A short description of a DerivStrategy'.

getConNames :: forall (p :: Pass). ConDecl (GhcPass p) -> [Located (IdP (GhcPass p))] #

resultVariableName :: forall (a :: Pass). FamilyResultSig (GhcPass a) -> Maybe (IdP (GhcPass a)) #

Maybe return name of the result type variable

pprTyClDeclFlavour :: forall (p :: Pass). TyClDecl (GhcPass p) -> SDoc #

hsDeclHasCusk :: TyClDecl GhcRn -> Bool #

Does this declaration have a complete, user-supplied kind signature? See Note [CUSKs: complete user-supplied kind signatures]

countTyClDecls :: [TyClDecl pass] -> (Int, Int, Int, Int, Int) #

tcdName :: TyClDecl pass -> IdP pass #

tyClDeclLName :: TyClDecl pass -> Located (IdP pass) #

tyFamInstDeclName :: forall (p :: Pass). TyFamInstDecl (GhcPass p) -> IdP (GhcPass p) #

isDataFamilyDecl :: TyClDecl pass -> Bool #

data family declaration

isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool #

closed type family info

isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool #

open type family info

isTypeFamilyDecl :: TyClDecl pass -> Bool #

type family declaration

isFamilyDecl :: TyClDecl pass -> Bool #

type/data family declaration

isClassDecl :: TyClDecl pass -> Bool #

type class

isSynDecl :: TyClDecl pass -> Bool #

type or type instance declaration

isDataDecl :: TyClDecl pass -> Bool #

True = argument is a data/newtype declaration.

appendGroups :: forall (p :: Pass). HsGroup (GhcPass p) -> HsGroup (GhcPass p) -> HsGroup (GhcPass p) #

emptyRnGroup :: forall (p :: Pass). HsGroup (GhcPass p) #

emptyRdrGroup :: forall (p :: Pass). HsGroup (GhcPass p) #

type LHsDecl p #

Arguments

 = Located (HsDecl p)

When in a list this may have

data HsDecl p #

A Haskell Declaration

Constructors

TyClD (XTyClD p) (TyClDecl p)

Type or Class Declaration

InstD (XInstD p) (InstDecl p)

Instance declaration

DerivD (XDerivD p) (DerivDecl p)

Deriving declaration

ValD (XValD p) (HsBind p)

Value declaration

SigD (XSigD p) (Sig p)

Signature declaration

KindSigD (XKindSigD p) (StandaloneKindSig p)

Standalone kind signature

DefD (XDefD p) (DefaultDecl p)

'default' declaration

ForD (XForD p) (ForeignDecl p)

Foreign declaration

WarningD (XWarningD p) (WarnDecls p)

Warning declaration

AnnD (XAnnD p) (AnnDecl p)

Annotation declaration

RuleD (XRuleD p) (RuleDecls p)

Rule declaration

SpliceD (XSpliceD p) (SpliceDecl p)

Splice declaration (Includes quasi-quotes)

DocD (XDocD p) DocDecl

Documentation comment declaration

RoleAnnotD (XRoleAnnotD p) (RoleAnnotDecl p)

Role annotation declaration

XHsDecl (XXHsDecl p) 

Instances

Instances details
OutputableBndrId p => Outputable (HsDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: HsDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsDecl (GhcPass p) -> SDoc #

data HsGroup p #

Haskell Group

A HsDecl is categorised into a HsGroup before being fed to the renamer.

Instances

Instances details
OutputableBndrId p => Outputable (HsGroup (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: HsGroup (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsGroup (GhcPass p) -> SDoc #

type LSpliceDecl pass = Located (SpliceDecl pass) #

Located Splice Declaration

data SpliceDecl p #

Splice Declaration

Instances

Instances details
OutputableBndrId p => Outputable (SpliceDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LTyClDecl pass = Located (TyClDecl pass) #

Located Declaration of a Type or Class

data TyClDecl pass #

A type or class declaration.

Constructors

FamDecl
type/data family T :: *->*

Fields

SynDecl

type declaration

Fields

DataDecl

data declaration

Fields

ClassDecl

Fields

XTyClDecl (XXTyClDecl pass) 

Instances

Instances details
OutputableBndrId p => Outputable (TyClDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: TyClDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> TyClDecl (GhcPass p) -> SDoc #

type LHsFunDep pass = Located (FunDep (Located (IdP pass))) #

data DataDeclRn #

Constructors

DataDeclRn 

Fields

Instances

Instances details
Data DataDeclRn 
Instance details

Defined in GHC.Hs.Decls

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataDeclRn -> c DataDeclRn #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DataDeclRn #

toConstr :: DataDeclRn -> Constr #

dataTypeOf :: DataDeclRn -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DataDeclRn) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DataDeclRn) #

gmapT :: (forall b. Data b => b -> b) -> DataDeclRn -> DataDeclRn #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataDeclRn -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataDeclRn -> r #

gmapQ :: (forall d. Data d => d -> u) -> DataDeclRn -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DataDeclRn -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataDeclRn -> m DataDeclRn #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataDeclRn -> m DataDeclRn #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataDeclRn -> m DataDeclRn #

data TyClGroup pass #

Type or Class Group

Instances

Instances details
OutputableBndrId p => Outputable (TyClGroup (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LFamilyResultSig pass = Located (FamilyResultSig pass) #

Located type Family Result Signature

type LFamilyDecl pass = Located (FamilyDecl pass) #

Located type Family Declaration

data FamilyDecl pass #

type Family Declaration

Instances

Instances details
OutputableBndrId p => Outputable (FamilyDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LInjectivityAnn pass = Located (InjectivityAnn pass) #

Located Injectivity Annotation

data InjectivityAnn pass #

If the user supplied an injectivity annotation it is represented using InjectivityAnn. At the moment this is a single injectivity condition - see Note [Injectivity annotation]. `Located name` stores the LHS of injectivity condition. `[Located name]` stores the RHS of injectivity condition. Example:

type family Foo a b c = r | r -> a c where ...

This will be represented as "InjectivityAnn r [a, c]"

data FamilyInfo pass #

Constructors

DataFamily 
OpenTypeFamily 
ClosedTypeFamily (Maybe [LTyFamInstEqn pass])

Nothing if we're in an hs-boot file and the user said "type family Foo x where .."

Instances

Instances details
Outputable (FamilyInfo pass) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: FamilyInfo pass -> SDoc #

pprPrec :: Rational -> FamilyInfo pass -> SDoc #

data HsDataDefn pass #

Haskell Data type Definition

Constructors

HsDataDefn

Declares a data type or newtype, giving its constructors data/newtype T a = constrs data/newtype instance T [a] = constrs

Fields

XHsDataDefn (XXHsDataDefn pass) 

Instances

Instances details
OutputableBndrId p => Outputable (HsDataDefn (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type HsDeriving pass #

Arguments

 = Located [LHsDerivingClause pass]

The optional deriving clauses of a data declaration. Clauses is plural because one can specify multiple deriving clauses using the -XDerivingStrategies language extension.

The list of LHsDerivingClauses corresponds to exactly what the user requested to derive, in order. If no deriving clauses were specified, the list is empty.

Haskell Deriving clause

data HsDerivingClause pass #

A single deriving clause of a data declaration.

Constructors

HsDerivingClause 

Fields

XHsDerivingClause (XXHsDerivingClause pass) 

Instances

Instances details
OutputableBndrId p => Outputable (HsDerivingClause (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LStandaloneKindSig pass = Located (StandaloneKindSig pass) #

Located Standalone Kind Signature

data StandaloneKindSig pass #

Instances

Instances details
OutputableBndrId p => Outputable (StandaloneKindSig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

data NewOrData #

Constructors

NewType
newtype Blah ...
DataType
data Blah ...

Instances

Instances details
Eq NewOrData 
Instance details

Defined in GHC.Hs.Decls

Data NewOrData 
Instance details

Defined in GHC.Hs.Decls

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NewOrData -> c NewOrData #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NewOrData #

toConstr :: NewOrData -> Constr #

dataTypeOf :: NewOrData -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NewOrData) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewOrData) #

gmapT :: (forall b. Data b => b -> b) -> NewOrData -> NewOrData #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NewOrData -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NewOrData -> r #

gmapQ :: (forall d. Data d => d -> u) -> NewOrData -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NewOrData -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData #

Outputable NewOrData 
Instance details

Defined in GHC.Hs.Decls

type LConDecl pass #

Arguments

 = Located (ConDecl pass)

May have AnnKeywordId : AnnSemi when in a GADT constructor list

Located data Constructor Declaration

data ConDecl pass #

data T b = forall a. Eq a => MkT a b
  MkT :: forall b a. Eq a => MkT a b

data T b where
     MkT1 :: Int -> T Int

data T = Int MkT Int
       | MkT2

data T a where
     Int MkT Int :: T Int

data Constructor Declaration

Constructors

ConDeclGADT 

Fields

ConDeclH98 

Fields

XConDecl (XXConDecl pass) 

Instances

Instances details
OutputableBndrId p => Outputable (ConDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: ConDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> ConDecl (GhcPass p) -> SDoc #

type HsConDeclDetails pass = HsConDetails (LBangType pass) (Located [LConDeclField pass]) #

Haskell data Constructor Declaration Details

type LTyFamInstEqn pass #

Arguments

 = Located (TyFamInstEqn pass)

May have AnnKeywordId : AnnSemi when in a list

Located Type Family Instance Equation

type HsTyPats pass = [LHsTypeArg pass] #

Haskell Type Patterns

type TyFamInstEqn pass = FamInstEqn pass (LHsType pass) #

Type Family Instance Equation

type TyFamDefltDecl = TyFamInstDecl #

Type family default declarations. A convenient synonym for TyFamInstDecl. See Note [Type family instance declarations in HsSyn].

type LTyFamDefltDecl pass = Located (TyFamDefltDecl pass) #

Located type family default declarations.

type LTyFamInstDecl pass = Located (TyFamInstDecl pass) #

Located Type Family Instance Declaration

newtype TyFamInstDecl pass #

Type Family Instance Declaration

Instances

Instances details
OutputableBndrId p => Outputable (TyFamInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LDataFamInstDecl pass = Located (DataFamInstDecl pass) #

Located Data Family Instance Declaration

newtype DataFamInstDecl pass #

Data Family Instance Declaration

Instances

Instances details
OutputableBndrId p => Outputable (DataFamInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LFamInstEqn pass rhs = Located (FamInstEqn pass rhs) #

Located Family Instance Equation

type FamInstEqn pass rhs #

Arguments

 = HsImplicitBndrs pass (FamEqn pass rhs)

Here, the pats are type patterns (with kind and type bndrs). See Note [Family instance declaration binders]

Family Instance Equation

data FamEqn pass rhs #

Family Equation

One equation in a type family instance declaration, data family instance declaration, or type family default. See Note [Type family instance declarations in HsSyn] See Note [Family instance declaration binders]

Constructors

FamEqn

Fields

XFamEqn (XXFamEqn pass rhs) 

type LClsInstDecl pass = Located (ClsInstDecl pass) #

Located Class Instance Declaration

type LInstDecl pass = Located (InstDecl pass) #

Located Instance Declaration

data InstDecl pass #

Instance Declaration

Instances

Instances details
OutputableBndrId p => Outputable (InstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: InstDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> InstDecl (GhcPass p) -> SDoc #

type LDerivDecl pass = Located (DerivDecl pass) #

Located stand-alone 'deriving instance' declaration

data DerivDecl pass #

Stand-alone 'deriving instance' declaration

Constructors

DerivDecl 

Fields

XDerivDecl (XXDerivDecl pass) 

Instances

Instances details
OutputableBndrId p => Outputable (DerivDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

data DerivStrategy pass #

Which technique the user explicitly requested when deriving an instance.

Constructors

StockStrategy

GHC's "standard" strategy, which is to implement a custom instance for the data type. This only works for certain types that GHC knows about (e.g., Eq, Show, Functor when -XDeriveFunctor is enabled, etc.)

AnyclassStrategy
-XDeriveAnyClass
NewtypeStrategy
-XGeneralizedNewtypeDeriving
ViaStrategy (XViaStrategy pass)
-XDerivingVia

Instances

Instances details
OutputableBndrId p => Outputable (DerivStrategy (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LDefaultDecl pass = Located (DefaultDecl pass) #

Located Default Declaration

data DefaultDecl pass #

Default Declaration

Instances

Instances details
OutputableBndrId p => Outputable (DefaultDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LForeignDecl pass = Located (ForeignDecl pass) #

Located Foreign Declaration

data ForeignDecl pass #

Foreign Declaration

Instances

Instances details
OutputableBndrId p => Outputable (ForeignDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

data ForeignImport #

Instances

Instances details
Data ForeignImport 
Instance details

Defined in GHC.Hs.Decls

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignImport -> c ForeignImport #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ForeignImport #

toConstr :: ForeignImport -> Constr #

dataTypeOf :: ForeignImport -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ForeignImport) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForeignImport) #

gmapT :: (forall b. Data b => b -> b) -> ForeignImport -> ForeignImport #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport -> r #

gmapQ :: (forall d. Data d => d -> u) -> ForeignImport -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignImport -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignImport -> m ForeignImport #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport -> m ForeignImport #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport -> m ForeignImport #

Outputable ForeignImport 
Instance details

Defined in GHC.Hs.Decls

data CImportSpec #

Instances

Instances details
Data CImportSpec 
Instance details

Defined in GHC.Hs.Decls

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CImportSpec -> c CImportSpec #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CImportSpec #

toConstr :: CImportSpec -> Constr #

dataTypeOf :: CImportSpec -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CImportSpec) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CImportSpec) #

gmapT :: (forall b. Data b => b -> b) -> CImportSpec -> CImportSpec #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec -> r #

gmapQ :: (forall d. Data d => d -> u) -> CImportSpec -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CImportSpec -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec #

data ForeignExport #

Instances

Instances details
Data ForeignExport 
Instance details

Defined in GHC.Hs.Decls

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignExport -> c ForeignExport #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ForeignExport #

toConstr :: ForeignExport -> Constr #

dataTypeOf :: ForeignExport -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ForeignExport) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForeignExport) #

gmapT :: (forall b. Data b => b -> b) -> ForeignExport -> ForeignExport #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport -> r #

gmapQ :: (forall d. Data d => d -> u) -> ForeignExport -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignExport -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignExport -> m ForeignExport #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport -> m ForeignExport #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport -> m ForeignExport #

Outputable ForeignExport 
Instance details

Defined in GHC.Hs.Decls

type LRuleDecls pass = Located (RuleDecls pass) #

Located Rule Declarations

data RuleDecls pass #

Rule Declarations

Constructors

HsRules 

Fields

XRuleDecls (XXRuleDecls pass) 

Instances

Instances details
OutputableBndrId p => Outputable (RuleDecls (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LRuleDecl pass = Located (RuleDecl pass) #

Located Rule Declaration

data RuleDecl pass #

Rule Declaration

Constructors

HsRule

Fields

XRuleDecl (XXRuleDecl pass) 

Instances

Instances details
OutputableBndrId p => Outputable (RuleDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: RuleDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> RuleDecl (GhcPass p) -> SDoc #

data HsRuleRn #

Constructors

HsRuleRn NameSet NameSet 

Instances

Instances details
Data HsRuleRn 
Instance details

Defined in GHC.Hs.Decls

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsRuleRn -> c HsRuleRn #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsRuleRn #

toConstr :: HsRuleRn -> Constr #

dataTypeOf :: HsRuleRn -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsRuleRn) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsRuleRn) #

gmapT :: (forall b. Data b => b -> b) -> HsRuleRn -> HsRuleRn #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsRuleRn -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsRuleRn -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsRuleRn -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsRuleRn -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsRuleRn -> m HsRuleRn #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRuleRn -> m HsRuleRn #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRuleRn -> m HsRuleRn #

type LRuleBndr pass = Located (RuleBndr pass) #

Located Rule Binder

data RuleBndr pass #

Rule Binder

Instances

Instances details
OutputableBndrId p => Outputable (RuleBndr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: RuleBndr (GhcPass p) -> SDoc #

pprPrec :: Rational -> RuleBndr (GhcPass p) -> SDoc #

type LDocDecl = Located DocDecl #

Located Documentation comment Declaration

data DocDecl #

Documentation comment Declaration

Instances

Instances details
Data DocDecl 
Instance details

Defined in GHC.Hs.Decls

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DocDecl -> c DocDecl #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DocDecl #

toConstr :: DocDecl -> Constr #

dataTypeOf :: DocDecl -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DocDecl) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DocDecl) #

gmapT :: (forall b. Data b => b -> b) -> DocDecl -> DocDecl #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DocDecl -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DocDecl -> r #

gmapQ :: (forall d. Data d => d -> u) -> DocDecl -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DocDecl -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DocDecl -> m DocDecl #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DocDecl -> m DocDecl #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DocDecl -> m DocDecl #

Outputable DocDecl 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: DocDecl -> SDoc #

pprPrec :: Rational -> DocDecl -> SDoc #

type LWarnDecls pass = Located (WarnDecls pass) #

Located Warning Declarations

data WarnDecls pass #

Warning pragma Declarations

Constructors

Warnings 

Fields

XWarnDecls (XXWarnDecls pass) 

Instances

Instances details
OutputableBndr (IdP (GhcPass p)) => Outputable (WarnDecls (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LWarnDecl pass = Located (WarnDecl pass) #

Located Warning pragma Declaration

data WarnDecl pass #

Warning pragma Declaration

Constructors

XWarnDecl (XXWarnDecl pass) 

Instances

Instances details
OutputableBndr (IdP (GhcPass p)) => Outputable (WarnDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: WarnDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> WarnDecl (GhcPass p) -> SDoc #

type LAnnDecl pass = Located (AnnDecl pass) #

Located Annotation Declaration

data AnnDecl pass #

Annotation Declaration

Instances

Instances details
OutputableBndrId p => Outputable (AnnDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: AnnDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> AnnDecl (GhcPass p) -> SDoc #

data AnnProvenance name #

Annotation Provenance

Instances

Instances details
Functor AnnProvenance 
Instance details

Defined in GHC.Hs.Decls

Methods

fmap :: (a -> b) -> AnnProvenance a -> AnnProvenance b #

(<$) :: a -> AnnProvenance b -> AnnProvenance a #

Foldable AnnProvenance 
Instance details

Defined in GHC.Hs.Decls

Methods

fold :: Monoid m => AnnProvenance m -> m #

foldMap :: Monoid m => (a -> m) -> AnnProvenance a -> m #

foldMap' :: Monoid m => (a -> m) -> AnnProvenance a -> m #

foldr :: (a -> b -> b) -> b -> AnnProvenance a -> b #

foldr' :: (a -> b -> b) -> b -> AnnProvenance a -> b #

foldl :: (b -> a -> b) -> b -> AnnProvenance a -> b #

foldl' :: (b -> a -> b) -> b -> AnnProvenance a -> b #

foldr1 :: (a -> a -> a) -> AnnProvenance a -> a #

foldl1 :: (a -> a -> a) -> AnnProvenance a -> a #

toList :: AnnProvenance a -> [a] #

null :: AnnProvenance a -> Bool #

length :: AnnProvenance a -> Int #

elem :: Eq a => a -> AnnProvenance a -> Bool #

maximum :: Ord a => AnnProvenance a -> a #

minimum :: Ord a => AnnProvenance a -> a #

sum :: Num a => AnnProvenance a -> a #

product :: Num a => AnnProvenance a -> a #

Traversable AnnProvenance 
Instance details

Defined in GHC.Hs.Decls

Methods

traverse :: Applicative f => (a -> f b) -> AnnProvenance a -> f (AnnProvenance b) #

sequenceA :: Applicative f => AnnProvenance (f a) -> f (AnnProvenance a) #

mapM :: Monad m => (a -> m b) -> AnnProvenance a -> m (AnnProvenance b) #

sequence :: Monad m => AnnProvenance (m a) -> m (AnnProvenance a) #

Data pass => Data (AnnProvenance pass) 
Instance details

Defined in GHC.Hs.Decls

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnProvenance pass -> c (AnnProvenance pass) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (AnnProvenance pass) #

toConstr :: AnnProvenance pass -> Constr #

dataTypeOf :: AnnProvenance pass -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (AnnProvenance pass)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (AnnProvenance pass)) #

gmapT :: (forall b. Data b => b -> b) -> AnnProvenance pass -> AnnProvenance pass #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnProvenance pass -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnProvenance pass -> r #

gmapQ :: (forall d. Data d => d -> u) -> AnnProvenance pass -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnProvenance pass -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnProvenance pass -> m (AnnProvenance pass) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnProvenance pass -> m (AnnProvenance pass) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnProvenance pass -> m (AnnProvenance pass) #

type LRoleAnnotDecl pass = Located (RoleAnnotDecl pass) #

Located Role Annotation Declaration

data RoleAnnotDecl pass #

Role Annotation Declaration

Instances

Instances details
OutputableBndr (IdP (GhcPass p)) => Outputable (RoleAnnotDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

parenthesizePat :: forall (p :: Pass). PprPrec -> LPat (GhcPass p) -> LPat (GhcPass p) #

parenthesizePat p pat checks if patNeedsParens p pat is true, and if so, surrounds pat with a ParPat. Otherwise, it simply returns pat.

patNeedsParens :: PprPrec -> Pat p -> Bool #

patNeedsParens p pat returns True if the pattern pat needs parentheses under precedence p.

isIrrefutableHsPat :: forall (p :: Pass). OutputableBndrId p => LPat (GhcPass p) -> Bool #

looksLazyPatBind :: forall (p :: Pass). HsBind (GhcPass p) -> Bool #

isBangedLPat :: forall (p :: Pass). LPat (GhcPass p) -> Bool #

mkCharLitPat :: forall (p :: Pass). SourceText -> Char -> OutPat (GhcPass p) #

mkNilPat :: forall (p :: Pass). Type -> OutPat (GhcPass p) #

mkPrefixConPat :: forall (p :: Pass). DataCon -> [OutPat (GhcPass p)] -> [Type] -> OutPat (GhcPass p) #

pprParendLPat :: forall (p :: Pass). OutputableBndrId p => PprPrec -> LPat (GhcPass p) -> SDoc #

hsRecFieldsArgs :: HsRecFields p arg -> [arg] #

type InPat p = LPat p #

type OutPat p = LPat p #

type HsConPatDetails p = HsConDetails (LPat p) (HsRecFields p (LPat p)) #

Haskell Constructor Pattern Details

data HsRecFields p arg #

Haskell Record Fields

HsRecFields is used only for patterns and expressions (not data type declarations)

Constructors

HsRecFields 

Fields

Instances

Instances details
Functor (HsRecFields p) 
Instance details

Defined in GHC.Hs.Pat

Methods

fmap :: (a -> b) -> HsRecFields p a -> HsRecFields p b #

(<$) :: a -> HsRecFields p b -> HsRecFields p a #

Foldable (HsRecFields p) 
Instance details

Defined in GHC.Hs.Pat

Methods

fold :: Monoid m => HsRecFields p m -> m #

foldMap :: Monoid m => (a -> m) -> HsRecFields p a -> m #

foldMap' :: Monoid m => (a -> m) -> HsRecFields p a -> m #

foldr :: (a -> b -> b) -> b -> HsRecFields p a -> b #

foldr' :: (a -> b -> b) -> b -> HsRecFields p a -> b #

foldl :: (b -> a -> b) -> b -> HsRecFields p a -> b #

foldl' :: (b -> a -> b) -> b -> HsRecFields p a -> b #

foldr1 :: (a -> a -> a) -> HsRecFields p a -> a #

foldl1 :: (a -> a -> a) -> HsRecFields p a -> a #

toList :: HsRecFields p a -> [a] #

null :: HsRecFields p a -> Bool #

length :: HsRecFields p a -> Int #

elem :: Eq a => a -> HsRecFields p a -> Bool #

maximum :: Ord a => HsRecFields p a -> a #

minimum :: Ord a => HsRecFields p a -> a #

sum :: Num a => HsRecFields p a -> a #

product :: Num a => HsRecFields p a -> a #

Traversable (HsRecFields p) 
Instance details

Defined in GHC.Hs.Pat

Methods

traverse :: Applicative f => (a -> f b) -> HsRecFields p a -> f (HsRecFields p b) #

sequenceA :: Applicative f => HsRecFields p (f a) -> f (HsRecFields p a) #

mapM :: Monad m => (a -> m b) -> HsRecFields p a -> m (HsRecFields p b) #

sequence :: Monad m => HsRecFields p (m a) -> m (HsRecFields p a) #

Outputable arg => Outputable (HsRecFields p arg) 
Instance details

Defined in GHC.Hs.Pat

Methods

ppr :: HsRecFields p arg -> SDoc #

pprPrec :: Rational -> HsRecFields p arg -> SDoc #

type LHsRecField' p arg = Located (HsRecField' p arg) #

Located Haskell Record Field

type LHsRecField p arg = Located (HsRecField p arg) #

Located Haskell Record Field

type LHsRecUpdField p = Located (HsRecUpdField p) #

Located Haskell Record Update Field

type HsRecField p arg = HsRecField' (FieldOcc p) arg #

Haskell Record Field

type HsRecUpdField p = HsRecField' (AmbiguousFieldOcc p) (LHsExpr p) #

Haskell Record Update Field

data HsRecField' id arg #

Haskell Record Field

For details on above see note [Api annotations] in ApiAnnotation

Constructors

HsRecField 

Fields

Instances

Instances details
Functor (HsRecField' id) 
Instance details

Defined in GHC.Hs.Pat

Methods

fmap :: (a -> b) -> HsRecField' id a -> HsRecField' id b #

(<$) :: a -> HsRecField' id b -> HsRecField' id a #

Foldable (HsRecField' id) 
Instance details

Defined in GHC.Hs.Pat

Methods

fold :: Monoid m => HsRecField' id m -> m #

foldMap :: Monoid m => (a -> m) -> HsRecField' id a -> m #

foldMap' :: Monoid m => (a -> m) -> HsRecField' id a -> m #

foldr :: (a -> b -> b) -> b -> HsRecField' id a -> b #

foldr' :: (a -> b -> b) -> b -> HsRecField' id a -> b #

foldl :: (b -> a -> b) -> b -> HsRecField' id a -> b #

foldl' :: (b -> a -> b) -> b -> HsRecField' id a -> b #

foldr1 :: (a -> a -> a) -> HsRecField' id a -> a #

foldl1 :: (a -> a -> a) -> HsRecField' id a -> a #

toList :: HsRecField' id a -> [a] #

null :: HsRecField' id a -> Bool #

length :: HsRecField' id a -> Int #

elem :: Eq a => a -> HsRecField' id a -> Bool #

maximum :: Ord a => HsRecField' id a -> a #

minimum :: Ord a => HsRecField' id a -> a #

sum :: Num a => HsRecField' id a -> a #

product :: Num a => HsRecField' id a -> a #

Traversable (HsRecField' id) 
Instance details

Defined in GHC.Hs.Pat

Methods

traverse :: Applicative f => (a -> f b) -> HsRecField' id a -> f (HsRecField' id b) #

sequenceA :: Applicative f => HsRecField' id (f a) -> f (HsRecField' id a) #

mapM :: Monad m => (a -> m b) -> HsRecField' id a -> m (HsRecField' id b) #

sequence :: Monad m => HsRecField' id (m a) -> m (HsRecField' id a) #

(Data id, Data arg) => Data (HsRecField' id arg) 
Instance details

Defined in GHC.Hs.Pat

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsRecField' id arg -> c (HsRecField' id arg) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsRecField' id arg) #

toConstr :: HsRecField' id arg -> Constr #

dataTypeOf :: HsRecField' id arg -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsRecField' id arg)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsRecField' id arg)) #

gmapT :: (forall b. Data b => b -> b) -> HsRecField' id arg -> HsRecField' id arg #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsRecField' id arg -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsRecField' id arg -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsRecField' id arg -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsRecField' id arg -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsRecField' id arg -> m (HsRecField' id arg) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRecField' id arg -> m (HsRecField' id arg) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsRecField' id arg -> m (HsRecField' id arg) #

(Outputable p, Outputable arg) => Outputable (HsRecField' p arg) 
Instance details

Defined in GHC.Hs.Pat

Methods

ppr :: HsRecField' p arg -> SDoc #

pprPrec :: Rational -> HsRecField' p arg -> SDoc #

pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc #

pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc #

Using SourceText in case the pragma was spelled differently or used mixed case

ppr_sig :: forall (p :: Pass). OutputableBndrId p => Sig (GhcPass p) -> SDoc #

hsSigDoc :: Sig name -> SDoc #

isSCCFunSig :: LSig name -> Bool #

isInlineLSig :: LSig name -> Bool #

isPragLSig :: LSig name -> Bool #

isSpecLSig :: LSig name -> Bool #

isTypeLSig :: LSig name -> Bool #

isFixityLSig :: LSig name -> Bool #

isEmptyIPBindsPR :: forall (p :: Pass). HsIPBinds (GhcPass p) -> Bool #

ppr_monobind :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc #

emptyValBindsOut :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) #

emptyValBindsIn :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) #

isEmptyValBinds :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) -> Bool #

isEmptyLocalBindsPR :: forall (a :: Pass) (b :: Pass). HsLocalBindsLR (GhcPass a) (GhcPass b) -> Bool #

emptyLocalBinds :: forall (a :: Pass) (b :: Pass). HsLocalBindsLR (GhcPass a) (GhcPass b) #

pprLHsBindsForUser :: forall (idL :: Pass) (idR :: Pass) (id2 :: Pass). (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId id2) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc] #

pprLHsBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc #

type HsLocalBinds id = HsLocalBindsLR id id #

Haskell Local Bindings

type LHsLocalBinds id = Located (HsLocalBinds id) #

Located Haskell local bindings

data HsLocalBindsLR idL idR #

Haskell Local Bindings with separate Left and Right identifier types

Bindings in a 'let' expression or a 'where' clause

Constructors

HsValBinds (XHsValBinds idL idR) (HsValBindsLR idL idR)

Haskell Value Bindings

HsIPBinds (XHsIPBinds idL idR) (HsIPBinds idR)

Haskell Implicit Parameter Bindings

EmptyLocalBinds (XEmptyLocalBinds idL idR)

Empty Local Bindings

XHsLocalBindsLR (XXHsLocalBindsLR idL idR) 

Instances

Instances details
(OutputableBndrId pl, OutputableBndrId pr) => Outputable (HsLocalBindsLR (GhcPass pl) (GhcPass pr)) 
Instance details

Defined in GHC.Hs.Binds

type LHsLocalBindsLR idL idR = Located (HsLocalBindsLR idL idR) #

type HsValBinds id = HsValBindsLR id id #

Haskell Value Bindings

data HsValBindsLR idL idR #

Haskell Value bindings with separate Left and Right identifier types (not implicit parameters) Used for both top level and nested bindings May contain pattern synonym bindings

Constructors

ValBinds (XValBinds idL idR) (LHsBindsLR idL idR) [LSig idR]

Value Bindings In

Before renaming RHS; idR is always RdrName Not dependency analysed Recursive by default

XValBindsLR (XXValBindsLR idL idR)

Value Bindings Out

After renaming RHS; idR can be Name or Id Dependency analysed, later bindings in the list may depend on earlier ones.

Instances

Instances details
(OutputableBndrId pl, OutputableBndrId pr) => Outputable (HsValBindsLR (GhcPass pl) (GhcPass pr)) 
Instance details

Defined in GHC.Hs.Binds

data NHsValBindsLR idL #

Constructors

NValBinds [(RecFlag, LHsBinds idL)] [LSig GhcRn] 

type LHsBind id = LHsBindLR id id #

Located Haskell Binding

type LHsBinds id = LHsBindsLR id id #

Located Haskell Bindings

type HsBind id = HsBindLR id id #

Haskell Binding

type LHsBindsLR idL idR = Bag (LHsBindLR idL idR) #

Located Haskell Bindings with separate Left and Right identifier types

type LHsBindLR idL idR = Located (HsBindLR idL idR) #

Located Haskell Binding with separate Left and Right identifier types

data HsBindLR idL idR #

Haskell Binding with separate Left and Right id's

Constructors

FunBind

Function-like Binding

FunBind is used for both functions f x = e and variables f = x -> e and strict variables !x = x + 1

Reason 1: Special case for type inference: see tcMonoBinds.

Reason 2: Instance decls can only have FunBinds, which is convenient. If you change this, you'll need to change e.g. rnMethodBinds

But note that the form f :: a->a = ... parses as a pattern binding, just like (f :: a -> a) = ...

Strict bindings have their strictness recorded in the SrcStrictness of their MatchContext. See Note [FunBind vs PatBind] for details about the relationship between FunBind and PatBind.

AnnKeywordIds

Fields

  • fun_ext :: XFunBind idL idR

    After the renamer, this contains the locally-bound free variables of this defn. See Note [Bind free vars]

  • fun_id :: Located (IdP idL)
     
  • fun_matches :: MatchGroup idR (LHsExpr idR)

    The payload

  • fun_co_fn :: HsWrapper

    Coercion from the type of the MatchGroup to the type of the Id. Example:

         f :: Int -> forall a. a -> a
         f x y = y
    

    Then the MatchGroup will have type (Int -> a' -> a') (with a free type variable a'). The coercion will take a CoreExpr of this type and convert it to a CoreExpr of type Int -> forall a'. a' -> a' Notice that the coercion captures the free a'.

  • fun_tick :: [Tickish Id]

    Ticks to put on the rhs, if any

PatBind

Pattern Binding

The pattern is never a simple variable; That case is done by FunBind. See Note [FunBind vs PatBind] for details about the relationship between FunBind and PatBind.

Fields

VarBind

Variable Binding

Dictionary binding and suchlike. All VarBinds are introduced by the type checker

Fields

AbsBinds

Abstraction Bindings

Fields

PatSynBind (XPatSynBind idL idR) (PatSynBind idL idR)
XHsBindsLR (XXHsBindsLR idL idR) 

Instances

Instances details
(OutputableBndrId pl, OutputableBndrId pr) => Outputable (HsBindLR (GhcPass pl) (GhcPass pr)) 
Instance details

Defined in GHC.Hs.Binds

Methods

ppr :: HsBindLR (GhcPass pl) (GhcPass pr) -> SDoc #

pprPrec :: Rational -> HsBindLR (GhcPass pl) (GhcPass pr) -> SDoc #

data NPatBindTc #

Constructors

NPatBindTc 

Fields

Instances

Instances details
Data NPatBindTc 
Instance details

Defined in GHC.Hs.Binds

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NPatBindTc -> c NPatBindTc #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NPatBindTc #

toConstr :: NPatBindTc -> Constr #

dataTypeOf :: NPatBindTc -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NPatBindTc) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NPatBindTc) #

gmapT :: (forall b. Data b => b -> b) -> NPatBindTc -> NPatBindTc #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NPatBindTc -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NPatBindTc -> r #

gmapQ :: (forall d. Data d => d -> u) -> NPatBindTc -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NPatBindTc -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NPatBindTc -> m NPatBindTc #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NPatBindTc -> m NPatBindTc #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NPatBindTc -> m NPatBindTc #

data ABExport p #

Abtraction Bindings Export

Constructors

ABE 

Fields

XABExport (XXABExport p) 

Instances

Instances details
OutputableBndrId p => Outputable (ABExport (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

Methods

ppr :: ABExport (GhcPass p) -> SDoc #

pprPrec :: Rational -> ABExport (GhcPass p) -> SDoc #

data PatSynBind idL idR #

Pattern Synonym binding

Constructors

PSB 

Fields

XPatSynBind (XXPatSynBind idL idR) 

Instances

Instances details
(OutputableBndrId l, OutputableBndrId r, Outputable (XXPatSynBind (GhcPass l) (GhcPass r))) => Outputable (PatSynBind (GhcPass l) (GhcPass r)) 
Instance details

Defined in GHC.Hs.Binds

data HsIPBinds id #

Haskell Implicit Parameter Bindings

Constructors

IPBinds (XIPBinds id) [LIPBind id] 
XHsIPBinds (XXHsIPBinds id) 

Instances

Instances details
OutputableBndrId p => Outputable (HsIPBinds (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

type LIPBind id = Located (IPBind id) #

Located Implicit Parameter Binding

May have AnnKeywordId : AnnSemi when in a list

data IPBind id #

Implicit parameter bindings.

These bindings start off as (Left "x") in the parser and stay that way until after type-checking when they are replaced with (Right d), where "d" is the name of the dictionary holding the evidence for the implicit parameter.

Constructors

IPBind (XCIPBind id) (Either (Located HsIPName) (IdP id)) (LHsExpr id) 
XIPBind (XXIPBind id) 

Instances

Instances details
OutputableBndrId p => Outputable (IPBind (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

Methods

ppr :: IPBind (GhcPass p) -> SDoc #

pprPrec :: Rational -> IPBind (GhcPass p) -> SDoc #

type LSig pass = Located (Sig pass) #

Located Signature

data Sig pass #

Signatures and pragmas

Constructors

TypeSig (XTypeSig pass) [Located (IdP pass)] (LHsSigWcType pass)

An ordinary type signature

f :: Num a => a -> a

After renaming, this list of Names contains the named wildcards brought into scope by this signature. For a signature _ -> _a -> Bool, the renamer will leave the unnamed wildcard _ untouched, and the named wildcard _a is then replaced with fresh meta vars in the type. Their names are stored in the type signature that brought them into scope, in this third field to be more specific.

PatSynSig (XPatSynSig pass) [Located (IdP pass)] (LHsSigType pass)

A pattern synonym type signature

pattern Single :: () => (Show a) => a -> [a]
ClassOpSig (XClassOpSig pass) Bool [Located (IdP pass)] (LHsSigType pass)

A signature for a class method False: ordinary class-method signature True: generic-default class method signature e.g. class C a where op :: a -> a -- Ordinary default op :: Eq a => a -> a -- Generic default No wildcards allowed here

IdSig (XIdSig pass) Id

A type signature in generated code, notably the code generated for record selectors. We simply record the desired Id itself, replete with its name, type and IdDetails. Otherwise it's just like a type signature: there should be an accompanying binding

FixSig (XFixSig pass) (FixitySig pass)

An ordinary fixity declaration

    infixl 8 ***
InlineSig (XInlineSig pass) (Located (IdP pass)) InlinePragma

An inline pragma

{#- INLINE f #-}
SpecSig (XSpecSig pass) (Located (IdP pass)) [LHsSigType pass] InlinePragma

A specialisation pragma

{-# SPECIALISE f :: Int -> Int #-}
SpecInstSig (XSpecInstSig pass) SourceText (LHsSigType pass)

A specialisation pragma for instance declarations only

{-# SPECIALISE instance Eq [Int] #-}

(Class tys); should be a specialisation of the current instance declaration

MinimalSig (XMinimalSig pass) SourceText (LBooleanFormula (Located (IdP pass)))

A minimal complete definition pragma

{-# MINIMAL a | (b, c | (d | e)) #-}
SCCFunSig (XSCCFunSig pass) SourceText (Located (IdP pass)) (Maybe (Located StringLiteral))

A "set cost centre" pragma for declarations

{-# SCC funName #-}

or

{-# SCC funName "cost_centre_name" #-}
CompleteMatchSig (XCompleteMatchSig pass) SourceText (Located [Located (IdP pass)]) (Maybe (Located (IdP pass)))

A complete match pragma

{-# COMPLETE C, D [:: T] #-}

Used to inform the pattern match checker about additional complete matchings which, for example, arise from pattern synonym definitions.

XSig (XXSig pass) 

Instances

Instances details
OutputableBndrId p => Outputable (Sig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

Methods

ppr :: Sig (GhcPass p) -> SDoc #

pprPrec :: Rational -> Sig (GhcPass p) -> SDoc #

type LFixitySig pass = Located (FixitySig pass) #

Located Fixity Signature

data FixitySig pass #

Fixity Signature

Constructors

FixitySig (XFixitySig pass) [Located (IdP pass)] Fixity 
XFixitySig (XXFixitySig pass) 

Instances

Instances details
OutputableBndrId p => Outputable (FixitySig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

data TcSpecPrags #

Type checker Specialisation Pragmas

TcSpecPrags conveys SPECIALISE pragmas from the type checker to the desugarer

Constructors

IsDefaultMethod

Super-specialised: a default method should be macro-expanded at every call site

SpecPrags [LTcSpecPrag] 

Instances

Instances details
Data TcSpecPrags 
Instance details

Defined in GHC.Hs.Binds

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TcSpecPrags -> c TcSpecPrags #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TcSpecPrags #

toConstr :: TcSpecPrags -> Constr #

dataTypeOf :: TcSpecPrags -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TcSpecPrags) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TcSpecPrags) #

gmapT :: (forall b. Data b => b -> b) -> TcSpecPrags -> TcSpecPrags #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r #

gmapQ :: (forall d. Data d => d -> u) -> TcSpecPrags -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TcSpecPrags -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags #

type LTcSpecPrag = Located TcSpecPrag #

Located Type checker Specification Pragmas

data TcSpecPrag #

Type checker Specification Pragma

Constructors

SpecPrag Id HsWrapper InlinePragma

The Id to be specialised, a wrapper that specialises the polymorphic function, and inlining spec for the specialised function

Instances

Instances details
Data TcSpecPrag 
Instance details

Defined in GHC.Hs.Binds

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TcSpecPrag -> c TcSpecPrag #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TcSpecPrag #

toConstr :: TcSpecPrag -> Constr #

dataTypeOf :: TcSpecPrag -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TcSpecPrag) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TcSpecPrag) #

gmapT :: (forall b. Data b => b -> b) -> TcSpecPrag -> TcSpecPrag #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r #

gmapQ :: (forall d. Data d => d -> u) -> TcSpecPrag -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TcSpecPrag -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag #

Outputable TcSpecPrag 
Instance details

Defined in GHC.Hs.Binds

type HsPatSynDetails arg = HsConDetails arg [RecordPatSynField arg] #

Haskell Pattern Synonym Details

data RecordPatSynField a #

Record Pattern Synonym Field

Instances

Instances details
Functor RecordPatSynField 
Instance details

Defined in GHC.Hs.Binds

Foldable RecordPatSynField 
Instance details

Defined in GHC.Hs.Binds

Methods

fold :: Monoid m => RecordPatSynField m -> m #

foldMap :: Monoid m => (a -> m) -> RecordPatSynField a -> m #

foldMap' :: Monoid m => (a -> m) -> RecordPatSynField a -> m #

foldr :: (a -> b -> b) -> b -> RecordPatSynField a -> b #

foldr' :: (a -> b -> b) -> b -> RecordPatSynField a -> b #

foldl :: (b -> a -> b) -> b -> RecordPatSynField a -> b #

foldl' :: (b -> a -> b) -> b -> RecordPatSynField a -> b #

foldr1 :: (a -> a -> a) -> RecordPatSynField a -> a #

foldl1 :: (a -> a -> a) -> RecordPatSynField a -> a #

toList :: RecordPatSynField a -> [a] #

null :: RecordPatSynField a -> Bool #

length :: RecordPatSynField a -> Int #

elem :: Eq a => a -> RecordPatSynField a -> Bool #

maximum :: Ord a => RecordPatSynField a -> a #

minimum :: Ord a => RecordPatSynField a -> a #

sum :: Num a => RecordPatSynField a -> a #

product :: Num a => RecordPatSynField a -> a #

Traversable RecordPatSynField 
Instance details

Defined in GHC.Hs.Binds

Methods

traverse :: Applicative f => (a -> f b) -> RecordPatSynField a -> f (RecordPatSynField b) #

sequenceA :: Applicative f => RecordPatSynField (f a) -> f (RecordPatSynField a) #

mapM :: Monad m => (a -> m b) -> RecordPatSynField a -> m (RecordPatSynField b) #

sequence :: Monad m => RecordPatSynField (m a) -> m (RecordPatSynField a) #

Data a => Data (RecordPatSynField a) 
Instance details

Defined in GHC.Hs.Binds

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RecordPatSynField a -> c (RecordPatSynField a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (RecordPatSynField a) #

toConstr :: RecordPatSynField a -> Constr #

dataTypeOf :: RecordPatSynField a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (RecordPatSynField a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (RecordPatSynField a)) #

gmapT :: (forall b. Data b => b -> b) -> RecordPatSynField a -> RecordPatSynField a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RecordPatSynField a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RecordPatSynField a -> r #

gmapQ :: (forall d. Data d => d -> u) -> RecordPatSynField a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RecordPatSynField a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RecordPatSynField a -> m (RecordPatSynField a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RecordPatSynField a -> m (RecordPatSynField a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RecordPatSynField a -> m (RecordPatSynField a) #

Outputable a => Outputable (RecordPatSynField a) 
Instance details

Defined in GHC.Hs.Binds

data HsPatSynDir id #

Haskell Pattern Synonym Direction

lookupInstEnv :: Bool -> InstEnvs -> Class -> [Type] -> ClsInstLookupResult #

See Note [Rules for instance lookup] ^ See Note [Safe Haskell Overlapping Instances] in TcSimplify ^ See Note [Safe Haskell Overlapping Instances Implementation] in TcSimplify

lookupUniqueInstEnv :: InstEnvs -> Class -> [Type] -> Either MsgDoc (ClsInst, [Type]) #

Look up an instance in the given instance environment. The given class application must match exactly one instance and the match may not contain any flexi type variables. If the lookup is unsuccessful, yield 'Left errorMessage'.

identicalClsInstHead :: ClsInst -> ClsInst -> Bool #

True when when the instance heads are the same e.g. both are Eq [(a,b)] Used for overriding in GHCi Obviously should be insenstive to alpha-renaming

memberInstEnv :: InstEnv -> ClsInst -> Bool #

Checks for an exact match of ClsInst in the instance environment. We use this when we do signature checking in TcRnDriver

instIsVisible :: VisibleOrphanModules -> ClsInst -> Bool #

Test if an instance is visible, by checking that its origin module is in VisibleOrphanModules. See Note [Instance lookup and orphan instances]

mkImportedInstance #

Arguments

:: Name

the name of the class

-> [Maybe Name]

the types which the class was applied to

-> 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 

orphNamesOfClsInst :: ClsInst -> NameSet #

Collects the names of concrete types and type constructors that make up the head of a class instance. For instance, given `class Foo a b`:

`instance Foo (Either (Maybe Int) a) Bool` would yield [Either, Maybe, Int, Bool]

Used in the implementation of ":info" in GHCi.

The tcSplitSigmaTy is because of instance Foo a => Baz T where ... The decl is an orphan if Baz and T are both not locally defined, even if Foo *is* locally defined

fuzzyClsInstCmp :: ClsInst -> ClsInst -> Ordering #

A fuzzy comparison function for class instances, intended for sorting instances before displaying them to the user.

data ClsInst #

A type-class instance. Note that there is some tricky laziness at work here. See Note [ClsInst laziness and the rough-match fields] for more details.

Constructors

ClsInst 

Fields

Instances

Instances details
Data ClsInst 
Instance details

Defined in InstEnv

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ClsInst -> c ClsInst #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ClsInst #

toConstr :: ClsInst -> Constr #

dataTypeOf :: ClsInst -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ClsInst) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ClsInst) #

gmapT :: (forall b. Data b => b -> b) -> ClsInst -> ClsInst #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ClsInst -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ClsInst -> r #

gmapQ :: (forall d. Data d => d -> u) -> ClsInst -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ClsInst -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ClsInst -> m ClsInst #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ClsInst -> m ClsInst #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ClsInst -> m ClsInst #

NamedThing ClsInst 
Instance details

Defined in InstEnv

Outputable ClsInst 
Instance details

Defined in InstEnv

Methods

ppr :: ClsInst -> SDoc #

pprPrec :: Rational -> ClsInst -> SDoc #

type InstEnv = UniqDFM ClsInstEnv #

data InstEnvs #

InstEnvs represents the combination of the global type class instance environment, the local type class instance environment, and the set of transitively reachable orphan modules (according to what modules have been directly imported) used to test orphan instance visibility.

type VisibleOrphanModules = ModuleSet #

Set of visible orphan modules, according to what modules have been directly imported. This is based off of the dep_orphs field, which records transitively reachable orphan modules (modules that define orphan instances).

data FamInst #

Instances

Instances details
NamedThing FamInst 
Instance details

Defined in FamInstEnv

Outputable FamInst 
Instance details

Defined in FamInstEnv

Methods

ppr :: FamInst -> SDoc #

pprPrec :: Rational -> FamInst -> SDoc #

data Linkable #

Information we can use to dynamically link modules into the compiler

Constructors

LM 

Fields

  • linkableTime :: UTCTime

    Time at which this linkable was built (i.e. when the bytecodes were produced, or the mod date on the files)

  • linkableModule :: Module

    The linkable module itself

  • linkableUnlinked :: [Unlinked]

    Those files and chunks of code we have yet to link.

    INVARIANT: A valid linkable always has at least one Unlinked item. If this list is empty, the Linkable represents a fake linkable, which is generated in HscNothing mode to avoid recompiling modules.

    ToDo: Do items get removed from this list when they get linked?

Instances

Instances details
Outputable Linkable 
Instance details

Defined in LinkerTypes

data Unlinked #

Objects which have yet to be linked by the compiler

Constructors

DotO FilePath

An object file (.o)

DotA FilePath

Static archive file (.a)

DotDLL FilePath

Dynamically linked library file (.so, .dll, .dylib)

BCOs CompiledByteCode [SptEntry]

A byte-code object, lives only in memory. Also carries some static pointer table entries which should be loaded along with the BCOs. See Note [Grant plan for static forms] in StaticPtrTable.

Instances

Instances details
Outputable Unlinked 
Instance details

Defined in LinkerTypes

data SptEntry #

An entry to be inserted into a module's static pointer table. See Note [Grand plan for static forms] in StaticPtrTable.

Constructors

SptEntry Id Fingerprint 

Instances

Instances details
Outputable SptEntry 
Instance details

Defined in LinkerTypes

emptyModBreaks :: ModBreaks #

Construct an empty ModBreaks

data CompiledByteCode #

Instances

Instances details
Outputable CompiledByteCode 
Instance details

Defined in ByteCodeTypes

type BreakIndex = Int #

Breakpoint index

data ModBreaks #

All the information about the breakpoints for a module

Constructors

ModBreaks 

Fields

parenthesizeHsContext :: forall (p :: Pass). PprPrec -> LHsContext (GhcPass p) -> LHsContext (GhcPass p) #

parenthesizeHsContext p ctxt checks if ctxt is a single constraint c such that hsTypeNeedsParens p c is true, and if so, surrounds c with an HsParTy to form a parenthesized ctxt. Otherwise, it simply returns ctxt unchanged.

parenthesizeHsType :: forall (p :: Pass). PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p) #

parenthesizeHsType p ty checks if hsTypeNeedsParens p ty is true, and if so, surrounds ty with an HsParTy. Otherwise, it simply returns ty.

hsTypeNeedsParens :: PprPrec -> HsType pass -> Bool #

hsTypeNeedsParens p t returns True if the type t needs parentheses under precedence p.

pprHsType :: forall (p :: Pass). OutputableBndrId p => HsType (GhcPass p) -> SDoc #

pprHsExplicitForAll :: forall (p :: Pass). OutputableBndrId p => ForallVisFlag -> Maybe [LHsTyVarBndr (GhcPass p)] -> SDoc #

Version of pprHsForAll or pprHsForAllExtra that will always print forall. when passed Just []. Prints nothing if passed Nothing

pprHsForAllExtra :: forall (p :: Pass). OutputableBndrId p => Maybe SrcSpan -> ForallVisFlag -> [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc #

Version of pprHsForAll that can also print an extra-constraints wildcard, e.g. _ => a -> Bool or (Show a, _) => a -> String. This underscore will be printed when the 'Maybe SrcSpan' argument is a Just containing the location of the extra-constraints wildcard. A special function for this is needed, as the extra-constraints wildcard is removed from the actual context and type, and stored in a separate field, thus just printing the type will not print the extra-constraints wildcard.

pprHsForAll :: forall (p :: Pass). OutputableBndrId p => ForallVisFlag -> [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc #

Prints a forall; When passed an empty list, prints forall ./forall -> only when -dppr-debug is enabled.

splitLHsInstDeclTy :: LHsSigType GhcRn -> ([Name], LHsContext GhcRn, LHsType GhcRn) #

Decompose a type class instance type (of the form forall tvs. context => instance_head) into its constituent parts.

Note that this function looks through parentheses, so it will work on types such as (forall tvs. ...). The downside to this is that it is not generally possible to take the returned types and reconstruct the original type (parentheses and all) from them.

splitLHsQualTy :: LHsType pass -> (LHsContext pass, LHsType pass) #

Decompose a type of the form context => body into its constituent parts.

Note that this function looks through parentheses, so it will work on types such as (context => ...). The downside to this is that it is not generally possible to take the returned types and reconstruct the original type (parentheses and all) from them.

splitLHsForAllTyInvis :: LHsType pass -> ([LHsTyVarBndr pass], LHsType pass) #

Decompose a type of the form forall tvs. body into its constituent parts. Note that only invisible foralls (i.e., forall a., with a dot) are split apart; visible foralls (i.e., forall a ->, with an arrow) are left untouched.

This function is used to split apart certain types, such as instance declaration types, which disallow visible foralls. For instance, if GHC split apart the forall in instance forall a -> Show (Blah a), then that declaration would mistakenly be accepted!

Note that this function looks through parentheses, so it will work on types such as (forall a. ...). The downside to this is that it is not generally possible to take the returned types and reconstruct the original type (parentheses and all) from them.

splitLHsSigmaTyInvis :: LHsType pass -> ([LHsTyVarBndr pass], LHsContext pass, LHsType pass) #

Decompose a sigma type (of the form forall tvs. context => body) into its constituent parts. Note that only invisible foralls (i.e., forall a., with a dot) are split apart; visible foralls (i.e., forall a ->, with an arrow) are left untouched.

This function is used to split apart certain types, such as instance declaration types, which disallow visible foralls. For instance, if GHC split apart the forall in instance forall a -> Show (Blah a), then that declaration would mistakenly be accepted!

Note that this function looks through parentheses, so it will work on types such as (forall a. ...). The downside to this is that it is not generally possible to take the returned types and reconstruct the original type (parentheses and all) from them.

splitLHsPatSynTy :: LHsType pass -> ([LHsTyVarBndr pass], LHsContext pass, [LHsTyVarBndr pass], LHsContext pass, LHsType pass) #

Decompose a pattern synonym type signature into its constituent parts.

Note that this function looks through parentheses, so it will work on types such as (forall a. ...). The downside to this is that it is not generally possible to take the returned types and reconstruct the original type (parentheses and all) from them.

numVisibleArgs :: [HsArg tm ty] -> Arity #

hsTyGetAppHead_maybe :: forall (p :: Pass). LHsType (GhcPass p) -> Maybe (Located (IdP (GhcPass p))) #

mkHsAppKindTy :: forall (p :: Pass). XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #

mkHsAppTys :: forall (p :: Pass). LHsType (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p) #

mkHsAppTy :: forall (p :: Pass). LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) #

mkHsOpTy :: forall (p :: Pass). LHsType (GhcPass p) -> Located (IdP (GhcPass p)) -> LHsType (GhcPass p) -> HsType (GhcPass p) #

ignoreParens :: LHsType pass -> LHsType pass #

hsTyKindSig :: LHsType pass -> Maybe (LHsKind pass) #

Get the kind signature of a type, ignoring parentheses:

hsTyKindSig `Maybe ` = Nothing hsTyKindSig `Maybe :: Type -> Type ` = Just `Type -> Type` hsTyKindSig `Maybe :: ((Type -> Type))` = Just `Type -> Type`

This is used to extract the result kind of type synonyms with a CUSK:

type S = (F :: res_kind) ^^^^^^^^

hsLTyVarBndrsToTypes :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> [LHsType (GhcPass p)] #

Convert a LHsTyVarBndrs to a list of types. Works on *type* variable only, no kind vars.

hsLTyVarBndrToType :: forall (p :: Pass). LHsTyVarBndr (GhcPass p) -> LHsType (GhcPass p) #

Convert a LHsTyVarBndr to an equivalent LHsType.

hsLTyVarLocNames :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> [Located (IdP (GhcPass p))] #

hsLTyVarLocName :: forall (p :: Pass). LHsTyVarBndr (GhcPass p) -> Located (IdP (GhcPass p)) #

hsExplicitLTyVarNames :: forall (p :: Pass). LHsQTyVars (GhcPass p) -> [IdP (GhcPass p)] #

hsLTyVarNames :: forall (p :: Pass). [LHsTyVarBndr (GhcPass p)] -> [IdP (GhcPass p)] #

hsLTyVarName :: forall (p :: Pass). LHsTyVarBndr (GhcPass p) -> IdP (GhcPass p) #

hsTyVarName :: forall (p :: Pass). HsTyVarBndr (GhcPass p) -> IdP (GhcPass p) #

hsTvbAllKinded :: LHsQTyVars pass -> Bool #

Do all type variables in this LHsQTyVars come with kind annotations?

isHsKindedTyVar :: HsTyVarBndr pass -> Bool #

Does this HsTyVarBndr come with an explicit kind annotation?

hsSigType :: forall (p :: Pass). LHsSigType (GhcPass p) -> LHsType (GhcPass p) #

hsImplicitBody :: forall (p :: Pass) thing. HsImplicitBndrs (GhcPass p) thing -> thing #

type LBangType pass = Located (BangType pass) #

Located Bang Type

type BangType pass = HsType pass #

Bang Type

In the parser, strictness and packedness annotations bind more tightly than docstrings. This means that when consuming a BangType (and looking for HsBangTy) we must be ready to peer behind a potential layer of HsDocTy. See #15206 for motivation and getBangType for an example.

type LHsContext pass #

Arguments

 = Located (HsContext pass)

AnnKeywordId : AnnUnit For details on above see note [Api annotations] in ApiAnnotation

Located Haskell Context

type HsContext pass = [LHsType pass] #

Haskell Context

type LHsType pass #

Arguments

 = Located (HsType pass)

May have AnnKeywordId : AnnComma when in a list

Located Haskell Type

type HsKind pass = HsType pass #

Haskell Kind

type LHsKind pass #

Arguments

 = Located (HsKind pass)

AnnKeywordId : AnnDcolon

Located Haskell Kind

type LHsTyVarBndr pass = Located (HsTyVarBndr pass) #

Located Haskell Type Variable Binder

data LHsQTyVars pass #

Located Haskell Quantified Type Variables

Constructors

HsQTvs 

Fields

XLHsQTyVars (XXLHsQTyVars pass) 

Instances

Instances details
OutputableBndrId p => Outputable (LHsQTyVars (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

data HsImplicitBndrs pass thing #

Haskell Implicit Binders

Constructors

HsIB 

Fields

XHsImplicitBndrs (XXHsImplicitBndrs pass thing) 

Instances

Instances details
Outputable thing => Outputable (HsImplicitBndrs (GhcPass p) thing) 
Instance details

Defined in GHC.Hs.Types

Methods

ppr :: HsImplicitBndrs (GhcPass p) thing -> SDoc #

pprPrec :: Rational -> HsImplicitBndrs (GhcPass p) thing -> SDoc #

data HsWildCardBndrs pass thing #

Haskell Wildcard Binders

Constructors

HsWC 

Fields

XHsWildCardBndrs (XXHsWildCardBndrs pass thing) 

Instances

Instances details
Outputable thing => Outputable (HsWildCardBndrs (GhcPass p) thing) 
Instance details

Defined in GHC.Hs.Types

Methods

ppr :: HsWildCardBndrs (GhcPass p) thing -> SDoc #

pprPrec :: Rational -> HsWildCardBndrs (GhcPass p) thing -> SDoc #

type LHsSigType pass = HsImplicitBndrs pass (LHsType pass) #

Located Haskell Signature Type

type LHsWcType pass = HsWildCardBndrs pass (LHsType pass) #

Located Haskell Wildcard Type

type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass) #

Located Haskell Signature Wildcard Type

newtype HsIPName #

These names are used early on to store the names of implicit parameters. They completely disappear after type-checking.

Constructors

HsIPName FastString 

Instances

Instances details
Eq HsIPName 
Instance details

Defined in GHC.Hs.Types

Data HsIPName 
Instance details

Defined in GHC.Hs.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsIPName -> c HsIPName #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsIPName #

toConstr :: HsIPName -> Constr #

dataTypeOf :: HsIPName -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsIPName) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsIPName) #

gmapT :: (forall b. Data b => b -> b) -> HsIPName -> HsIPName #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsIPName -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsIPName -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsIPName -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsIPName -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName #

Outputable HsIPName 
Instance details

Defined in GHC.Hs.Types

OutputableBndr HsIPName 
Instance details

Defined in GHC.Hs.Types

data HsTyVarBndr pass #

Haskell Type Variable Binder

Instances

Instances details
NamedThing (HsTyVarBndr GhcRn) 
Instance details

Defined in GHC.Hs.Types

OutputableBndrId p => Outputable (HsTyVarBndr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

data HsType pass #

Haskell Type

Constructors

HsForAllTy
HsQualTy 

Fields

HsTyVar (XTyVar pass) PromotionFlag (Located (IdP pass))
HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass)
HsAppKindTy (XAppKindTy pass) (LHsType pass) (LHsKind pass) 
HsFunTy (XFunTy pass) (LHsType pass) (LHsType pass)
HsListTy (XListTy pass) (LHsType pass)
HsTupleTy (XTupleTy pass) HsTupleSort [LHsType pass]
HsSumTy (XSumTy pass) [LHsType pass]
HsOpTy (XOpTy pass) (LHsType pass) (Located (IdP pass)) (LHsType pass)
HsParTy (XParTy pass) (LHsType pass)
HsIParamTy (XIParamTy pass) (Located HsIPName) (LHsType pass)
(?x :: ty)
HsStarTy (XStarTy pass) Bool
HsKindSig (XKindSig pass) (LHsType pass) (LHsKind pass)
(ty :: kind)
HsSpliceTy (XSpliceTy pass) (HsSplice pass)
HsDocTy (XDocTy pass) (LHsType pass) LHsDocString
HsBangTy (XBangTy pass) HsSrcBang (LHsType pass)
HsRecTy (XRecTy pass) [LConDeclField pass]
HsExplicitListTy (XExplicitListTy pass) PromotionFlag [LHsType pass]
HsExplicitTupleTy (XExplicitTupleTy pass) [LHsType pass]
HsTyLit (XTyLit pass) HsTyLit
HsWildCardTy (XWildCardTy pass)
XHsType (XXType pass) 

Instances

Instances details
OutputableBndrId p => Outputable (HsType (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

Methods

ppr :: HsType (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsType (GhcPass p) -> SDoc #

data NewHsTypeX #

Constructors

NHsCoreTy Type 

Instances

Instances details
Data NewHsTypeX
Instance details

Defined in GHC.Hs.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NewHsTypeX -> c NewHsTypeX #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NewHsTypeX #

toConstr :: NewHsTypeX -> Constr #

dataTypeOf :: NewHsTypeX -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NewHsTypeX) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewHsTypeX) #

gmapT :: (forall b. Data b => b -> b) -> NewHsTypeX -> NewHsTypeX #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NewHsTypeX -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NewHsTypeX -> r #

gmapQ :: (forall d. Data d => d -> u) -> NewHsTypeX -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NewHsTypeX -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NewHsTypeX -> m NewHsTypeX #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NewHsTypeX -> m NewHsTypeX #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NewHsTypeX -> m NewHsTypeX #

Outputable NewHsTypeX 
Instance details

Defined in GHC.Hs.Types

data HsTyLit #

Haskell Type Literal

Instances

Instances details
Data HsTyLit 
Instance details

Defined in GHC.Hs.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTyLit -> c HsTyLit #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsTyLit #

toConstr :: HsTyLit -> Constr #

dataTypeOf :: HsTyLit -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsTyLit) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsTyLit) #

gmapT :: (forall b. Data b => b -> b) -> HsTyLit -> HsTyLit #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTyLit -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTyLit -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsTyLit -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTyLit -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTyLit -> m HsTyLit #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyLit -> m HsTyLit #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyLit -> m HsTyLit #

Outputable HsTyLit 
Instance details

Defined in GHC.Hs.Types

Methods

ppr :: HsTyLit -> SDoc #

pprPrec :: Rational -> HsTyLit -> SDoc #

data HsTupleSort #

Haskell Tuple Sort

Instances

Instances details
Data HsTupleSort 
Instance details

Defined in GHC.Hs.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTupleSort -> c HsTupleSort #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsTupleSort #

toConstr :: HsTupleSort -> Constr #

dataTypeOf :: HsTupleSort -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsTupleSort) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsTupleSort) #

gmapT :: (forall b. Data b => b -> b) -> HsTupleSort -> HsTupleSort #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTupleSort -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTupleSort -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsTupleSort -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTupleSort -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort #

type LConDeclField pass #

Arguments

 = Located (ConDeclField pass)

May have AnnKeywordId : AnnComma when in a list

Located Constructor Declaration Field

data ConDeclField pass #

Constructor Declaration Field

Instances

Instances details
OutputableBndrId p => Outputable (ConDeclField (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

data HsConDetails arg rec #

Haskell Constructor Details

Constructors

PrefixCon [arg] 
RecCon rec 
InfixCon arg arg 

Instances

Instances details
(Data arg, Data rec) => Data (HsConDetails arg rec) 
Instance details

Defined in GHC.Hs.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsConDetails arg rec -> c (HsConDetails arg rec) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsConDetails arg rec) #

toConstr :: HsConDetails arg rec -> Constr #

dataTypeOf :: HsConDetails arg rec -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsConDetails arg rec)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsConDetails arg rec)) #

gmapT :: (forall b. Data b => b -> b) -> HsConDetails arg rec -> HsConDetails arg rec #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails arg rec -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails arg rec -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsConDetails arg rec -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsConDetails arg rec -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsConDetails arg rec -> m (HsConDetails arg rec) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails arg rec -> m (HsConDetails arg rec) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails arg rec -> m (HsConDetails arg rec) #

(Outputable arg, Outputable rec) => Outputable (HsConDetails arg rec) 
Instance details

Defined in GHC.Hs.Types

Methods

ppr :: HsConDetails arg rec -> SDoc #

pprPrec :: Rational -> HsConDetails arg rec -> SDoc #

data HsArg tm ty #

Constructors

HsValArg tm 
HsTypeArg SrcSpan ty 
HsArgPar SrcSpan 

Instances

Instances details
(Outputable tm, Outputable ty) => Outputable (HsArg tm ty) 
Instance details

Defined in GHC.Hs.Types

Methods

ppr :: HsArg tm ty -> SDoc #

pprPrec :: Rational -> HsArg tm ty -> SDoc #

type LHsTypeArg p = HsArg (LHsType p) (LHsKind p) #

type LFieldOcc pass = Located (FieldOcc pass) #

Located Field Occurrence

data FieldOcc pass #

Field Occurrence

Represents an *occurrence* of an unambiguous field. We store both the RdrName the user originally wrote, and after the renamer, the selector function.

Constructors

FieldOcc 

Fields

XFieldOcc (XXFieldOcc pass) 

Instances

Instances details
Eq (XCFieldOcc (GhcPass p)) => Eq (FieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

Methods

(==) :: FieldOcc (GhcPass p) -> FieldOcc (GhcPass p) -> Bool #

(/=) :: FieldOcc (GhcPass p) -> FieldOcc (GhcPass p) -> Bool #

Ord (XCFieldOcc (GhcPass p)) => Ord (FieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

Outputable (FieldOcc pass) 
Instance details

Defined in GHC.Hs.Types

Methods

ppr :: FieldOcc pass -> SDoc #

pprPrec :: Rational -> FieldOcc pass -> SDoc #

data AmbiguousFieldOcc pass #

Ambiguous Field Occurrence

Represents an *occurrence* of a field that is potentially ambiguous after the renamer, with the ambiguity resolved by the typechecker. We always store the RdrName that the user originally wrote, and store the selector function after the renamer (for unambiguous occurrences) or the typechecker (for ambiguous occurrences).

See Note [HsRecField and HsRecUpdField] in GHC.Hs.Pat and Note [Disambiguating record fields] in TcExpr. See Note [Located RdrNames] in GHC.Hs.Expr

data ExecOptions #

Constructors

ExecOptions 

Fields

data History #

mkSumTy :: [Type] -> Type #

mkTupleTy1 :: Boxity -> [Type] -> Type #

Make a tuple type. The list of types should not include any RuntimeRep specifications. Boxed 1-tuples are *not* flattened. See Note [One-tuples] and Note [Don't flatten tuples from HsSyn] in MkCore

mkTupleTy :: Boxity -> [Type] -> Type #

Make a tuple type. The list of types should not include any RuntimeRep specifications. Boxed 1-tuples are flattened. See Note [One-tuples]

unboxedSumKind :: [Type] -> Kind #

Specialization of unboxedTupleSumKind for sums

sumDataCon :: ConTag -> Arity -> DataCon #

Data constructor for i-th alternative of a n-ary unboxed sum.

sumTyCon :: Arity -> TyCon #

Type constructor for n-ary unboxed sum.

cTupleTyConNameArity_maybe :: Name -> Maybe Arity #

If the given name is that of a constraint tuple, return its arity. Note that this is inefficient.

isBuiltInOcc_maybe :: OccName -> Maybe Name #

Built-in syntax isn't "in scope" so these OccNames map to wired-in Names with BuiltInSyntax. However, this should only be necessary while resolving names produced by Template Haskell splices since we take care to encode built-in syntax names specially in interface files. See Note [Symbol table representation of names].

Moreover, there is no need to include names of things that the user can't write (e.g. type representation bindings like $tc(,,,)).

makeRecoveryTyCon :: TyCon -> TyCon #

Make a fake, recovery TyCon from an existing one. Used when recovering from errors in type declarations

transferPolyIdInfo :: Id -> [Var] -> Id -> Id #

setIdOneShotInfo :: Id -> OneShotInfo -> Id infixl 1 #

stateHackOneShot :: OneShotInfo #

Should we apply the state hack to values of this Type?

isOneShotBndr :: Var -> Bool #

Returns whether the lambda associated with the Id is certainly applied at most once This one is the "business end", called externally. It works on type variables as well as Ids, returning True Its main purpose is to encapsulate the Horrible State Hack See Note [The state-transformer hack] in CoreArity

idStateHackOneShotInfo :: Id -> OneShotInfo #

Like idOneShotInfo, but taking the Horrible State Hack in to account See Note [The state-transformer hack] in CoreArity

setInlinePragma :: Id -> InlinePragma -> Id infixl 1 #

setIdOccInfo :: Id -> OccInfo -> Id infixl 1 #

idCafInfo :: Id -> CafInfo infixl 1 #

setIdSpecialisation :: Id -> RuleInfo -> Id infixl 1 #

setIdDemandInfo :: Id -> Demand -> Id infixl 1 #

setIdUnfolding :: Id -> Unfolding -> Id infixl 1 #

isStrictId :: Id -> Bool #

This predicate says whether the Id has a strict demand placed on it or has a type such that it can always be evaluated strictly (i.e an unlifted type, as of GHC 7.6). We need to check separately whether the Id has a so-called "strict type" because if the demand for the given id hasn't been computed yet but id has a strict type, we still want isStrictId id to be True.

setIdStrictness :: Id -> StrictSig -> Id infixl 1 #

idStrictness :: Id -> StrictSig #

Accesses the Id's strictnessInfo.

isBottomingId :: Var -> Bool #

Returns true if an application to n args would diverge

setIdCallArity :: Id -> Arity -> Id infixl 1 #

setIdArity :: Id -> Arity -> Id infixl 1 #

asJoinId_maybe :: Id -> Maybe JoinArity -> Id infixl 1 #

asJoinId :: Id -> JoinArity -> JoinId infixl 1 #

isImplicitId :: Id -> Bool #

isImplicitId tells whether an Ids info is implied by other declarations, so we don't need to put its signature in an interface file, even if it's mentioned in some other interface unfolding.

hasNoBinding :: Id -> Bool #

Returns True of an Id which may not have a binding, even though it is defined in this module.

idDataCon :: Id -> DataCon #

Get from either the worker or the wrapper Id to the DataCon. Currently used only in the desugarer.

INVARIANT: idDataCon (dataConWrapId d) = d: remember, dataConWrapId can return either the wrapper or the worker

recordSelectorTyCon :: Id -> RecSelParent #

If the Id is that for a record selector, extract the sel_tycon. Panic otherwise.

mkTemplateLocalsNum :: Int -> [Type] -> [Id] #

Create a template local for a series of type, but start from a specified template local

mkTemplateLocals :: [Type] -> [Id] #

Create a template local for a series of types

mkTemplateLocal :: Int -> Type -> Id #

Create a template local: a family of system local Ids in bijection with Ints, typically used in unfoldings

mkWorkerId :: Unique -> Id -> Type -> Id #

Workers get local names. CoreTidy will externalise these if necessary

mkUserLocalOrCoVar :: OccName -> Unique -> Type -> SrcSpan -> Id #

Like mkUserLocal, but checks if we have a coercion type

mkUserLocal :: OccName -> Unique -> Type -> SrcSpan -> Id #

Create a user local Id. These are local Ids (see Var) with a name and location that the user might recognize

mkSysLocalOrCoVar :: FastString -> Unique -> Type -> Id #

Like mkSysLocal, but checks to see if we have a covar type

mkSysLocal :: FastString -> Unique -> Type -> Id #

Create a system local Id. These are local Ids (see Var) that are created by the compiler out of thin air

mkExportedLocalId :: IdDetails -> Name -> Type -> Id #

Create a local Id that is marked as exported. This prevents things attached to it from being removed as dead code. See Note [Exported LocalIds]

mkLocalIdOrCoVarWithInfo :: Name -> Type -> IdInfo -> Id #

Make a local id, with the IdDetails set to CoVarId if the type indicates so.

mkLocalIdOrCoVar :: Name -> Type -> Id #

Like mkLocalId, but checks the type to see if it should make a covar

mkLocalCoVar :: Name -> Type -> CoVar #

Make a local CoVar

mkLocalId :: Name -> Type -> Id #

For an explanation of global vs. local Ids, see Var

mkVanillaGlobalWithInfo :: Name -> Type -> IdInfo -> Id #

Make a global Id with no global information but some generic IdInfo

mkVanillaGlobal :: Name -> Type -> Id #

Make a global Id without any extra information at all

mkGlobalId :: IdDetails -> Name -> Type -> IdInfo -> Id #

For an explanation of global vs. local Ids, see Var

setIdType :: Id -> Type -> Id #

Not only does this set the Id Type, it also evaluates the type to try and reduce space usage

setIdName :: Id -> Name -> Id #

idType :: Id -> Kind #

idName :: Id -> Name #

collectNAnnBndrs :: Int -> AnnExpr bndr annot -> ([bndr], AnnExpr bndr annot) #

As collectNBinders but for AnnExpr rather than Expr

collectAnnBndrs :: AnnExpr bndr annot -> ([bndr], AnnExpr bndr annot) #

As collectBinders but for AnnExpr rather than Expr

deAnnBind :: AnnBind b annot -> Bind b #

deAnnAlt :: AnnAlt bndr annot -> Alt bndr #

deAnnotate' :: AnnExpr' bndr annot -> Expr bndr #

deAnnotate :: AnnExpr bndr annot -> Expr bndr #

collectAnnArgs :: AnnExpr b a -> (AnnExpr b a, [AnnExpr b a]) #

Takes a nested application expression and returns the function being applied and the arguments to which it is applied

valArgCount :: [Arg b] -> Int #

The number of argument expressions that are values rather than types at their top level

valBndrCount :: [CoreBndr] -> Int #

The number of binders that bind values rather than types

isTypeArg :: Expr b -> Bool #

Returns True iff the expression is a Type expression at its top level. Note this does NOT include Coercions.

isCoArg :: Expr b -> Bool #

Returns True iff the expression is a Coercion expression at its top level

isTyCoArg :: Expr b -> Bool #

Returns True iff the expression is a Type or Coercion expression at its top level

isValArg :: Expr b -> Bool #

Returns True for value arguments, false for type args NB: coercions are value arguments (zero width, to be sure, like State#, but still value args).

isRuntimeArg :: CoreExpr -> Bool #

Will this argument expression exist at runtime?

isRuntimeVar :: Var -> Bool #

Will this variable exist at runtime?

collectArgsTicks :: (Tickish Id -> Bool) -> Expr b -> (Expr b, [Arg b], [Tickish Id]) #

Like collectArgs, but also collects looks through floatable ticks if it means that we can find more arguments.

stripNArgs :: Word -> Expr a -> Maybe (Expr a) #

Attempt to remove the last N arguments of a function call. Strip off any ticks or coercions encountered along the way and any at the end.

collectArgs :: Expr b -> (Expr b, [Arg b]) #

Takes a nested application expression and returns the function being applied and the arguments to which it is applied

collectNBinders :: Int -> Expr b -> ([b], Expr b) #

Strip off exactly N leading lambdas (type or value). Good for use with join points.

collectBinders :: Expr b -> ([b], Expr b) #

We often want to strip off leading lambdas before getting down to business. Variants are collectTyBinders, collectValBinders, and collectTyAndValBinders

flattenBinds :: [Bind b] -> [(b, Expr b)] #

Collapse all the bindings in the supplied groups into a single list of lhs/rhs pairs suitable for binding in a Rec binding group

rhssOfAlts :: [Alt b] -> [Expr b] #

rhssOfBind :: Bind b -> [Expr b] #

bindersOfBinds :: [Bind b] -> [b] #

bindersOf applied to a list of binding groups

bindersOf :: Bind b -> [b] #

Extract every variable by this group

exprToCoercion_maybe :: CoreExpr -> Maybe Coercion #

If the expression is a Coercion, converts.

exprToType :: CoreExpr -> Type #

If the expression is a Type, converts. Otherwise, panics. NB: This does not convert Coercion to CoercionTy.

applyTypeToArg :: Type -> CoreExpr -> Type #

Determines the type resulting from applying an expression with given type to a given argument expression

varToCoreExpr :: CoreBndr -> Expr b #

Convert a binder into either a Var or Type Expr appropriately

mkCoBind :: CoVar -> Coercion -> CoreBind #

Create a binding group where a type variable is bound to a type. Per CoreSyn, this can only be used to bind something in a non-recursive let expression

mkTyBind :: TyVar -> Type -> CoreBind #

Create a binding group where a type variable is bound to a type. Per CoreSyn, this can only be used to bind something in a non-recursive let expression

mkLetRec :: [(b, Expr b)] -> Expr b -> Expr b #

mkLetRec binds body wraps body in a let rec with the given set of binds if binds is non-empty.

mkLetNonRec :: b -> Expr b -> Expr b -> Expr b #

mkLetNonRec bndr rhs body wraps body in a let binding bndr.

mkLet :: Bind b -> Expr b -> Expr b #

mkLets :: [Bind b] -> Expr b -> Expr b #

Bind all supplied binding groups over an expression in a nested let expression. Assumes that the rhs satisfies the let/app invariant. Prefer to use mkCoreLets if possible, which does guarantee the invariant

mkLams :: [b] -> Expr b -> Expr b #

Bind all supplied binders over an expression in a nested lambda expression. Prefer to use mkCoreLams if possible

mkDoubleLitDouble :: Double -> Expr b #

Create a machine double precision literal expression of type Double# from a Double. If you want an expression of type Double use mkDoubleExpr

mkDoubleLit :: Rational -> Expr b #

Create a machine double precision literal expression of type Double# from a Rational. If you want an expression of type Double use mkDoubleExpr

mkFloatLitFloat :: Float -> Expr b #

Create a machine single precision literal expression of type Float# from a Float. If you want an expression of type Float use mkFloatExpr

mkFloatLit :: Rational -> Expr b #

Create a machine single precision literal expression of type Float# from a Rational. If you want an expression of type Float use mkFloatExpr

mkStringLit :: String -> Expr b #

Create a machine string literal expression of type Addr#. If you want an expression of type String use mkStringExpr

mkCharLit :: Char -> Expr b #

Create a machine character literal expression of type Char#. If you want an expression of type Char use mkCharExpr

mkWordLitWord :: DynFlags -> Word -> Expr b #

Create a machine word literal expression of type Word# from a Word. If you want an expression of type Word use mkWordExpr

mkWordLit :: DynFlags -> Integer -> Expr b #

Create a machine word literal expression of type Word# from an Integer. If you want an expression of type Word use mkWordExpr

mkIntLitInt :: DynFlags -> Int -> Expr b #

Create a machine integer literal expression of type Int# from an Int. If you want an expression of type Int use mkIntExpr

mkIntLit :: DynFlags -> Integer -> Expr b #

Create a machine integer literal expression of type Int# from an Integer. If you want an expression of type Int use mkIntExpr

mkTyArg :: Type -> Expr b #

mkConApp2 :: DataCon -> [Type] -> [Var] -> Expr b #

mkTyApps :: Expr b -> [Type] -> Expr b infixl 4 #

Apply a list of type argument expressions to a function expression in a nested fashion

mkConApp :: DataCon -> [Arg b] -> Expr b #

Apply a list of argument expressions to a data constructor in a nested fashion. Prefer to use mkCoreConApps if possible

mkVarApps :: Expr b -> [Var] -> Expr b infixl 4 #

Apply a list of type or value variables to a function expression in a nested fashion

mkCoApps :: Expr b -> [Coercion] -> Expr b infixl 4 #

Apply a list of coercion argument expressions to a function expression in a nested fashion

mkApps :: Expr b -> [Arg b] -> Expr b infixl 4 #

Apply a list of argument expressions to a function expression in a nested fashion. Prefer to use mkCoreApps if possible

cmpAltCon :: AltCon -> AltCon -> Ordering #

Compares AltCons within a single list of alternatives DEFAULT comes out smallest, so that sorting by AltCon puts alternatives in the order required: see Note [Case expression invariants]

ltAlt :: (AltCon, a, b) -> (AltCon, a, b) -> Bool #

cmpAlt :: (AltCon, a, b) -> (AltCon, a, b) -> Ordering #

hasSomeUnfolding :: Unfolding -> Bool #

Only returns False if there is no unfolding information available at all

isCheapUnfolding :: Unfolding -> Bool #

Is the thing we will unfold into certainly cheap?

isConLikeUnfolding :: Unfolding -> Bool #

True if the unfolding is a constructor application, the application of a CONLIKE function or OtherCon

isEvaldUnfolding :: Unfolding -> Bool #

Determines if it possibly the case that the unfolding will yield a value. Unlike isValueUnfolding it returns True for OtherCon

isValueUnfolding :: Unfolding -> Bool #

Determines if it is certainly the case that the unfolding will yield a value (something in HNF): returns False if unsure

otherCons :: Unfolding -> [AltCon] #

The constructors that the unfolding could never be: returns [] if no information is available

maybeUnfoldingTemplate :: Unfolding -> Maybe CoreExpr #

Retrieves the template of an unfolding if possible maybeUnfoldingTemplate is used mainly wnen specialising, and we do want to specialise DFuns, so it's important to return a template for DFunUnfoldings

unfoldingTemplate :: Unfolding -> CoreExpr #

Retrieves the template of an unfolding: panics if none is known

bootUnfolding :: Unfolding #

There is no known Unfolding, because this came from an hi-boot file.

evaldUnfolding :: Unfolding #

This unfolding marks the associated thing as being evaluated

noUnfolding :: Unfolding #

There is no known Unfolding

setRuleIdName :: Name -> CoreRule -> CoreRule #

Set the Name of the Id at the head of the rule left hand side

ruleIdName :: CoreRule -> Name #

The Name of the Id at the head of the rule left hand side

ruleArity :: CoreRule -> Int #

The number of arguments the ru_fn must be applied to before the rule can match on it

notOrphan :: IsOrphan -> Bool #

Returns true if IsOrphan is not an orphan.

isOrphan :: IsOrphan -> Bool #

Returns true if IsOrphan is orphan.

tickishContains :: Eq b => Tickish b -> Tickish b -> Bool #

Returns whether one tick "contains" the other one, therefore making the second tick redundant.

tickishPlace :: Tickish id -> TickishPlacement #

Placement behaviour we want for the ticks

tickishIsCode :: Tickish id -> Bool #

Return True if this source annotation compiles to some backend code. Without this flag, the tickish is seen as a simple annotation that does not have any associated evaluation code.

What this means that we are allowed to disregard the tick if doing so means that we can skip generating any code in the first place. A typical example is top-level bindings:

foo = tick... y -> ... ==> foo = y -> tick... ...

Here there is just no operational difference between the first and the second version. Therefore code generation should simply translate the code as if it found the latter.

tickishCanSplit :: Tickish id -> Bool #

Returns True for a tick that is both counting and scoping and can be split into its (tick, scope) parts using mkNoScope and mkNoTick respectively.

tickishFloatable :: Tickish id -> Bool #

Returns True for ticks that can be floated upwards easily even where it might change execution counts, such as:

Just (tick... foo) ==> tick... (Just foo)

This is a combination of tickishSoftScope and tickishCounts. Note that in principle splittable ticks can become floatable using mkNoTick -- even though there's currently no tickish for which that is the case.

tickishScopesLike :: Tickish id -> TickishScoping -> Bool #

Returns whether the tick scoping rule is at least as permissive as the given scoping rule.

tickishScoped :: Tickish id -> TickishScoping #

Returns the intended scoping rule for a Tickish

tickishCounts :: Tickish id -> Bool #

A "counting tick" (where tickishCounts is True) is one that counts evaluations in some way. We cannot discard a counting tick, and the compiler should preserve the number of counting ticks as far as possible.

However, we still allow the simplifier to increase or decrease sharing, so in practice the actual number of ticks may vary, except that we never change the value from zero to non-zero or vice versa.

data Expr b #

This is the data type that represents GHCs core intermediate language. Currently GHC uses System FC https://www.microsoft.com/en-us/research/publication/system-f-with-type-equality-coercions/ for this purpose, which is closely related to the simpler and better known System F http://en.wikipedia.org/wiki/System_F.

We get from Haskell source to this Core language in a number of stages:

  1. The source code is parsed into an abstract syntax tree, which is represented by the data type HsExpr with the names being RdrNames
  2. This syntax tree is renamed, which attaches a Unique to every RdrName (yielding a Name) to disambiguate identifiers which are lexically identical. For example, this program:
     f x = let f x = x + 1
           in f (x - 2)

Would be renamed by having Uniques attached so it looked something like this:

     f_1 x_2 = let f_3 x_4 = x_4 + 1
               in f_3 (x_2 - 2)

But see Note [Shadowing] below.

  1. The resulting syntax tree undergoes type checking (which also deals with instantiating type class arguments) to yield a HsExpr type that has Id as it's names.
  2. Finally the syntax tree is desugared from the expressive HsExpr type into this Expr type, which has far fewer constructors and hence is easier to perform optimization, analysis and code generation on.

The type parameter b is for the type of binders in the expression tree.

The language consists of the following elements:

  • Variables See Note [Variable occurrences in Core]
  • Primitive literals
  • Applications: note that the argument may be a Type. See Note [CoreSyn let/app invariant] See Note [Levity polymorphism invariants]
  • Lambda abstraction See Note [Levity polymorphism invariants]
  • Recursive and non recursive lets. Operationally this corresponds to allocating a thunk for the things bound and then executing the sub-expression.

See Note [CoreSyn letrec invariant] See Note [CoreSyn let/app invariant] See Note [Levity polymorphism invariants] See Note [CoreSyn type and coercion invariant]

  • Case expression. Operationally this corresponds to evaluating the scrutinee (expression examined) to weak head normal form and then examining at most one level of resulting constructor (i.e. you cannot do nested pattern matching directly with this).

The binder gets bound to the value of the scrutinee, and the Type must be that of all the case alternatives

IMPORTANT: see Note [Case expression invariants]

  • Cast an expression to a particular type. This is used to implement newtypes (a newtype constructor or destructor just becomes a Cast in Core) and GADTs.
  • Notes. These allow general information to be added to expressions in the syntax tree
  • A type: this should only show up at the top level of an Arg
  • A coercion

Constructors

Var Id 
Lit Literal 
App (Expr b) (Arg b) infixl 4 
Lam b (Expr b) 
Let (Bind b) (Expr b) 
Case (Expr b) b Type [Alt b] 
Cast (Expr b) Coercion 
Tick (Tickish Id) (Expr b) 
Type Type 
Coercion Coercion 

Instances

Instances details
Show CoreExpr # 
Instance details

Defined in Language.Haskell.Liquid.Transforms.CoreToLogic

Subable CoreExpr # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Play

Methods

sub :: HashMap CoreBndr CoreExpr -> CoreExpr -> CoreExpr #

subTy :: HashMap TyVar Type -> CoreExpr -> CoreExpr #

Eq (DeBruijn CoreExpr) 
Instance details

Defined in CoreMap

Methods

(==) :: DeBruijn CoreExpr -> DeBruijn CoreExpr -> Bool #

(/=) :: DeBruijn CoreExpr -> DeBruijn CoreExpr -> Bool #

Eq (DeBruijn CoreAlt) 
Instance details

Defined in CoreMap

Methods

(==) :: DeBruijn CoreAlt -> DeBruijn CoreAlt -> Bool #

(/=) :: DeBruijn CoreAlt -> DeBruijn CoreAlt -> Bool #

Data b => Data (Expr b) 
Instance details

Defined in CoreSyn

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Expr b -> c (Expr b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Expr b) #

toConstr :: Expr b -> Constr #

dataTypeOf :: Expr b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Expr b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Expr b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Expr b -> Expr b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Expr b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Expr b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Expr b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Expr b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Expr b -> m (Expr b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr b -> m (Expr b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr b -> m (Expr b) #

PPrint (Expr Var) # 
Instance details

Defined in Language.Haskell.Liquid.Types.PrettyPrint

Methods

pprintTidy :: Tidy -> Expr Var -> Doc #

pprintPrec :: Int -> Tidy -> Expr Var -> Doc #

CBVisitable (Expr Var) # 
Instance details

Defined in Language.Haskell.Liquid.Types.Visitors

Methods

freeVars :: HashSet Var -> Expr Var -> [Var] #

readVars :: Expr Var -> [Var] #

letVars :: Expr Var -> [Var] #

literals :: Expr Var -> [Literal] #

CBVisitable (Alt Var) # 
Instance details

Defined in Language.Haskell.Liquid.Types.Visitors

Methods

freeVars :: HashSet Var -> Alt Var -> [Var] #

readVars :: Alt Var -> [Var] #

letVars :: Alt Var -> [Var] #

literals :: Alt Var -> [Literal] #

Subable (Alt Var) # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Play

Methods

sub :: HashMap CoreBndr CoreExpr -> Alt Var -> Alt Var #

subTy :: HashMap TyVar Type -> Alt Var -> Alt Var #

Show (Axiom Var Type CoreExpr) # 
Instance details

Defined in Language.Haskell.Liquid.Types.Types

type Arg b = Expr b #

Type synonym for expressions that occur in function argument positions. Only Arg should contain a Type at top level, general Expr should not

type Alt b = (AltCon, [b], Expr b) #

A case split alternative. Consists of the constructor leading to the alternative, the variables bound from the constructor, and the expression to be executed given that binding. The default alternative is (DEFAULT, [], rhs)

data AltCon #

A case alternative constructor (i.e. pattern match)

Constructors

DataAlt DataCon 
LitAlt Literal

A literal: case e of { 1 -> ... } Invariant: always an *unlifted* literal See Note [Literal alternatives]

DEFAULT

Trivial alternative: case e of { _ -> ... }

Instances

Instances details
Eq AltCon 
Instance details

Defined in CoreSyn

Methods

(==) :: AltCon -> AltCon -> Bool #

(/=) :: AltCon -> AltCon -> Bool #

Data AltCon 
Instance details

Defined in CoreSyn

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AltCon -> c AltCon #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AltCon #

toConstr :: AltCon -> Constr #

dataTypeOf :: AltCon -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AltCon) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AltCon) #

gmapT :: (forall b. Data b => b -> b) -> AltCon -> AltCon #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AltCon -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AltCon -> r #

gmapQ :: (forall d. Data d => d -> u) -> AltCon -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AltCon -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AltCon -> m AltCon #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AltCon -> m AltCon #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AltCon -> m AltCon #

Ord AltCon 
Instance details

Defined in CoreSyn

Outputable AltCon 
Instance details

Defined in CoreSyn

Methods

ppr :: AltCon -> SDoc #

pprPrec :: Rational -> AltCon -> SDoc #

PPrint AltCon # 
Instance details

Defined in Language.Haskell.Liquid.Synthesize.Misc

Methods

pprintTidy :: Tidy -> AltCon -> Doc #

pprintPrec :: Int -> Tidy -> AltCon -> Doc #

CBVisitable AltCon # 
Instance details

Defined in Language.Haskell.Liquid.Types.Visitors

Methods

freeVars :: HashSet Var -> AltCon -> [Var] #

readVars :: AltCon -> [Var] #

letVars :: AltCon -> [Var] #

literals :: AltCon -> [Literal] #

Eq (DeBruijn CoreAlt) 
Instance details

Defined in CoreMap

Methods

(==) :: DeBruijn CoreAlt -> DeBruijn CoreAlt -> Bool #

(/=) :: DeBruijn CoreAlt -> DeBruijn CoreAlt -> Bool #

CBVisitable (Alt Var) # 
Instance details

Defined in Language.Haskell.Liquid.Types.Visitors

Methods

freeVars :: HashSet Var -> Alt Var -> [Var] #

readVars :: Alt Var -> [Var] #

letVars :: Alt Var -> [Var] #

literals :: Alt Var -> [Literal] #

Subable (Alt Var) # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Play

Methods

sub :: HashMap CoreBndr CoreExpr -> Alt Var -> Alt Var #

subTy :: HashMap TyVar Type -> Alt Var -> Alt Var #

data Bind b #

Binding, used for top level bindings in a module and local bindings in a let.

Constructors

NonRec b (Expr b) 
Rec [(b, Expr b)] 

Instances

Instances details
CBVisitable CoreBind # 
Instance details

Defined in Language.Haskell.Liquid.Types.Visitors

Methods

freeVars :: HashSet Var -> CoreBind -> [Var] #

readVars :: CoreBind -> [Var] #

letVars :: CoreBind -> [Var] #

literals :: CoreBind -> [Literal] #

Data b => Data (Bind b) 
Instance details

Defined in CoreSyn

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Bind b -> c (Bind b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Bind b) #

toConstr :: Bind b -> Constr #

dataTypeOf :: Bind b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Bind b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Bind b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Bind b -> Bind b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bind b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bind b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Bind b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Bind b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bind b -> m (Bind b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bind b -> m (Bind b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bind b -> m (Bind b) #

PPrint (Bind Var) # 
Instance details

Defined in Language.Haskell.Liquid.Types.PrettyPrint

Methods

pprintTidy :: Tidy -> Bind Var -> Doc #

pprintPrec :: Int -> Tidy -> Bind Var -> Doc #

CBVisitable [CoreBind] # 
Instance details

Defined in Language.Haskell.Liquid.Types.Visitors

Methods

freeVars :: HashSet Var -> [CoreBind] -> [Var] #

readVars :: [CoreBind] -> [Var] #

letVars :: [CoreBind] -> [Var] #

literals :: [CoreBind] -> [Literal] #

Subable (Bind Var) # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Play

Methods

sub :: HashMap CoreBndr CoreExpr -> Bind Var -> Bind Var #

subTy :: HashMap TyVar Type -> Bind Var -> Bind Var #

type InType = Type #

type InKind = Kind #

type InAlt = CoreAlt #

type InArg = CoreArg #

type OutType = Type #

type OutKind = Kind #

data Tickish id #

Allows attaching extra information to points in expressions

Constructors

ProfNote

An {--} profiling annotation, either automatically added by the desugarer as a result of -auto-all, or added by the user.

Fields

HpcTick

A "tick" used by HPC to track the execution of each subexpression in the original source code.

Fields

Breakpoint

A breakpoint for the GHCi debugger. This behaves like an HPC tick, but has a list of free variables which will be available for inspection in GHCi when the program stops at the breakpoint.

NB. we must take account of these Ids when (a) counting free variables, and (b) substituting (don't substitute for them)

Fields

  • breakpointId :: !Int
     
  • breakpointFVs :: [id]

    the order of this list is important: it matches the order of the lists in the appropriate entry in HscTypes.ModBreaks.

    Careful about substitution! See Note [substTickish] in CoreSubst.

SourceNote

A source note.

Source notes are pure annotations: Their presence should neither influence compilation nor execution. The semantics are given by causality: The presence of a source note means that a local change in the referenced source code span will possibly provoke the generated code to change. On the flip-side, the functionality of annotated code *must* be invariant against changes to all source code *except* the spans referenced in the source notes (see "Causality of optimized Haskell" paper for details).

Therefore extending the scope of any given source note is always valid. Note that it is still undesirable though, as this reduces their usefulness for debugging and profiling. Therefore we will generally try only to make use of this property where it is necessary to enable optimizations.

Fields

Instances

Instances details
Eq id => Eq (Tickish id) 
Instance details

Defined in CoreSyn

Methods

(==) :: Tickish id -> Tickish id -> Bool #

(/=) :: Tickish id -> Tickish id -> Bool #

Data id => Data (Tickish id) 
Instance details

Defined in CoreSyn

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Tickish id -> c (Tickish id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Tickish id) #

toConstr :: Tickish id -> Constr #

dataTypeOf :: Tickish id -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Tickish id)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tickish id)) #

gmapT :: (forall b. Data b => b -> b) -> Tickish id -> Tickish id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tickish id -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tickish id -> r #

gmapQ :: (forall d. Data d => d -> u) -> Tickish id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Tickish id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tickish id -> m (Tickish id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tickish id -> m (Tickish id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tickish id -> m (Tickish id) #

Ord id => Ord (Tickish id) 
Instance details

Defined in CoreSyn

Methods

compare :: Tickish id -> Tickish id -> Ordering #

(<) :: Tickish id -> Tickish id -> Bool #

(<=) :: Tickish id -> Tickish id -> Bool #

(>) :: Tickish id -> Tickish id -> Bool #

(>=) :: Tickish id -> Tickish id -> Bool #

max :: Tickish id -> Tickish id -> Tickish id #

min :: Tickish id -> Tickish id -> Tickish id #

data TickishScoping #

Specifies the scoping behaviour of ticks. This governs the behaviour of ticks that care about the covered code and the cost associated with it. Important for ticks relating to profiling.

Constructors

NoScope

No scoping: The tick does not care about what code it covers. Transformations can freely move code inside as well as outside without any additional annotation obligations

SoftScope

Soft scoping: We want all code that is covered to stay covered. Note that this scope type does not forbid transformations from happening, as long as all results of the transformations are still covered by this tick or a copy of it. For example

let x = tick... (let y = foo in bar) in baz ===> let x = tick... bar; y = tick... foo in baz

Is a valid transformation as far as "bar" and "foo" is concerned, because both still are scoped over by the tick.

Note though that one might object to the "let" not being covered by the tick any more. However, we are generally lax with this - constant costs don't matter too much, and given that the "let" was effectively merged we can view it as having lost its identity anyway.

Also note that this scoping behaviour allows floating a tick "upwards" in pretty much any situation. For example:

case foo of x -> tick... bar ==> tick... case foo of x -> bar

While this is always leagl, we want to make a best effort to only make us of this where it exposes transformation opportunities.

CostCentreScope

Cost centre scoping: We don't want any costs to move to other cost-centre stacks. This means we not only want no code or cost to get moved out of their cost centres, but we also object to code getting associated with new cost-centre ticks - or changing the order in which they get applied.

A rule of thumb is that we don't want any code to gain new annotations. However, there are notable exceptions, for example:

let f = y -> foo in tick... ... (f x) ... ==> tick... ... foo[x/y] ...

In-lining lambdas like this is always legal, because inlining a function does not change the cost-centre stack when the function is called.

Instances

Instances details
Eq TickishScoping 
Instance details

Defined in CoreSyn

data TickishPlacement #

Governs the kind of expression that the tick gets placed on when annotating for example using mkTick. If we find that we want to put a tickish on an expression ruled out here, we try to float it inwards until we find a suitable expression.

Constructors

PlaceRuntime

Place ticks exactly on run-time expressions. We can still move the tick through pure compile-time constructs such as other ticks, casts or type lambdas. This is the most restrictive placement rule for ticks, as all tickishs have in common that they want to track runtime processes. The only legal placement rule for counting ticks.

PlaceNonLam

As PlaceRuntime, but we float the tick through all lambdas. This makes sense where there is little difference between annotating the lambda and annotating the lambda's code.

PlaceCostCentre

In addition to floating through lambdas, cost-centre style tickishs can also be moved from constructors, non-function variables and literals. For example:

let x = scc... C (scc... y) (scc... 3) in ...

Neither the constructor application, the variable or the literal are likely to have any cost worth mentioning. And even if y names a thunk, the call would not care about the evaluation context. Therefore removing all annotations in the above example is safe.

Instances

Instances details
Eq TickishPlacement 
Instance details

Defined in CoreSyn

data IsOrphan #

Is this instance an orphan? If it is not an orphan, contains an OccName witnessing the instance's non-orphanhood. See Note [Orphans]

Constructors

IsOrphan 
NotOrphan OccName 

Instances

Instances details
Data IsOrphan 
Instance details

Defined in CoreSyn

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IsOrphan -> c IsOrphan #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IsOrphan #

toConstr :: IsOrphan -> Constr #

dataTypeOf :: IsOrphan -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IsOrphan) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IsOrphan) #

gmapT :: (forall b. Data b => b -> b) -> IsOrphan -> IsOrphan #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IsOrphan -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IsOrphan -> r #

gmapQ :: (forall d. Data d => d -> u) -> IsOrphan -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IsOrphan -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IsOrphan -> m IsOrphan #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IsOrphan -> m IsOrphan #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IsOrphan -> m IsOrphan #

Binary IsOrphan 
Instance details

Defined in CoreSyn

type RuleBase = NameEnv [CoreRule] #

Gathers a collection of CoreRules. Maps (the name of) an Id to its rules

data RuleEnv #

A full rule environment which we can apply rules from. Like a RuleBase, but it also includes the set of visible orphans we use to filter out orphan rules which are not visible (even though we can see them...)

Constructors

RuleEnv 

data CoreRule #

A CoreRule is:

  • "Local" if the function it is a rule for is defined in the same module as the rule itself.
  • "Orphan" if nothing on the LHS is defined in the same module as the rule itself

Constructors

Rule 

Fields

  • ru_name :: RuleName

    Name of the rule, for communication with the user

  • ru_act :: Activation

    When the rule is active

  • ru_fn :: Name

    Name of the Id at the head of this rule

  • ru_rough :: [Maybe Name]

    Name at the head of each argument to the left hand side

  • ru_bndrs :: [CoreBndr]

    Variables quantified over

  • ru_args :: [CoreExpr]

    Left hand side arguments

  • ru_rhs :: CoreExpr

    Right hand side of the rule Occurrence info is guaranteed correct See Note [OccInfo in unfoldings and rules]

  • ru_auto :: Bool

    True = this rule is auto-generated (notably by Specialise or SpecConstr) False = generated at the user's behest See Note [Trimming auto-rules] in TidyPgm for the sole purpose of this field.

  • ru_origin :: !Module

    Module the rule was defined in, used to test if we should see an orphan rule.

  • ru_orphan :: !IsOrphan

    Whether or not the rule is an orphan.

  • ru_local :: Bool

    True iff the fn at the head of the rule is defined in the same module as the rule and is not an implicit Id (like a record selector, class operation, or data constructor). This is different from ru_orphan, where a rule can avoid being an orphan if *any* Name in LHS of the rule was defined in the same module as the rule.

BuiltinRule

Built-in rules are used for constant folding and suchlike. They have no free variables. A built-in rule is always visible (there is no such thing as an orphan built-in rule.)

Fields

  • ru_name :: RuleName

    Name of the rule, for communication with the user

  • ru_fn :: Name

    Name of the Id at the head of this rule

  • ru_nargs :: Int

    Number of arguments that ru_try consumes, if it fires, including type arguments

  • ru_try :: RuleFun

    This function does the rewrite. It given too many arguments, it simply discards them; the returned CoreExpr is just the rewrite of ru_fn applied to the first ru_nargs args

data Unfolding #

Records the unfolding of an identifier, which is approximately the form the identifier would have if we substituted its definition in for the identifier. This type should be treated as abstract everywhere except in CoreUnfold

Constructors

NoUnfolding

We have no information about the unfolding.

BootUnfolding

We have no information about the unfolding, because this Id came from an hi-boot file. See Note [Inlining and hs-boot files] in ToIface for what this is used for.

OtherCon [AltCon]

It ain't one of these constructors. OtherCon xs also indicates that something has been evaluated and hence there's no point in re-evaluating it. OtherCon [] is used even for non-data-type values to indicated evaluated-ness. Notably:

data C = C !(Int -> Int)
case x of { C f -> ... }

Here, f gets an OtherCon [] unfolding.

DFunUnfolding 

Fields

CoreUnfolding

An unfolding with redundant cached information. Parameters:

uf_tmpl: Template used to perform unfolding; NB: Occurrence info is guaranteed correct: see Note [OccInfo in unfoldings and rules]

uf_is_top: Is this a top level binding?

uf_is_value: exprIsHNF template (cached); it is ok to discard a seq on this variable

uf_is_work_free: Does this waste only a little work if we expand it inside an inlining? Basically this is a cached version of exprIsWorkFree

uf_guidance: Tells us about the size of the unfolding template

data UnfoldingGuidance #

UnfoldingGuidance says when unfolding should take place

Constructors

UnfWhen 
UnfIfGoodArgs 

Fields

UnfNever 

Instances

Instances details
Eq UnfoldingGuidance 
Instance details

Defined in CoreSyn

type CoreBndr = Var #

The common case for the type of binders and variables when we are manipulating the Core language within GHC

type CoreExpr = Expr CoreBndr #

Expressions where binders are CoreBndrs

type CoreArg = Arg CoreBndr #

Argument expressions where binders are CoreBndrs

type CoreBind = Bind CoreBndr #

Binding groups where binders are CoreBndrs

type CoreAlt = Alt CoreBndr #

Case alternatives where binders are CoreBndrs

data TaggedBndr t #

Binders are tagged with a t

Constructors

TB CoreBndr t 

Instances

Instances details
Outputable b => Outputable (TaggedBndr b) 
Instance details

Defined in CoreSyn

Methods

ppr :: TaggedBndr b -> SDoc #

pprPrec :: Rational -> TaggedBndr b -> SDoc #

type TaggedArg t = Arg (TaggedBndr t) #

type TaggedAlt t = Alt (TaggedBndr t) #

type AnnAlt bndr annot = (AltCon, [bndr], AnnExpr bndr annot) #

A clone of the Alt type but allowing annotation at every tree node

data AnnBind bndr annot #

A clone of the Bind type but allowing annotation at every tree node

Constructors

AnnNonRec bndr (AnnExpr bndr annot) 

conLikesWithFields :: [ConLike] -> [FieldLabelString] -> [ConLike] #

The ConLikes that have *all* the given fields

conLikeFieldType :: ConLike -> FieldLabelString -> Type #

Extract the type for any given labelled field of the ConLike

conLikeFullSig :: ConLike -> ([TyVar], [TyCoVar], [EqSpec], ThetaType, ThetaType, [Type], Type) #

The "full signature" of the ConLike returns, in order:

1) The universally quantified type variables

2) The existentially quantified type/coercion variables

3) The equality specification

4) The provided theta (the constraints provided by a match)

5) The required theta (the constraints required for a match)

6) The original argument types (i.e. before any change of the representation of the type)

7) The original result type

conLikeResTy :: ConLike -> [Type] -> Type #

Returns the type of the whole pattern

conLikeImplBangs :: ConLike -> [HsImplBang] #

Returns the strictness information for each constructor

conLikeWrapId_maybe :: ConLike -> Maybe Id #

Returns the Id of the wrapper. This is also known as the builder in some contexts. The value is Nothing only in the case of unidirectional pattern synonyms.

conLikeStupidTheta :: ConLike -> ThetaType #

The "stupid theta" of the ConLike, such as data Eq a in:

data Eq a => T a = ...

It is empty for PatSynCon as they do not allow such contexts.

conLikeExTyCoVars :: ConLike -> [TyCoVar] #

Existentially quantified type/coercion variables

conLikeInstOrigArgTys :: ConLike -> [Type] -> [Type] #

Returns just the instantiated value argument types of a ConLike, (excluding dictionary args)

conLikeFieldLabels :: ConLike -> [FieldLabel] #

Names of fields used for selectors

conLikeArity :: ConLike -> Arity #

Number of arguments

buildSynTyCon #

Arguments

:: Name 
-> [KnotTied TyConBinder] 
-> Kind

result kind

-> [Role] 
-> KnotTied Type 
-> TyCon 

buildAlgTyCon #

Arguments

:: Name 
-> [TyVar]

Kind variables and type variables

-> [Role] 
-> Maybe CType 
-> ThetaType

Stupid theta

-> AlgTyConRhs 
-> Bool

True = was declared in GADT syntax

-> AlgTyConFlav 
-> TyCon 

splitDataProductType_maybe #

Arguments

:: Type

A product type, perhaps

-> Maybe (TyCon, [Type], DataCon, [Type]) 

Extract the type constructor, type argument, data constructor and it's representation argument types from a type if it is a product type.

Precisely, we return Just for any type that is all of:

  • Concrete (i.e. constructors visible)
  • Single-constructor
  • Not existentially quantified

Whether the type is a data type or a newtype

dataConUserTyVarsArePermuted :: DataCon -> Bool #

Were the type variables of the data con written in a different order than the regular order (universal tyvars followed by existential tyvars)?

This is not a cheap test, so we minimize its use in GHC as much as possible. Currently, its only call site in the GHC codebase is in mkDataConRep in MkId, and so dataConUserTyVarsArePermuted is only called at most once during a data constructor's lifetime.

specialPromotedDc :: DataCon -> Bool #

Should this DataCon be allowed in a type even without -XDataKinds? Currently, only Lifted & Unlifted

isVanillaDataCon :: DataCon -> Bool #

Vanilla DataCons are those that are nice boring Haskell 98 constructors

dataConIdentity :: DataCon -> ByteString #

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

dataConRepArgTys :: DataCon -> [Type] #

Returns the arg types of the worker, including *all* non-dependent evidence, after any flattening has been done and without substituting for any type variables

dataConOrigArgTys :: DataCon -> [Type] #

Returns the argument types of the wrapper, excluding all dictionary arguments and without substituting for any type variables

dataConInstArgTys #

Arguments

:: DataCon

A datacon with no existentials or equality constraints However, it can have a dcTheta (notably it can be a class dictionary, with superclasses)

-> [Type]

Instantiated at these types

-> [Type] 

Finds the instantiated types of the arguments required to construct a DataCon representation NB: these INCLUDE any dictionary args but EXCLUDE the data-declaration context, which is discarded It's all post-flattening etc; this is a representation type

dataConUserType :: DataCon -> Type #

The user-declared type of the data constructor in the nice-to-read form:

T :: forall a b. a -> b -> T [a]

rather than:

T :: forall a c. forall b. (c~[a]) => a -> b -> T c

The type variables are quantified in the order that the user wrote them. See Note [DataCon user type variable binders].

NB: If the constructor is part of a data instance, the result type mentions the family tycon, not the internal one.

dataConInstSig :: DataCon -> [Type] -> ([TyCoVar], ThetaType, [Type]) #

Instantiate the universal tyvars of a data con, returning ( instantiated existentials , instantiated constraints including dependent GADT equalities which are *also* listed in the instantiated existentials , instantiated args)

dataConSig :: DataCon -> ([TyCoVar], ThetaType, [Type], Type) #

The "signature" of the DataCon returns, in order:

1) The result of dataConUnivAndExTyCoVars,

2) All the ThetaTypes relating to the DataCon (coercion, dictionary, implicit parameter - whatever), including dependent GADT equalities. Dependent GADT equalities are *also* listed in return value (1), so be careful!

3) The type arguments to the constructor

4) The original result type of the DataCon

dataConRepStrictness :: DataCon -> [StrictnessMark] #

Give the demands on the arguments of a Core constructor application (Con dc args)

isNullaryRepDataCon :: DataCon -> Bool #

Return whether there are any argument types for this DataCons runtime representation type See Note [DataCon arities]

isNullarySrcDataCon :: DataCon -> Bool #

Return whether there are any argument types for this DataCons original source type See Note [DataCon arities]

dataConRepArity :: DataCon -> Arity #

Gives the number of actual fields in the representation of the data constructor. This may be more than appear in the source code; the extra ones are the existentially quantified dictionaries

dataConSrcBangs :: DataCon -> [HsSrcBang] #

Strictness/unpack annotations, from user; or, for imported DataCons, from the interface file The list is in one-to-one correspondence with the arity of the DataCon

dataConFieldType_maybe :: DataCon -> FieldLabelString -> Maybe (FieldLabel, Type) #

Extract the label and type for any given labelled field of the DataCon, or return Nothing if the field does not belong to it

dataConFieldType :: DataCon -> FieldLabelString -> Type #

Extract the type for any given labelled field of the DataCon

dataConImplicitTyThings :: DataCon -> [TyThing] #

Find all the Ids implicitly brought into scope by the data constructor. Currently, the union of the dataConWorkId and the dataConWrapId

dataConWrapId :: DataCon -> Id #

Returns an Id which looks like the Haskell-source constructor by using the wrapper if it exists (see dataConWrapId_maybe) and failing over to the worker (see dataConWorkId)

dataConWrapId_maybe :: DataCon -> Maybe Id #

Get the Id of the DataCon wrapper: a function that wraps the "actual" constructor so it has the type visible in the source program: c.f. dataConWorkId. Returns Nothing if there is no wrapper, which occurs for an algebraic data constructor and also for a newtype (whose constructor is inlined compulsorily)

dataConWorkId :: DataCon -> Id #

Get the Id of the DataCon worker: a function that is the "actual" constructor and has no top level binding in the program. The type may be different from the obvious one written in the source program. Panics if there is no such Id for this DataCon

dataConTheta :: DataCon -> ThetaType #

The *full* constraints on the constructor type, including dependent GADT equalities.

dataConEqSpec :: DataCon -> [EqSpec] #

Equalities derived from the result type of the data constructor, as written by the programmer in any GADT declaration. This includes *all* GADT-like equalities, including those written in by hand by the programmer.

dataConUnivAndExTyCoVars :: DataCon -> [TyCoVar] #

Both the universal and existential type/coercion variables of the constructor

dataConUnivTyVars :: DataCon -> [TyVar] #

The universally-quantified type variables of the constructor

dataConIsInfix :: DataCon -> Bool #

Should the DataCon be presented infix?

dataConRepType :: DataCon -> Type #

The representation type of the data constructor, i.e. the sort type that will represent values of this type at runtime

dataConOrigTyCon :: DataCon -> TyCon #

The original type constructor used in the definition of this data constructor. In case of a data family instance, that will be the family type constructor.

dataConTag :: DataCon -> ConTag #

The tag used for ordering DataCons

mkDataCon #

Arguments

:: Name 
-> Bool

Is the constructor declared infix?

-> TyConRepName

TyConRepName for the promoted TyCon

-> [HsSrcBang]

Strictness/unpack annotations, from user

-> [FieldLabel]

Field labels for the constructor, if it is a record, otherwise empty

-> [TyVar]

Universals.

-> [TyCoVar]

Existentials.

-> [TyVarBinder]

User-written TyVarBinders. These must be Inferred/Specified. See Note [TyVarBinders in DataCons]

-> [EqSpec]

GADT equalities

-> KnotTied ThetaType

Theta-type occurring before the arguments proper

-> [KnotTied Type]

Original argument types

-> KnotTied Type

Original result type

-> RuntimeRepInfo

See comments on RuntimeRepInfo

-> KnotTied TyCon

Representation type constructor

-> ConTag

Constructor tag

-> ThetaType

The "stupid theta", context of the data declaration e.g. data Eq a => T a ...

-> Id

Worker Id

-> DataConRep

Representation

-> DataCon 

Build a new data constructor

eqHsBang :: HsImplBang -> HsImplBang -> Bool #

Compare strictness annotations

filterEqSpec :: [EqSpec] -> [TyVar] -> [TyVar] #

Filter out any TyVars mentioned in an EqSpec.

substEqSpec :: TCvSubst -> EqSpec -> EqSpec #

Substitute in an EqSpec. Precondition: if the LHS of the EqSpec is mapped in the substitution, it is mapped to a type variable, not a full type.

mkEqSpec :: TyVar -> Type -> EqSpec #

Make a non-dependent EqSpec

data HsSrcBang #

Haskell Source Bang

Bangs on data constructor arguments as the user wrote them in the source code.

(HsSrcBang _ SrcUnpack SrcLazy) and (HsSrcBang _ SrcUnpack NoSrcStrict) (without StrictData) makes no sense, we emit a warning (in checkValidDataCon) and treat it like (HsSrcBang _ NoSrcUnpack SrcLazy)

Instances

Instances details
Data HsSrcBang 
Instance details

Defined in DataCon

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSrcBang -> c HsSrcBang #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsSrcBang #

toConstr :: HsSrcBang -> Constr #

dataTypeOf :: HsSrcBang -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsSrcBang) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsSrcBang) #

gmapT :: (forall b. Data b => b -> b) -> HsSrcBang -> HsSrcBang #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSrcBang -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSrcBang -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsSrcBang -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSrcBang -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang #

Outputable HsSrcBang 
Instance details

Defined in DataCon

data HsImplBang #

Haskell Implementation Bang

Bangs of data constructor arguments as generated by the compiler after consulting HsSrcBang, flags, etc.

Constructors

HsLazy

Lazy field, or one with an unlifted type

HsStrict

Strict but not unpacked field

HsUnpack (Maybe Coercion)

Strict and unpacked field co :: arg-ty ~ product-ty HsBang

Instances

Instances details
Data HsImplBang 
Instance details

Defined in DataCon

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsImplBang -> c HsImplBang #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsImplBang #

toConstr :: HsImplBang -> Constr #

dataTypeOf :: HsImplBang -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsImplBang) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsImplBang) #

gmapT :: (forall b. Data b => b -> b) -> HsImplBang -> HsImplBang #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsImplBang -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsImplBang -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsImplBang -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsImplBang -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang #

Outputable HsImplBang 
Instance details

Defined in DataCon

data SrcStrictness #

Source Strictness

What strictness annotation the user wrote

Constructors

SrcLazy

Lazy, ie '~'

SrcStrict

Strict, ie !

NoSrcStrict

no strictness annotation

Instances

Instances details
Eq SrcStrictness 
Instance details

Defined in DataCon

Data SrcStrictness 
Instance details

Defined in DataCon

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcStrictness -> c SrcStrictness #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcStrictness #

toConstr :: SrcStrictness -> Constr #

dataTypeOf :: SrcStrictness -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcStrictness) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcStrictness) #

gmapT :: (forall b. Data b => b -> b) -> SrcStrictness -> SrcStrictness #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r #

gmapQ :: (forall d. Data d => d -> u) -> SrcStrictness -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcStrictness -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness #

Binary SrcStrictness 
Instance details

Defined in DataCon

Outputable SrcStrictness 
Instance details

Defined in DataCon

data SrcUnpackedness #

Source Unpackedness

What unpackedness the user requested

Constructors

SrcUnpack

{--} specified

SrcNoUnpack

{--} specified

NoSrcUnpack

no unpack pragma

Instances

Instances details
Eq SrcUnpackedness 
Instance details

Defined in DataCon

Data SrcUnpackedness 
Instance details

Defined in DataCon

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcUnpackedness -> c SrcUnpackedness #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcUnpackedness #

toConstr :: SrcUnpackedness -> Constr #

dataTypeOf :: SrcUnpackedness -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcUnpackedness) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcUnpackedness) #

gmapT :: (forall b. Data b => b -> b) -> SrcUnpackedness -> SrcUnpackedness #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r #

gmapQ :: (forall d. Data d => d -> u) -> SrcUnpackedness -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcUnpackedness -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness #

Binary SrcUnpackedness 
Instance details

Defined in DataCon

Outputable SrcUnpackedness 
Instance details

Defined in DataCon

data StrictnessMark #

Instances

Instances details
Outputable StrictnessMark 
Instance details

Defined in DataCon

hsOverLitNeedsParens :: PprPrec -> HsOverLit x -> Bool #

hsOverLitNeedsParens p ol returns True if an overloaded literal ol needs to be parenthesized under precedence p.

hsLitNeedsParens :: PprPrec -> HsLit x -> Bool #

hsLitNeedsParens p l returns True if a literal l needs to be parenthesized under precedence p.

pmPprHsLit :: forall (x :: Pass). HsLit (GhcPass x) -> SDoc #

pmPprHsLit pretty prints literals and is used when pretty printing pattern match warnings. All are printed the same (i.e., without hashes if they are primitive and not wrapped in constructors if they are boxed). This happens mainly for too reasons: * We do not want to expose their internal representation * The warnings become too messy

convertLit :: ConvertIdX a b => HsLit a -> HsLit b #

Convert a literal from one index type to another, updating the annotations according to the relevant Convertable instance

data HsLit x #

Haskell Literal

Constructors

HsChar (XHsChar x) Char

Character

HsCharPrim (XHsCharPrim x) Char

Unboxed character

HsString (XHsString x) FastString

String

HsStringPrim (XHsStringPrim x) ByteString

Packed bytes

HsInt (XHsInt x) IntegralLit

Genuinely an Int; arises from TcGenDeriv, and from TRANSLATION

HsIntPrim (XHsIntPrim x) Integer

literal Int#

HsWordPrim (XHsWordPrim x) Integer

literal Word#

HsInt64Prim (XHsInt64Prim x) Integer

literal Int64#

HsWord64Prim (XHsWord64Prim x) Integer

literal Word64#

HsInteger (XHsInteger x) Integer Type

Genuinely an integer; arises only from TRANSLATION (overloaded literals are done with HsOverLit)

HsRat (XHsRat x) FractionalLit Type

Genuinely a rational; arises only from TRANSLATION (overloaded literals are done with HsOverLit)

HsFloatPrim (XHsFloatPrim x) FractionalLit

Unboxed Float

HsDoublePrim (XHsDoublePrim x) FractionalLit

Unboxed Double

XLit (XXLit x) 

Instances

Instances details
Eq (HsLit x) 
Instance details

Defined in GHC.Hs.Lit

Methods

(==) :: HsLit x -> HsLit x -> Bool #

(/=) :: HsLit x -> HsLit x -> Bool #

Outputable (HsLit (GhcPass p)) 
Instance details

Defined in GHC.Hs.Lit

Methods

ppr :: HsLit (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsLit (GhcPass p) -> SDoc #

data HsOverLit p #

Haskell Overloaded Literal

Constructors

OverLit 
XOverLit (XXOverLit p) 

Instances

Instances details
Eq (XXOverLit p) => Eq (HsOverLit p) 
Instance details

Defined in GHC.Hs.Lit

Methods

(==) :: HsOverLit p -> HsOverLit p -> Bool #

(/=) :: HsOverLit p -> HsOverLit p -> Bool #

Ord (XXOverLit p) => Ord (HsOverLit p) 
Instance details

Defined in GHC.Hs.Lit

OutputableBndrId p => Outputable (HsOverLit (GhcPass p)) 
Instance details

Defined in GHC.Hs.Lit

data OverLitTc #

Constructors

OverLitTc 

Instances

Instances details
Data OverLitTc 
Instance details

Defined in GHC.Hs.Lit

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverLitTc -> c OverLitTc #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverLitTc #

toConstr :: OverLitTc -> Constr #

dataTypeOf :: OverLitTc -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverLitTc) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverLitTc) #

gmapT :: (forall b. Data b => b -> b) -> OverLitTc -> OverLitTc #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverLitTc -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverLitTc -> r #

gmapQ :: (forall d. Data d => d -> u) -> OverLitTc -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> OverLitTc -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverLitTc -> m OverLitTc #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitTc -> m OverLitTc #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitTc -> m OverLitTc #

data OverLitVal #

Overloaded Literal Value

Constructors

HsIntegral !IntegralLit

Integer-looking literals;

HsFractional !FractionalLit

Frac-looking literals

HsIsString !SourceText !FastString

String-looking literals

Instances

Instances details
Eq OverLitVal 
Instance details

Defined in GHC.Hs.Lit

Data OverLitVal 
Instance details

Defined in GHC.Hs.Lit

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverLitVal -> c OverLitVal #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverLitVal #

toConstr :: OverLitVal -> Constr #

dataTypeOf :: OverLitVal -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverLitVal) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverLitVal) #

gmapT :: (forall b. Data b => b -> b) -> OverLitVal -> OverLitVal #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverLitVal -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverLitVal -> r #

gmapQ :: (forall d. Data d => d -> u) -> OverLitVal -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> OverLitVal -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverLitVal -> m OverLitVal #

Ord OverLitVal 
Instance details

Defined in GHC.Hs.Lit

Outputable OverLitVal 
Instance details

Defined in GHC.Hs.Lit

literalType :: Literal -> Type #

Find the Haskell Type the literal occupies

litIsDupable :: DynFlags -> Literal -> Bool #

True if code space does not go bad if we duplicate this literal

litIsTrivial :: Literal -> Bool #

True if there is absolutely no penalty to duplicating the literal. False principally of strings.

"Why?", you say? I'm glad you asked. Well, for one duplicating strings would blow up code sizes. Not only this, it's also unsafe.

Consider a program that wants to traverse a string. One way it might do this is to first compute the Addr# pointing to the end of the string, and then, starting from the beginning, bump a pointer using eqAddr# to determine the end. For instance,

-- Given pointers to the start and end of a string, count how many zeros
-- the string contains.
countZeros :: Addr -> -> Int
countZeros start end = go start 0
  where
    go off n
      | off `addrEq#` end = n
      | otherwise         = go (off `plusAddr#` 1) n'
      where n' | isTrue off 0 0#) = n + 1
               | otherwise                                 = n

Consider what happens if we considered strings to be trivial (and therefore duplicable) and emitted a call like countZeros "hello" plusAddr# 5). The beginning and end pointers do not belong to the same string, meaning that an iteration like the above would blow up terribly. This is what happened in #12757.

Ultimately the solution here is to make primitive strings a bit more structured, ensuring that the compiler can't inline in ways that will break user code. One approach to this is described in #8472.

rubbishLit :: Literal #

A nonsense literal of type forall (a :: TYPE UnliftedRep). a.

narrowLit :: Integral a => Proxy a -> Literal -> Literal #

Narrow a literal number (unchecked result range)

isLitValue :: Literal -> Bool #

Indicate if the Literal contains an Integer value, e.g. Char, Int, Word, LitInteger and LitNatural.

mapLitValue :: DynFlags -> (Integer -> Integer) -> Literal -> Literal #

Apply a function to the Integer contained in the Literal, for when that makes sense, e.g. for Char and numbers. For fixed-size integral literals, the result will be wrapped in accordance with the semantics of the target type. See Note [WordInt underflowoverflow]

isLitValue_maybe :: Literal -> Maybe Integer #

Returns the Integer contained in the Literal, for when that makes sense, i.e. for Char and numbers.

litValue :: Literal -> Integer #

Returns the Integer contained in the Literal, for when that makes sense, i.e. for Char, Int, Word, LitInteger and LitNatural.

isZeroLit :: Literal -> Bool #

Tests whether the literal represents a zero of whatever type it is

mkLitString :: String -> Literal #

Creates a Literal of type Addr#, which is appropriate for passing to e.g. some of the "error" functions in GHC.Err such as GHC.Err.runtimeError

mkLitChar :: Char -> Literal #

Creates a Literal of type Char#

mkLitDouble :: Rational -> Literal #

Creates a Literal of type Double#

mkLitFloat :: Rational -> Literal #

Creates a Literal of type Float#

mkLitWord64Wrap :: DynFlags -> Integer -> Literal #

Creates a Literal of type Word64#. If the argument is out of the range, it is wrapped.

mkLitWord64 :: Integer -> Literal #

Creates a Literal of type Word64#

mkLitInt64Wrap :: DynFlags -> Integer -> Literal #

Creates a Literal of type Int64#. If the argument is out of the range, it is wrapped.

mkLitInt64 :: Integer -> Literal #

Creates a Literal of type Int64#

mkLitWordWrapC :: DynFlags -> Integer -> (Literal, Bool) #

Creates a Literal of type Word#, as well as a Boolean flag indicating carry. That is, if the argument is out of the (target-dependent) range the argument is wrapped and the carry flag will be set. See Note [WordInt underflowoverflow]

mkLitWordWrap :: DynFlags -> Integer -> Literal #

Creates a Literal of type Word#. If the argument is out of the (target-dependent) range, it is wrapped. See Note [WordInt underflowoverflow]

mkLitWord :: DynFlags -> Integer -> Literal #

Creates a Literal of type Word#

mkLitIntWrapC :: DynFlags -> Integer -> (Literal, Bool) #

Creates a Literal of type Int#, as well as a Boolean flag indicating overflow. That is, if the argument is out of the (target-dependent) range the argument is wrapped and the overflow flag will be set. See Note [WordInt underflowoverflow]

mkLitIntWrap :: DynFlags -> Integer -> Literal #

Creates a Literal of type Int#. If the argument is out of the (target-dependent) range, it is wrapped. See Note [WordInt underflowoverflow]

mkLitInt :: DynFlags -> Integer -> Literal #

Creates a Literal of type Int#

mkLitNumber :: DynFlags -> LitNumType -> Integer -> Type -> Literal #

Create a numeric Literal of the given type

litNumCheckRange :: DynFlags -> LitNumType -> Integer -> Bool #

Check that a given number is in the range of a numeric literal

mkLitNumberWrap :: DynFlags -> LitNumType -> Integer -> Type -> Literal #

Create a numeric Literal of the given type

litNumIsSigned :: LitNumType -> Bool #

Indicate if a numeric literal type supports negative numbers

data Literal #

So-called Literals are one of:

  • An unboxed numeric literal or floating-point literal which is presumed to be surrounded by appropriate constructors (Int#, etc.), so that the overall thing makes sense.

We maintain the invariant that the Integer in the LitNumber constructor is actually in the (possibly target-dependent) range. The mkLit{Int,Word}*Wrap smart constructors ensure this by applying the target machine's wrapping semantics. Use these in situations where you know the wrapping semantics are correct.

  • The literal derived from the label mentioned in a "foreign label" declaration (LitLabel)
  • A LitRubbish to be used in place of values of UnliftedRep (i.e. 'MutVar#') when the the value is never used.
  • A character
  • A string
  • The NULL pointer

Constructors

LitChar Char

Char# - at least 31 bits. Create with mkLitChar

LitNumber !LitNumType !Integer Type

Any numeric literal that can be internally represented with an Integer. See Note [Types of LitNumbers] below for the Type field.

LitString ByteString

A string-literal: stored and emitted UTF-8 encoded, we'll arrange to decode it at runtime. Also emitted with a '\0' terminator. Create with mkLitString

LitNullAddr

The NULL pointer, the only pointer value that can be represented as a Literal. Create with nullAddrLit

LitRubbish

A nonsense value, used when an unlifted binding is absent and has type forall (a :: TYPE UnliftedRep). a. May be lowered by code-gen to any possible value. Also see Note [Rubbish literals]

LitFloat Rational

Float#. Create with mkLitFloat

LitDouble Rational

Double#. Create with mkLitDouble

LitLabel FastString (Maybe Int) FunctionOrData

A label literal. Parameters:

1) The name of the symbol mentioned in the declaration

2) The size (in bytes) of the arguments the label expects. Only applicable with stdcall labels. Just x => <x> will be appended to label name when emitting assembly.

3) Flag indicating whether the symbol references a function or a data

Instances

Instances details
Eq Literal 
Instance details

Defined in Literal

Methods

(==) :: Literal -> Literal -> Bool #

(/=) :: Literal -> Literal -> Bool #

Data Literal 
Instance details

Defined in Literal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Literal -> c Literal #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Literal #

toConstr :: Literal -> Constr #

dataTypeOf :: Literal -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Literal) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Literal) #

gmapT :: (forall b. Data b => b -> b) -> Literal -> Literal #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Literal -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Literal -> r #

gmapQ :: (forall d. Data d => d -> u) -> Literal -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Literal -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Literal -> m Literal #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Literal -> m Literal #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Literal -> m Literal #

Ord Literal

Needed for the Ord instance of AltCon, which in turn is needed in CoreMap.

Instance details

Defined in Literal

Binary Literal 
Instance details

Defined in Literal

Outputable Literal 
Instance details

Defined in Literal

Methods

ppr :: Literal -> SDoc #

pprPrec :: Rational -> Literal -> SDoc #

data LitNumType #

Numeric literal type

Constructors

LitNumInteger

Integer (see Note [Integer literals])

LitNumNatural

Natural (see Note [Natural literals])

LitNumInt

Int# - according to target machine

LitNumInt64

Int64# - exactly 64 bits

LitNumWord

Word# - according to target machine

LitNumWord64

Word64# - exactly 64 bits

Instances

Instances details
Enum LitNumType 
Instance details

Defined in Literal

Eq LitNumType 
Instance details

Defined in Literal

Data LitNumType 
Instance details

Defined in Literal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LitNumType -> c LitNumType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LitNumType #

toConstr :: LitNumType -> Constr #

dataTypeOf :: LitNumType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LitNumType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LitNumType) #

gmapT :: (forall b. Data b => b -> b) -> LitNumType -> LitNumType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LitNumType -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LitNumType -> r #

gmapQ :: (forall d. Data d => d -> u) -> LitNumType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LitNumType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LitNumType -> m LitNumType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LitNumType -> m LitNumType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LitNumType -> m LitNumType #

Ord LitNumType 
Instance details

Defined in Literal

Binary LitNumType 
Instance details

Defined in Literal

tyConAppNeedsKindSig #

Arguments

:: Bool

Should specified binders count towards injective positions in the kind of the TyCon? (If you're using visible kind applications, then you want True here.

-> TyCon 
-> Int

The number of args the TyCon is applied to.

-> Bool

Does T t_1 ... t_n need a kind signature? (Where n is the number of arguments)

Does a TyCon (that is applied to some number of arguments) need to be ascribed with an explicit kind signature to resolve ambiguity if rendered as a source-syntax type? (See Note [When does a tycon application need an explicit kind signature?] for a full explanation of what this function checks for.)

classifiesTypeWithValues :: Kind -> Bool #

Does this classify a type allowed to have values? Responds True to things like *, #, TYPE Lifted, TYPE v, Constraint.

True of any sub-kind of OpenTypeKind

isKindLevPoly :: Kind -> Bool #

Tests whether the given kind (which should look like TYPE x) is something other than a constructor tree (that is, constructors at every node). E.g. True of TYPE k, TYPE (F Int) False of TYPE 'LiftedRep

splitVisVarsOfType :: Type -> Pair TyCoVarSet #

Retrieve the free variables in this type, splitting them based on whether they are used visibly or invisibly. Invisible ones come first.

synTyConResKind :: TyCon -> Kind #

Find the result Kind of a type synonym, after applying it to its arity number of type variables Actually this function works fine on data types too, but they'd always return *, so we never need to ask

tyConsOfType :: Type -> UniqSet TyCon #

All type constructors occurring in the type; looking through type synonyms, but not newtypes. When it finds a Class, it returns the class TyCon.

resultIsLevPoly :: Type -> Bool #

Looking past all pi-types, is the end result potentially levity polymorphic? Example: True for (forall r (a :: TYPE r). String -> a) Example: False for (forall r1 r2 (a :: TYPE r1) (b :: TYPE r2). a -> b -> Type)

isTypeLevPoly :: Type -> Bool #

Returns True if a type is levity polymorphic. Should be the same as (isKindLevPoly . typeKind) but much faster. Precondition: The type has kind (TYPE blah)

tcIsRuntimeTypeKind :: Kind -> Bool #

Is this kind equivalent to TYPE r (for some unknown r)?

This considers Constraint to be distinct from *.

tcIsLiftedTypeKind :: Kind -> Bool #

Is this kind equivalent to *?

This considers Constraint to be distinct from *. For a version that treats them as the same type, see isLiftedTypeKind.

nonDetCmpTc :: TyCon -> TyCon -> Ordering #

Compare two TyCons. NB: This should never see Constraint (as recognized by Kind.isConstraintKindCon) which is considered a synonym for Type in Core. See Note [Kind Constraint and kind Type] in Kind. See Note [nonDetCmpType nondeterminism]

eqTypes :: [Type] -> [Type] -> Bool #

Type equality on lists of types, looking through type synonyms but not newtypes.

eqTypeX :: RnEnv2 -> Type -> Type -> Bool #

Compare types with respect to a (presumably) non-empty RnEnv2.

seqTypes :: [Type] -> () #

seqType :: Type -> () #

isValidJoinPointType :: JoinArity -> Type -> Bool #

Determine whether a type could be the type of a join point of given total arity, according to the polymorphism rule. A join point cannot be polymorphic in its return type, since given join j a b x y z = e1 in e2, the types of e1 and e2 must be the same, and a and b are not in scope for e2. (See Note [The polymorphism rule of join points] in CoreSyn.) Returns False also if the type simply doesn't have enough arguments.

Note that we need to know how many arguments (type *and* value) the putative join point takes; for instance, if j :: forall a. a -> Int then j could be a binary join point returning an Int, but it could *not* be a unary join point returning a -> Int.

TODO: See Note [Excess polymorphism and join points]

isPrimitiveType :: Type -> Bool #

Returns true of types that are opaque to Haskell.

isStrictType :: HasDebugCallStack => Type -> Bool #

Computes whether an argument (or let right hand side) should be computed strictly or lazily, based only on its type. Currently, it's just isUnliftedType. Panics on levity-polymorphic types.

isDataFamilyAppType :: Type -> Bool #

Check whether a type is a data family type

isAlgType :: Type -> Bool #

See Type for what an algebraic type is. Should only be applied to types, as opposed to e.g. partially saturated type constructors

getRuntimeRep :: HasDebugCallStack => Type -> Type #

Extract the RuntimeRep classifier of a type. For instance, getRuntimeRep_maybe Int = LiftedRep. Panics if this is not possible.

getRuntimeRep_maybe :: HasDebugCallStack => Type -> Maybe Type #

Extract the RuntimeRep classifier of a type. For instance, getRuntimeRep_maybe Int = LiftedRep. Returns Nothing if this is not possible.

dropRuntimeRepArgs :: [Type] -> [Type] #

Drops prefix of RuntimeRep constructors in TyConApps. Useful for e.g. dropping 'LiftedRep arguments of unboxed tuple TyCon applications:

dropRuntimeRepArgs [ 'LiftedRep, 'IntRep , String, Int]

isRuntimeRepKindedTy :: Type -> Bool #

Is this a type of kind RuntimeRep? (e.g. LiftedRep)

mightBeUnliftedType :: Type -> Bool #

Returns:

  • False if the type is guaranteed lifted or
  • True if it is unlifted, OR we aren't sure (e.g. in a levity-polymorphic case)

isUnliftedType :: HasDebugCallStack => Type -> Bool #

See Type for what an unlifted type is. Panics on levity polymorphic types; See mightBeUnliftedType for a more approximate predicate that behaves better in the presence of levity polymorphism.

isLiftedType_maybe :: HasDebugCallStack => Type -> Maybe Bool #

Returns Just True if this type is surely lifted, Just False if it is surely unlifted, Nothing if we can't be sure (i.e., it is levity polymorphic), and panics if the kind does not have the shape TYPE r.

isCoVarType :: Type -> Bool #

Does this type classify a core (unlifted) Coercion? At either role nominal or representational (t1 ~ t2) See Note [Types for coercions, predicates, and evidence] in TyCoRep

coAxNthLHS :: forall (br :: BranchFlag). CoAxiom br -> Int -> Type #

Get the type on the LHS of a coercion induced by a type/data family instance.

mkFamilyTyConApp :: TyCon -> [Type] -> Type #

Given a family instance TyCon and its arg types, return the corresponding family type. E.g:

data family T a
data instance T (Maybe b) = MkT b

Where the instance tycon is :RTL, so:

mkFamilyTyConApp :RTL Int  =  T (Maybe Int)

closeOverKindsDSet :: DTyVarSet -> DTyVarSet #

Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministic set.

closeOverKindsList :: [TyVar] -> [TyVar] #

Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministically ordered list.

closeOverKindsFV :: [TyVar] -> FV #

Given a list of tyvars returns a deterministic FV computation that returns the given tyvars with the kind variables free in the kinds of the given tyvars.

closeOverKinds :: TyVarSet -> TyVarSet #

Add the kind variables free in the kinds of the tyvars in the given set. Returns a non-deterministic set.

binderRelevantType_maybe :: TyCoBinder -> Maybe Type #

Extract a relevant type, if there is one.

isAnonTyCoBinder :: TyCoBinder -> Bool #

Does this binder bind a variable that is not erased? Returns True for anonymous binders.

mkAnonBinder :: AnonArgFlag -> Type -> TyCoBinder #

Make an anonymous binder

appTyArgFlags :: Type -> [Type] -> [ArgFlag] #

Given a Type and a list of argument types to which the Type is applied, determine each argument's visibility (Inferred, Specified, or Required).

Most of the time, the arguments will be Required, but not always. Consider f :: forall a. a -> Type. In f Type Bool, the first argument (Type) is Specified and the second argument (Bool) is Required. It is precisely this sort of higher-rank situation in which appTyArgFlags comes in handy, since f Type Bool would be represented in Core using AppTys. (See also #15792).

tyConArgFlags :: TyCon -> [Type] -> [ArgFlag] #

Given a TyCon and a list of argument types to which the TyCon is applied, determine each argument's visibility (Inferred, Specified, or Required).

Wrinkle: consider the following scenario:

T :: forall k. k -> k
tyConArgFlags T [forall m. m -> m -> m, S, R, Q]

After substituting, we get

T (forall m. m -> m -> m) :: (forall m. m -> m -> m) -> forall n. n -> n -> n

Thus, the first argument is invisible, S is visible, R is invisible again, and Q is visible.

partitionInvisibles :: [(a, ArgFlag)] -> ([a], [a]) #

Given a list of things paired with their visibilities, partition the things into (invisible things, visible things).

filterOutInferredTypes :: TyCon -> [Type] -> [Type] #

Given a TyCon and a list of argument types, filter out any Inferred arguments.

filterOutInvisibleTypes :: TyCon -> [Type] -> [Type] #

Given a TyCon and a list of argument types, filter out any invisible (i.e., Inferred or Specified) arguments.

splitForAllVarBndrs :: Type -> ([TyCoVarBinder], Type) #

Like splitPiTys but split off only named binders and returns TyCoVarBinders rather than TyCoBinders

splitPiTys :: Type -> ([TyCoBinder], Type) #

Split off all TyCoBinders to a type, splitting both proper foralls and functions

splitPiTy :: Type -> (TyCoBinder, Type) #

Takes a forall type apart, or panics

splitPiTy_maybe :: Type -> Maybe (TyCoBinder, Type) #

Attempts to take a forall type apart; works with proper foralls and functions

splitForAllTy_co_maybe :: Type -> Maybe (TyCoVar, Type) #

Like splitForAllTy_maybe, but only returns Just if it is a covar binder.

splitForAllTy_ty_maybe :: Type -> Maybe (TyCoVar, Type) #

Like splitForAllTy_maybe, but only returns Just if it is a tyvar binder.

splitForAllTy_maybe :: Type -> Maybe (TyCoVar, Type) #

Attempts to take a forall type apart, but only if it's a proper forall, with a named binder

dropForAlls :: Type -> Type #

Drops all ForAllTys

splitForAllTy :: Type -> (TyCoVar, Type) #

Take a forall type apart, or panics if that is not possible.

isFunTy :: Type -> Bool #

Is this a function?

isPiTy :: Type -> Bool #

Is this a function or forall?

isForAllTy_co :: Type -> Bool #

Like isForAllTy, but returns True only if it is a covar binder

isForAllTy_ty :: Type -> Bool #

Like isForAllTy, but returns True only if it is a tyvar binder

isForAllTy :: Type -> Bool #

Checks whether this is a proper forall (with a named binder)

splitForAllTysSameVis :: ArgFlag -> Type -> ([TyCoVar], Type) #

Like splitForAllTys, but only splits a ForAllTy if sameVis argf supplied_argf is True, where argf is the visibility of the ForAllTy's binder and supplied_argf is the visibility provided as an argument to this function.

splitForAllTys :: Type -> ([TyCoVar], Type) #

Take a ForAllTy apart, returning the list of tycovars and the result type. This always succeeds, even if it returns only an empty list. Note that the result type returned may have free variables that were bound by a forall.

mkTyConBindersPreferAnon #

Arguments

:: [TyVar]

binders

-> TyCoVarSet

free variables of result

-> [TyConBinder] 

Given a list of type-level vars and the free vars of a result kind, makes TyCoBinders, preferring anonymous binders if the variable is, in fact, not dependent. e.g. mkTyConBindersPreferAnon (k:*),(b:k),(c:k) We want (k:*) Named, (b:k) Anon, (c:k) Anon

All non-coercion binders are visible.

mkLamTypes :: [Var] -> Type -> Type #

mkLamType for multiple type or value arguments

mkLamType :: Var -> Type -> Type #

Makes a (->) type or an implicit forall type, depending on whether it is given a type variable or a term variable. This is used, for example, when producing the type of a lambda. Always uses Inferred binders.

mkVisForAllTys :: [TyVar] -> Type -> Type #

Like mkForAllTys, but assumes all variables are dependent and visible

mkSpecForAllTys :: [TyVar] -> Type -> Type #

Like mkForAllTys, but assumes all variables are dependent and Specified, a common case

mkSpecForAllTy :: TyVar -> Type -> Type #

Like mkForAllTy, but assumes the variable is dependent and Specified, a common case

mkInvForAllTys :: [TyVar] -> Type -> Type #

Like mkTyCoInvForAllTys, but tvs should be a list of tyvar

mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type #

Like mkForAllTys, but assumes all variables are dependent and Inferred, a common case

mkInvForAllTy :: TyVar -> Type -> Type #

Like mkTyCoInvForAllTy, but tv should be a tyvar

mkTyCoInvForAllTy :: TyCoVar -> Type -> Type #

Make a dependent forall over an Inferred variable

discardCast :: Type -> Type #

Drop the cast on a type, if any. If there is no cast, just return the original type. This is rarely what you want. The CastTy data constructor (in TyCoRep) has the invariant that another CastTy is not inside. See the data constructor for a full description of this invariant. Since CastTy cannot be nested, the result of discardCast cannot be a CastTy.

newTyConInstRhs :: TyCon -> [Type] -> Type #

Unwrap one layer of newtype on a type constructor and its arguments, using an eta-reduced version of the newtype if possible. This requires tys to have at least newTyConInstArity tycon elements.

splitListTyConApp_maybe :: Type -> Maybe Type #

Attempts to tease a list type apart and gives the type of the elements if successful (looks through type synonyms)

repSplitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type]) #

Like splitTyConApp_maybe, but doesn't look through synonyms. This assumes the synonyms have already been dealt with.

Moreover, for a FunTy, it only succeeds if the argument types have enough info to extract the runtime-rep arguments that the funTyCon requires. This will usually be true; but may be temporarily false during canonicalization: see Note [FunTy and decomposing tycon applications] in TcCanonical

tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type]) #

Split a type constructor application into its type constructor and applied types. Note that this may fail in the case of a FunTy with an argument of unknown kind FunTy (e.g. FunTy (a :: k) Int. since the kind of a isn't of the form TYPE rep). Consequently, you may need to zonk your type before using this function.

If you only need the TyCon, consider using tcTyConAppTyCon_maybe.

splitTyConApp :: Type -> (TyCon, [Type]) #

Attempts to tease a type apart into a type constructor and the application of a number of arguments to that constructor. Panics if that is not possible. See also splitTyConApp_maybe

tyConAppArgs_maybe :: Type -> Maybe [Type] #

The same as snd . splitTyConApp

tyConAppTyCon_maybe :: Type -> Maybe TyCon #

The same as fst . splitTyConApp

tyConAppTyConPicky_maybe :: Type -> Maybe TyCon #

Retrieve the tycon heading this type, if there is one. Does not look through synonyms.

mkTyConApp :: TyCon -> [Type] -> Type #

A key function: builds a TyConApp or FunTy as appropriate to its arguments. Applies its arguments to the constructor from left to right.

applyTysX :: [TyVar] -> Type -> [Type] -> Type #

piResultTys :: HasDebugCallStack => Type -> [Type] -> Type #

(piResultTys f_ty [ty1, .., tyn]) gives the type of (f ty1 .. tyn) where f :: f_ty piResultTys is interesting because: 1. f_ty may have more for-alls than there are args 2. Less obviously, it may have fewer for-alls For case 2. think of: piResultTys (forall a.a) [forall b.b, Int] This really can happen, but only (I think) in situations involving undefined. For example: undefined :: forall a. a Term: undefined (forall b. b->b) Int This term should have type (Int -> Int), but notice that there are more type args than foralls in undefineds type.

funArgTy :: Type -> Type #

Just like piResultTys but for a single argument Try not to iterate piResultTy, because it's inefficient to substitute one variable at a time; instead use 'piResultTys"

Extract the function argument type and panic if that is not possible

funResultTy :: Type -> Type #

Extract the function result type and panic if that is not possible

splitFunTy_maybe :: Type -> Maybe (Type, Type) #

Attempts to extract the argument and result types from a type

splitFunTy :: Type -> (Type, Type) #

Attempts to extract the argument and result types from a type, and panics if that is not possible. See also splitFunTy_maybe

pprUserTypeErrorTy :: Type -> SDoc #

Render a type corresponding to a user type error into a SDoc.

userTypeError_maybe :: Type -> Maybe Type #

Is this type a custom user error? If so, give us the kind and the error message.

isLitTy :: Type -> Maybe TyLit #

Is this a type literal (symbol or numeric).

isStrLitTy :: Type -> Maybe FastString #

Is this a symbol literal. We also look through type synonyms.

isNumLitTy :: Type -> Maybe Integer #

Is this a numeric literal. We also look through type synonyms.

repSplitAppTys :: HasDebugCallStack => Type -> (Type, [Type]) #

Like splitAppTys, but doesn't look through type synonyms

splitAppTys :: Type -> (Type, [Type]) #

Recursively splits a type as far as is possible, leaving a residual type being applied to and the type arguments applied to it. Never fails, even if that means returning an empty list of type applications.

splitAppTy :: Type -> (Type, Type) #

Attempts to take a type application apart, as in splitAppTy_maybe, and panics if this is not possible

tcRepSplitAppTy_maybe :: Type -> Maybe (Type, Type) #

Does the AppTy split as in tcSplitAppTy_maybe, but assumes that any coreView stuff is already done. Refuses to look through (c => t)

repSplitAppTy_maybe :: HasDebugCallStack => Type -> Maybe (Type, Type) #

Does the AppTy split as in splitAppTy_maybe, but assumes that any Core view stuff is already done

splitAppTy_maybe :: Type -> Maybe (Type, Type) #

Attempt to take a type application apart, whether it is a function, type constructor, or plain type application. Note that type family applications are NEVER unsaturated by this!

mkAppTys :: Type -> [Type] -> Type #

repGetTyVar_maybe :: Type -> Maybe TyVar #

Attempts to obtain the type variable underlying a Type, without any expansion

getCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN) #

If the type is a tyvar, possibly under a cast, returns it, along with the coercion. Thus, the co is :: kind tv ~N kind ty

getTyVar_maybe :: Type -> Maybe TyVar #

Attempts to obtain the type variable underlying a Type

getTyVar :: String -> Type -> TyVar #

Attempts to obtain the type variable underlying a Type, and panics with the given message if this is not a type variable type. See also getTyVar_maybe

mapCoercion :: Monad m => TyCoMapper env m -> env -> Coercion -> m Coercion #

mapType :: Monad m => TyCoMapper env m -> env -> Type -> m Type #

isRuntimeRepVar :: TyVar -> Bool #

Is a tyvar of type RuntimeRep?

isUnliftedTypeKind :: Kind -> Bool #

Returns True if the kind classifies unlifted types and False otherwise. Note that this returns False for levity-polymorphic kinds, which may be specialized to a kind that classifies unlifted types.

kindRep_maybe :: HasDebugCallStack => Kind -> Maybe Type #

Given a kind (TYPE rr), extract its RuntimeRep classifier rr. For example, kindRep_maybe * = Just LiftedRep Returns Nothing if the kind is not of form (TYPE rr) Treats * and Constraint as the same

kindRep :: HasDebugCallStack => Kind -> Type #

Extract the RuntimeRep classifier of a type from its kind. For example, kindRep * = LiftedRep; Panics if this is not possible. Treats * and Constraint as the same

expandTypeSynonyms :: Type -> Type #

Expand out all type synonyms. Actually, it'd suffice to expand out just the ones that discard type variables (e.g. type Funny a = Int) But we don't know which those are currently, so we just expand all.

expandTypeSynonyms only expands out type synonyms mentioned in the type, not in the kinds of any TyCon or TyVar mentioned in the type.

Keep this synchronized with synonymTyConsOfType

data TyCoMapper env (m :: Type -> Type) #

This describes how a "map" operation over a type/coercion should behave

Constructors

TyCoMapper 

Fields

substCoUnchecked :: TCvSubst -> Coercion -> Coercion #

Substitute within a Coercion disabling sanity checks. The problems that the sanity checks in substCo catch are described in Note [The substitution invariant]. The goal of #11371 is to migrate all the calls of substCoUnchecked to substCo and remove this function. Please don't use in new code.

substThetaUnchecked :: TCvSubst -> ThetaType -> ThetaType #

Substitute within a ThetaType disabling the sanity checks. The problems that the sanity checks in substTys catch are described in Note [The substitution invariant]. The goal of #11371 is to migrate all the calls of substThetaUnchecked to substTheta and remove this function. Please don't use in new code.

substTheta :: HasCallStack => TCvSubst -> ThetaType -> ThetaType #

Substitute within a ThetaType The substitution has to satisfy the invariants described in Note [The substitution invariant].

substTysUnchecked :: TCvSubst -> [Type] -> [Type] #

Substitute within several Types disabling the sanity checks. The problems that the sanity checks in substTys catch are described in Note [The substitution invariant]. The goal of #11371 is to migrate all the calls of substTysUnchecked to substTys and remove this function. Please don't use in new code.

substTys :: HasCallStack => TCvSubst -> [Type] -> [Type] #

Substitute within several Types The substitution has to satisfy the invariants described in Note [The substitution invariant].

substTyUnchecked :: TCvSubst -> Type -> Type #

Substitute within a Type disabling the sanity checks. The problems that the sanity checks in substTy catch are described in Note [The substitution invariant]. The goal of #11371 is to migrate all the calls of substTyUnchecked to substTy and remove this function. Please don't use in new code.

substTy :: HasCallStack => TCvSubst -> Type -> Type #

Substitute within a Type The substitution has to satisfy the invariants described in Note [The substitution invariant].

substTyAddInScope :: TCvSubst -> Type -> Type #

Substitute within a Type after adding the free variables of the type to the in-scope set. This is useful for the case when the free variables aren't already in the in-scope set or easily available. See also Note [The substitution invariant].

substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type] #

Type substitution, see zipTvSubst

substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion #

Coercion substitution, see zipTvSubst. Disables sanity checks. The problems that the sanity checks in substCo catch are described in Note [The substitution invariant]. The goal of #11371 is to migrate all the calls of substCoUnchecked to substCo and remove this function. Please don't use in new code.

substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type #

Type substitution, see zipTvSubst. Disables sanity checks. The problems that the sanity checks in substTy catch are described in Note [The substitution invariant]. The goal of #11371 is to migrate all the calls of substTyUnchecked to substTy and remove this function. Please don't use in new code.

substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type #

Type substitution, see zipTvSubst

mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst #

Generates the in-scope set for the TCvSubst from the types in the incoming environment. No CoVars, please!

zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> TCvSubst #

Generates the in-scope set for the TCvSubst from the types in the incoming environment. No CoVars, please!

getTCvSubstRangeFVs :: TCvSubst -> VarSet #

Returns the free variables of the types in the range of a substitution as a non-deterministic set.

composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst #

Composes two substitutions, applying the second one provided first, like in function composition.

composeTCvSubstEnv :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv) #

(compose env1 env2)(x) is env1(env2(x)); i.e. apply env2 then env1. It assumes that both are idempotent. Typically, env1 is the refinement to a base substitution env2

data TCvSubst #

Type & coercion substitution

The following invariants must hold of a TCvSubst:

  1. The in-scope set is needed only to guide the generation of fresh uniques
  2. In particular, the kind of the type variables in the in-scope set is not relevant
  3. The substitution is only applied ONCE! This is because in general such application will not reach a fixed point.

Instances

Instances details
Outputable TCvSubst 
Instance details

Defined in TyCoSubst

type TvSubstEnv = TyVarEnv Type #

A substitution of Types for TyVars and Kinds for KindVars

tidyTopType :: Type -> Type #

Calls tidyType on a top-level type (i.e. with an empty tidying environment)

tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type]) #

Grabs the free type variables, tidies them and then uses tidyType to work over the type itself

tidyTypes :: TidyEnv -> [Type] -> [Type] #

tidyOpenTyCoVar :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar) #

Treat a new TyCoVar as a binder, and give it a fresh tidy name using the environment if one has not already been allocated. See also tidyVarBndr

tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv #

Add the free TyVars to the env in tidy form, so that we can tidy the type they are free in

tidyVarBndrs :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar]) #

This tidies up a type for printing in an error message, or in an interface file.

It doesn't change the uniques at all, just the print names.

tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar] #

Get the free vars of types in scoped order

tyCoVarsOfTypeWellScoped :: Type -> [TyVar] #

Get the free vars of a type in scoped order

scopedSort :: [TyCoVar] -> [TyCoVar] #

Do a topological sort on a list of tyvars, so that binders occur before occurrences E.g. given [ a::k, k::*, b::k ] it'll return a well-scoped list [ k::*, a::k, b::k ]

This is a deterministic sorting operation (that is, doesn't depend on Uniques).

It is also meant to be stable: that is, variables should not be reordered unnecessarily. This is specified in Note [ScopedSort] See also Note [Ordering of implicit variables] in RnTypes

noFreeVarsOfType :: Type -> Bool #

Returns True if this type has no free variables. Should be the same as isEmptyVarSet . tyCoVarsOfType, but faster in the non-forall case.

tyCoFVsOfType :: Type -> FV #

The worker for tyCoFVsOfType and tyCoFVsOfTypeList. The previous implementation used unionVarSet which is O(n+m) and can make the function quadratic. It's exported, so that it can be composed with other functions that compute free variables. See Note [FV naming conventions] in FV.

Eta-expanded because that makes it run faster (apparently) See Note [FV eta expansion] in FV for explanation.

tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet #

tyCoFVsOfType that returns free variables of a type in a deterministic set. For explanation of why using VarSet is not deterministic see Note [Deterministic FV] in FV.

equalityTyCon :: Role -> TyCon #

Given a Role, what TyCon is the type of equality predicates at that role?

primRepToRuntimeRep :: PrimRep -> Type #

Convert a PrimRep to a Type of kind RuntimeRep Defined here to avoid (more) module loops

tYPE :: Type -> Type #

Given a RuntimeRep, applies TYPE to it. see Note [TYPE and RuntimeRep]

funTyCon :: TyCon #

The (->) type constructor.

(->) :: forall (rep1 :: RuntimeRep) (rep2 :: RuntimeRep).
        TYPE rep1 -> TYPE rep2 -> *

mkTemplateKiTyVars :: [Kind] -> ([Kind] -> [Kind]) -> [TyVar] #

exposedPrimTyCons :: [TyCon] #

Primitive TyCons that are defined in, and exported from, GHC.Prim.

unexposedPrimTyCons :: [TyCon] #

Primitive TyCons that are defined in GHC.Prim but not exposed. It's important to keep these separate as we don't want users to be able to write them (see #15209) or see them in GHCi's :browse output (see #12023).

mkTyConTy :: TyCon -> Type #

Create the plain type constructor type which has been applied to no type arguments at all.

mkForAllTys :: [TyCoVarBinder] -> Type -> Type #

Wraps foralls over the type using the provided TyCoVars from left to right

mkInvisFunTys :: [Type] -> Type -> Type #

Make nested arrow types

mkVisFunTys :: [Type] -> Type -> Type #

Make nested arrow types

mkInvisFunTy :: Type -> Type -> Type infixr 3 #

mkVisFunTy :: Type -> Type -> Type infixr 3 #

isTyBinder :: TyCoBinder -> Bool #

If its a named binder, is the binder a tyvar? Returns True for nondependent binder. This check that we're really returning a *Ty*Binder (as opposed to a coercion binder). That way, if/when we allow coercion quantification in more places, we'll know we missed updating some function.

isVisibleBinder :: TyCoBinder -> Bool #

Does this binder bind a visible argument?

isInvisibleBinder :: TyCoBinder -> Bool #

Does this binder bind an invisible argument?

delBinderVar :: VarSet -> TyCoVarBinder -> VarSet #

Remove the binder's variable from the set, if the binder has a variable.

type KindOrType = Type #

The key representation of types within the compiler

type KnotTied ty = ty #

A type labeled KnotTied might have knot-tied tycons in it. See Note [Type checking recursive type and class declarations] in TcTyClsDecls

type TyBinder = TyCoBinder #

TyBinder is like TyCoBinder, but there can only be TyVarBinder in the Named field.

data CoercionHole #

A coercion to be filled in by the type-checker. See Note [Coercion holes]

Constructors

CoercionHole 

Instances

Instances details
Data CoercionHole 
Instance details

Defined in TyCoRep

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CoercionHole -> c CoercionHole #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CoercionHole #

toConstr :: CoercionHole -> Constr #

dataTypeOf :: CoercionHole -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CoercionHole) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CoercionHole) #

gmapT :: (forall b. Data b => b -> b) -> CoercionHole -> CoercionHole #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CoercionHole -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CoercionHole -> r #

gmapQ :: (forall d. Data d => d -> u) -> CoercionHole -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CoercionHole -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CoercionHole -> m CoercionHole #

Outputable CoercionHole 
Instance details

Defined in TyCoRep

mkAppTy :: Type -> Type -> Type #

Applies a type to another, as in e.g. k a

mkCastTy :: Type -> Coercion -> Type #

Make a CastTy. The Coercion must be nominal. Checks the Coercion for reflexivity, dropping it if it's reflexive. See Note [Respecting definitional equality] in TyCoRep

eqType :: Type -> Type -> Bool #

Type equality on source types. Does not look through newtypes or PredTypes, but it does look through type synonyms. This first checks that the kinds of the types are equal and then checks whether the types are equal, ignoring casts and coercions. (The kind check is a recursive call, but since all kinds have type Type, there is no need to check the types of kinds.) See also Note [Non-trivial definitional equality] in TyCoRep.

coreView :: Type -> Maybe Type #

This function Strips off the top layer only of a type synonym application (if any) its underlying representation type. Returns Nothing if there is nothing to look through. This function considers Constraint to be a synonym of TYPE LiftedRep.

By being non-recursive and inlined, this case analysis gets efficiently joined onto the case analysis that the caller is already doing

tcView :: Type -> Maybe Type #

Gives the typechecker view of a type. This unwraps synonyms but leaves Constraint alone. c.f. coreView, which turns Constraint into TYPE LiftedRep. Returns Nothing if no unwrapping happens. See also Note [coreView vs tcView]

isRuntimeRepTy :: Type -> Bool #

Is this the type RuntimeRep?

isLiftedTypeKind :: Kind -> Bool #

This version considers Constraint to be the same as *. Returns True if the argument is equivalent to Type/Constraint and False otherwise. See Note [Kind Constraint and kind Type]

splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type]) #

Attempts to tease a type apart into a type constructor and the application of a number of arguments to that constructor

partitionInvisibleTypes :: TyCon -> [Type] -> ([Type], [Type]) #

Given a TyCon and a list of argument types, partition the arguments into:

  1. Inferred or Specified (i.e., invisible) arguments and
  2. Required (i.e., visible) arguments

tyConSkolem :: TyCon -> Bool #

Returns whether or not this TyCon is definite, or a hole that may be filled in at some later point. See Note [Skolem abstract data]

setRecTcMaxBound :: Int -> RecTcChecker -> RecTcChecker #

Change the upper bound for the number of times a RecTcChecker is allowed to encounter each TyCon.

defaultRecTcMaxBound :: Int #

The default upper bound (100) for the number of times a RecTcChecker is allowed to encounter each TyCon.

tcFlavourIsOpen :: TyConFlavour -> Bool #

Is this flavour of TyCon an open type family or a data family?

tyConRuntimeRepInfo :: TyCon -> RuntimeRepInfo #

Extract any RuntimeRepInfo from this TyCon

tyConFamilyCoercion_maybe :: TyCon -> Maybe (CoAxiom Unbranched) #

If this TyCon is that of a data family instance, return a TyCon which represents a coercion identifying the representation type with the type instance family. Otherwise, return Nothing

tyConFamInst_maybe :: TyCon -> Maybe (TyCon, [Type]) #

If this TyCon is that of a data family instance, return the family in question and the instance types. Otherwise, return Nothing

isFamInstTyCon :: TyCon -> Bool #

Is this TyCon that for a data family instance?

tyConATs :: TyCon -> [TyCon] #

Return the associated types of the TyCon, if any

tyConClass_maybe :: TyCon -> Maybe Class #

If this TyCon is that for a class instance, return the class it is for. Otherwise returns Nothing

isClassTyCon :: TyCon -> Bool #

Is this TyCon that for a class instance?

famTyConFlav_maybe :: TyCon -> Maybe FamTyConFlav #

Extract the flavour of a type family (with all the extra information that it carries)

synTyConRhs_maybe :: TyCon -> Maybe Type #

Extract the information pertaining to the right hand side of a type synonym (type) declaration.

synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type) #

Extract the TyVars bound by a vanilla type synonym and the corresponding (unsubstituted) right hand side.

tyConStupidTheta :: TyCon -> [PredType] #

Find the "stupid theta" of the TyCon. A "stupid theta" is the context to the left of an algebraic type declaration, e.g. Eq a in the declaration data Eq a => T a ...

newTyConCo_maybe :: TyCon -> Maybe (CoAxiom Unbranched) #

Extracts the newtype coercion from such a TyCon, which can be used to construct something with the newtypes type from its representation type (right hand side). If the supplied TyCon is not a newtype, returns Nothing

newTyConEtadRhs :: TyCon -> ([TyVar], Type) #

Extract the bound type variables and type expansion of an eta-contracted type synonym TyCon. Panics if the TyCon is not a synonym

newTyConEtadArity :: TyCon -> Int #

The number of type parameters that need to be passed to a newtype to resolve it. May be less than in the definition if it can be eta-contracted.

newTyConRhs :: TyCon -> ([TyVar], Type) #

Extract the bound type variables and type expansion of a type synonym TyCon. Panics if the TyCon is not a synonym

tyConRoles :: TyCon -> [Role] #

Get the list of roles for the type parameters of a TyCon

tyConFamilyResVar_maybe :: TyCon -> Maybe Name #

Extract type variable naming the result of injective type family

algTyConRhs :: TyCon -> AlgTyConRhs #

Extract an AlgTyConRhs with information about data constructors from an algebraic or tuple TyCon. Panics for any other sort of TyCon

tyConFamilySize :: TyCon -> Int #

Determine the number of value constructors a TyCon has. Panics if the TyCon is not algebraic or a tuple

tyConSingleDataCon_maybe :: TyCon -> Maybe DataCon #

If the given TyCon has a single data constructor, i.e. it is a data type with one alternative, a tuple type or a newtype then that constructor is returned. If the TyCon has more than one constructor, or represents a primitive or function type constructor then Nothing is returned. In any other case, the function panics

tyConDataCons_maybe :: TyCon -> Maybe [DataCon] #

Determine the DataCons originating from the given TyCon, if the TyCon is the sort that can have any constructors (note: this does not include abstract algebraic types)

tyConDataCons :: TyCon -> [DataCon] #

As tyConDataCons_maybe, but returns the empty list of constructors if no constructors could be found

isTyConWithSrcDataCons :: TyCon -> Bool #

Check if the tycon actually refers to a proper `data` or `newtype` with user defined constructors rather than one from a class or other construction.

expandSynTyCon_maybe #

Arguments

:: TyCon 
-> [tyco]

Arguments to TyCon

-> Maybe ([(TyVar, tyco)], Type, [tyco])

Returns a TyVar substitution, the body type of the synonym (not yet substituted) and any arguments remaining from the application

Expand a type synonym application, if any

isTcLevPoly :: TyCon -> Bool #

Could this TyCon ever be levity-polymorphic when fully applied? True is safe. False means we're sure. Does only a quick check based on the TyCon's category. Precondition: The fully-applied TyCon has kind (TYPE blah)

isTcTyCon :: TyCon -> Bool #

Is this a TcTyCon? (That is, one only used during type-checking?)

isImplicitTyCon :: TyCon -> Bool #

Identifies implicit tycons that, in particular, do not go into interface files (because they are implicitly reconstructed when the interface is read).

Note that:

  • Associated families are implicit, as they are re-constructed from the class declaration in which they reside, and
  • Family instances are not implicit as they represent the instance body (similar to a dfun does that for a class instance).
  • Tuples are implicit iff they have a wired-in name (namely: boxed and unboxed tuples are wired-in and implicit, but constraint tuples are not)

isKindTyCon :: TyCon -> Bool #

Is this tycon really meant for use at the kind level? That is, should it be permitted without -XDataKinds?

isPromotedDataCon_maybe :: TyCon -> Maybe DataCon #

Retrieves the promoted DataCon if this is a PromotedDataCon;

isPromotedDataCon :: TyCon -> Bool #

Is this a PromotedDataCon?

isPromotedTupleTyCon :: TyCon -> Bool #

Is this the TyCon for a promoted tuple?

isUnboxedSumTyCon :: TyCon -> Bool #

Is this the TyCon for an unboxed sum?

isBoxedTupleTyCon :: TyCon -> Bool #

Is this the TyCon for a boxed tuple?

tyConFlavourAssoc_maybe :: TyConFlavour -> Maybe TyCon #

Get the enclosing class TyCon (if there is one) for the given TyConFlavour

tyConAssoc_maybe :: TyCon -> Maybe TyCon #

Get the enclosing class TyCon (if there is one) for the given TyCon.

isTyConAssoc :: TyCon -> Bool #

Is this TyCon for an associated type?

tyConInjectivityInfo :: TyCon -> Injectivity #

tyConInjectivityInfo tc returns Injective is is tc is an injective tycon (where is states for which tyConBinders tc is injective), or NotInjective otherwise.

isClosedSynFamilyTyConWithAxiom_maybe :: TyCon -> Maybe (CoAxiom Branched) #

Is this a non-empty closed type family? Returns Nothing for abstract or empty closed families.

isOpenTypeFamilyTyCon :: TyCon -> Bool #

Is this an open type family TyCon?

isDataFamilyTyCon :: TyCon -> Bool #

Is this a synonym TyCon that can have may have further instances appear?

isTypeFamilyTyCon :: TyCon -> Bool #

Is this a synonym TyCon that can have may have further instances appear?

isOpenFamilyTyCon :: TyCon -> Bool #

Is this a TyCon, synonym or otherwise, that defines a family with instances?

isFamilyTyCon :: TyCon -> Bool #

Is this a TyCon, synonym or otherwise, that defines a family?

isEnumerationTyCon :: TyCon -> Bool #

Is this an algebraic TyCon which is just an enumeration of values?

isGadtSyntaxTyCon :: TyCon -> Bool #

Is this an algebraic TyCon declared with the GADT syntax?

mustBeSaturated :: TyCon -> Bool #

True iff we can decompose (T a b c) into ((T a b) c) I.e. is it injective and generative w.r.t nominal equality? That is, if (T a b) ~N d e f, is it always the case that (T ~N d), (a ~N e) and (b ~N f)? Specifically NOT true of synonyms (open and otherwise)

It'd be unusual to call mustBeSaturated on a regular H98 type synonym, because you should probably have expanded it first But regardless, it's not decomposable

isTypeSynonymTyCon :: TyCon -> Bool #

Is this a TyCon representing a regular H98 type synonym (type)?

unwrapNewTyCon_maybe :: TyCon -> Maybe ([TyVar], Type, CoAxiom Unbranched) #

Take a TyCon apart into the TyVars it scopes over, the Type it expands into, and (possibly) a coercion from the representation type to the newtype. Returns Nothing if this is not possible.

isNewTyCon :: TyCon -> Bool #

Is this TyCon that for a newtype

isGenInjAlgRhs :: AlgTyConRhs -> Bool #

Is this an AlgTyConRhs of a TyCon that is generative and injective with respect to representational equality?

isGenerativeTyCon :: TyCon -> Role -> Bool #

isGenerativeTyCon is true of TyCons for which this property holds (where X is the role passed in): If (T tys ~X t), then (t's head ~X T). See also Note [Decomposing equality] in TcCanonical

isInjectiveTyCon :: TyCon -> Role -> Bool #

isInjectiveTyCon is true of TyCons for which this property holds (where X is the role passed in): If (T a1 b1 c1) ~X (T a2 b2 c2), then (a1 ~X1 a2), (b1 ~X2 b2), and (c1 ~X3 c2) (where X1, X2, and X3, are the roles given by tyConRolesX tc X) See also Note [Decomposing equality] in TcCanonical

isDataTyCon :: TyCon -> Bool #

Returns True for data types that are definitely represented by heap-allocated constructors. These are scrutinised by Core-level case expressions, and they get info tables allocated for them.

Generally, the function will be true for all data types and false for newtypes, unboxed tuples, unboxed sums and type family TyCons. But it is not guaranteed to return True in all cases that it could.

NB: for a data type family, only the instance TyCons get an info table. The family declaration TyCon does not

isVanillaAlgTyCon :: TyCon -> Bool #

Returns True for vanilla AlgTyCons -- that is, those created with a data or newtype declaration.

isAlgTyCon :: TyCon -> Bool #

Returns True if the supplied TyCon resulted from either a data or newtype declaration

isUnliftedTyCon :: TyCon -> Bool #

Is this TyCon unlifted (i.e. cannot contain bottom)? Note that this can only be true for primitive and unboxed-tuple TyCons

isPrimTyCon :: TyCon -> Bool #

Does this TyCon represent something that cannot be defined in Haskell?

isAbstractTyCon :: TyCon -> Bool #

Test if the TyCon is algebraic but abstract (invisible data constructors)

mkPromotedDataCon :: DataCon -> Name -> TyConRepName -> [TyConTyCoBinder] -> Kind -> [Role] -> RuntimeRepInfo -> TyCon #

Create a promoted data constructor TyCon Somewhat dodgily, we give it the same Name as the data constructor itself; when we pretty-print the TyCon we add a quote; see the Outputable TyCon instance

mkFamilyTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

result kind

-> Maybe Name 
-> FamTyConFlav 
-> Maybe Class 
-> Injectivity 
-> TyCon 

Create a type family TyCon

mkSynonymTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

result kind

-> [Role] 
-> Type 
-> Bool 
-> Bool 
-> TyCon 

Create a type synonym TyCon

mkLiftedPrimTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

result kind

-> [Role] 
-> TyCon 

Create a lifted primitive TyCon such as RealWorld

mkKindTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

result kind

-> [Role] 
-> Name 
-> TyCon 

Kind constructors

mkPrimTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

result kind, never levity-polymorphic

-> [Role] 
-> TyCon 

Create an unlifted primitive TyCon, such as Int#.

noTcTyConScopedTyVars :: [(Name, TcTyVar)] #

No scoped type variables (to be used with mkTcTyCon).

mkTcTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

result kind only

-> [(Name, TcTyVar)]

Scoped type variables; see Note [How TcTyCons work] in TcTyClsDecls

-> Bool

Is this TcTyCon generalised already?

-> TyConFlavour

What sort of TyCon this represents

-> TyCon 

Makes a tycon suitable for use during type-checking. It stores a variety of details about the definition of the TyCon, but no right-hand side. It lives only during the type-checking of a mutually-recursive group of tycons; it is then zonked to a proper TyCon in zonkTcTyCon. See also Note [Kind checking recursive type and class declarations] in TcTyClsDecls.

mkSumTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

Kind of the resulting TyCon

-> Arity

Arity of the sum

-> [TyVar]

TyVars scoped over: see tyConTyVars

-> [DataCon] 
-> AlgTyConFlav 
-> TyCon 

mkTupleTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

Result kind of the TyCon

-> Arity

Arity of the tuple TyCon

-> DataCon 
-> TupleSort

Whether the tuple is boxed or unboxed

-> AlgTyConFlav 
-> TyCon 

mkClassTyCon :: Name -> [TyConBinder] -> [Role] -> AlgTyConRhs -> Class -> Name -> TyCon #

Simpler specialization of mkAlgTyCon for classes

mkAlgTyCon #

Arguments

:: Name 
-> [TyConBinder]

Binders of the TyCon

-> Kind

Result kind

-> [Role]

The roles for each TyVar

-> Maybe CType

The C type this type corresponds to when using the CAPI FFI

-> [PredType]

Stupid theta: see algTcStupidTheta

-> AlgTyConRhs

Information about data constructors

-> AlgTyConFlav

What flavour is it? (e.g. vanilla, type family)

-> Bool

Was the TyCon declared with GADT syntax?

-> TyCon 

This is the making of an algebraic TyCon. Notably, you have to pass in the generic (in the -XGenerics sense) information about the type constructor - you can get hold of it easily (see Generics module)

mkFunTyCon :: Name -> [TyConBinder] -> Name -> TyCon #

Given the name of the function type constructor and it's kind, create the corresponding TyCon. It is recommended to use funTyCon if you want this functionality

lookupTyConFieldLabel :: FieldLabelString -> TyCon -> Maybe FieldLabel #

Look up a field label belonging to this TyCon

tyConFieldLabels :: TyCon -> [FieldLabel] #

The labels for the fields of this particular TyCon

primRepIsFloat :: PrimRep -> Maybe Bool #

Return if Rep stands for floating type, returns Nothing for vector types.

primRepSizeB :: DynFlags -> PrimRep -> Int #

The size of a PrimRep in bytes.

This applies also when used in a constructor, where we allow packing the fields. For instance, in data Foo = Foo Float the two fields will take only 8 bytes, which for 64-bit arch will be equal to 1 word. See also mkVirtHeapOffsetsWithPadding for details of how data fields are layed out.

tyConRepModOcc :: Module -> OccName -> (Module, OccName) #

The name (and defining module) for the Typeable representation (TyCon) of a type constructor.

See Note [Grand plan for Typeable] in TcTypeable in TcTypeable.

mkPrelTyConRepName :: Name -> TyConRepName #

Make a Name for the Typeable representation of the given wired-in type

visibleDataCons :: AlgTyConRhs -> [DataCon] #

Both type classes as well as family instances imply implicit type constructors. These implicit type constructors refer to their parent structure (ie, the class or family from which they derive) using a type of the following form.

Extract those DataCons that we are able to learn about. Note that visibility in this sense does not correspond to visibility in the context of any particular user program!

mkRequiredTyConBinder :: TyCoVarSet -> TyVar -> TyConBinder #

Make a Required TyConBinder. It chooses between NamedTCB and AnonTCB based on whether the tv is mentioned in the dependent set

data TyConBndrVis #

Instances

Instances details
Binary TyConBndrVis 
Instance details

Defined in TyCon

Outputable TyConBndrVis 
Instance details

Defined in TyCon

Outputable tv => Outputable (VarBndr tv TyConBndrVis) 
Instance details

Defined in TyCon

data AlgTyConRhs #

Represents right-hand-sides of TyCons for algebraic types

Constructors

AbstractTyCon

Says that we know nothing about this data type, except that it's represented by a pointer. Used when we export a data type abstractly into an .hi file.

DataTyCon

Information about those TyCons derived from a data declaration. This includes data types with no constructors at all.

Fields

  • data_cons :: [DataCon]

    The data type constructors; can be empty if the user declares the type to have no constructors

    INVARIANT: Kept in order of increasing DataCon tag (see the tag assignment in mkTyConTagMap)

  • data_cons_size :: Int

    Cached value: length data_cons

  • is_enum :: Bool

    Cached value: is this an enumeration type? See Note [Enumeration types]

TupleTyCon 

Fields

SumTyCon

An unboxed sum type.

Fields

  • data_cons :: [DataCon]

    The data type constructors; can be empty if the user declares the type to have no constructors

    INVARIANT: Kept in order of increasing DataCon tag (see the tag assignment in mkTyConTagMap)

  • data_cons_size :: Int

    Cached value: length data_cons

NewTyCon

Information about those TyCons derived from a newtype declaration

Fields

data RuntimeRepInfo #

Some promoted datacons signify extra info relevant to GHC. For example, the IntRep constructor of RuntimeRep corresponds to the IntRep constructor of PrimRep. This data structure allows us to store this information right in the TyCon. The other approach would be to look up things like RuntimeRep's PrimRep by known-key every time. See also Note [Getting from RuntimeRep to PrimRep] in RepType

Constructors

NoRRI

an ordinary promoted data con

RuntimeRep ([Type] -> [PrimRep])

A constructor of RuntimeRep. The argument to the function should be the list of arguments to the promoted datacon.

VecCount Int

A constructor of VecCount

VecElem PrimElemRep

A constructor of VecElem

data AlgTyConFlav #

Constructors

VanillaAlgTyCon TyConRepName

An ordinary type constructor has no parent.

UnboxedAlgTyCon (Maybe TyConRepName)

An unboxed type constructor. The TyConRepName is a Maybe since we currently don't allow unboxed sums to be Typeable since there are too many of them. See #13276.

ClassTyCon Class TyConRepName

Type constructors representing a class dictionary. See Note [ATyCon for classes] in TyCoRep

DataFamInstTyCon (CoAxiom Unbranched) TyCon [Type]

Type constructors representing an *instance* of a *data* family. Parameters:

1) The type family in question

2) Instance types; free variables are the tyConTyVars of the current TyCon (not the family one). INVARIANT: the number of types matches the arity of the family TyCon

3) A CoTyCon identifying the representation type with the type instance family

Instances

Instances details
Outputable AlgTyConFlav 
Instance details

Defined in TyCon

data Injectivity #

Constructors

NotInjective 
Injective [Bool] 

Instances

Instances details
Eq Injectivity 
Instance details

Defined in TyCon

Binary Injectivity 
Instance details

Defined in TyCon

data FamTyConFlav #

Information pertaining to the expansion of a type synonym (type)

Constructors

DataFamilyTyCon TyConRepName

Represents an open type family without a fixed right hand side. Additional instances can appear at any time.

These are introduced by either a top level declaration:

data family T a :: *

Or an associated data type declaration, within a class declaration:

class C a b where
  data T b :: *
OpenSynFamilyTyCon

An open type synonym family e.g. type family F x y :: * -> *

ClosedSynFamilyTyCon (Maybe (CoAxiom Branched))

A closed type synonym family e.g. type family F x where { F Int = Bool }

AbstractClosedSynFamilyTyCon

A closed type synonym family declared in an hs-boot file with type family F a where ..

BuiltInSynFamTyCon BuiltInSynFamily

Built-in type family used by the TypeNats solver

Instances

Instances details
Outputable FamTyConFlav 
Instance details

Defined in TyCon

data PrimRep #

A PrimRep is an abstraction of a type. It contains information that the code generator needs in order to pass arguments, return results, and store values of this type. See also Note [RuntimeRep and PrimRep] in RepType and Note [VoidRep] in RepType.

Constructors

VoidRep 
LiftedRep 
UnliftedRep

Unlifted pointer

Int8Rep

Signed, 8-bit value

Int16Rep

Signed, 16-bit value

Int32Rep

Signed, 32-bit value

Int64Rep

Signed, 64 bit value (with 32-bit words only)

IntRep

Signed, word-sized value

Word8Rep

Unsigned, 8 bit value

Word16Rep

Unsigned, 16 bit value

Word32Rep

Unsigned, 32 bit value

Word64Rep

Unsigned, 64 bit value (with 32-bit words only)

WordRep

Unsigned, word-sized value

AddrRep

A pointer, but not to a Haskell value (use '(Un)liftedRep')

FloatRep 
DoubleRep 
VecRep Int PrimElemRep

A vector

Instances

Instances details
Show PrimRep 
Instance details

Defined in TyCon

Outputable PrimRep 
Instance details

Defined in TyCon

Methods

ppr :: PrimRep -> SDoc #

pprPrec :: Rational -> PrimRep -> SDoc #

data PrimElemRep #

Instances

Instances details
Eq PrimElemRep 
Instance details

Defined in TyCon

Show PrimElemRep 
Instance details

Defined in TyCon

Outputable PrimElemRep 
Instance details

Defined in TyCon

data TyConFlavour #

Paints a picture of what a TyCon represents, in broad strokes. This is used towards more informative error messages.

Instances

Instances details
Eq TyConFlavour 
Instance details

Defined in TyCon

Outputable TyConFlavour 
Instance details

Defined in TyCon

data Class #

Instances

Instances details
Eq Class 
Instance details

Defined in Class

Methods

(==) :: Class -> Class -> Bool #

(/=) :: Class -> Class -> Bool #

Data Class 
Instance details

Defined in Class

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Class -> c Class #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Class #

toConstr :: Class -> Constr #

dataTypeOf :: Class -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Class) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Class) #

gmapT :: (forall b. Data b => b -> b) -> Class -> Class #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Class -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Class -> r #

gmapQ :: (forall d. Data d => d -> u) -> Class -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Class -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Class -> m Class #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Class -> m Class #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Class -> m Class #

Show Class # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

showsPrec :: Int -> Class -> ShowS #

show :: Class -> String #

showList :: [Class] -> ShowS #

NFData Class # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

rnf :: Class -> () #

NamedThing Class 
Instance details

Defined in Class

Uniquable Class 
Instance details

Defined in Class

Methods

getUnique :: Class -> Unique #

Outputable Class 
Instance details

Defined in Class

Methods

ppr :: Class -> SDoc #

pprPrec :: Rational -> Class -> SDoc #

Symbolic Class 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

symbol :: Class -> Symbol

Fixpoint Class 
Instance details

Defined in Language.Haskell.Liquid.Types.RefType

Methods

toFix :: Class -> Doc

simplify :: Class -> Class

PPrint Class # 
Instance details

Defined in Language.Haskell.Liquid.Types.PrettyPrint

Methods

pprintTidy :: Tidy -> Class -> Doc #

pprintPrec :: Int -> Tidy -> Class -> Doc #

type FunDep a = ([a], [a]) #

data ClassATItem #

Constructors

ATI TyCon (Maybe (Type, SrcSpan)) 

data Role #

Instances

Instances details
Eq Role 
Instance details

Defined in CoAxiom

Methods

(==) :: Role -> Role -> Bool #

(/=) :: Role -> Role -> Bool #

Data Role 
Instance details

Defined in CoAxiom

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role #

toConstr :: Role -> Constr #

dataTypeOf :: Role -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) #

gmapT :: (forall b. Data b => b -> b) -> Role -> Role #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r #

gmapQ :: (forall d. Data d => d -> u) -> Role -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Role -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Role -> m Role #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role #

Ord Role 
Instance details

Defined in CoAxiom

Methods

compare :: Role -> Role -> Ordering #

(<) :: Role -> Role -> Bool #

(<=) :: Role -> Role -> Bool #

(>) :: Role -> Role -> Bool #

(>=) :: Role -> Role -> Bool #

max :: Role -> Role -> Role #

min :: Role -> Role -> Role #

Binary Role 
Instance details

Defined in CoAxiom

Methods

put_ :: BinHandle -> Role -> IO () #

put :: BinHandle -> Role -> IO (Bin Role) #

get :: BinHandle -> IO Role #

Outputable Role 
Instance details

Defined in CoAxiom

Methods

ppr :: Role -> SDoc #

pprPrec :: Rational -> Role -> SDoc #

data ConLike #

A constructor-like thing

Instances

Instances details
Eq ConLike 
Instance details

Defined in ConLike

Methods

(==) :: ConLike -> ConLike -> Bool #

(/=) :: ConLike -> ConLike -> Bool #

Data ConLike 
Instance details

Defined in ConLike

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConLike -> c ConLike #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ConLike #

toConstr :: ConLike -> Constr #

dataTypeOf :: ConLike -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ConLike) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConLike) #

gmapT :: (forall b. Data b => b -> b) -> ConLike -> ConLike #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConLike -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConLike -> r #

gmapQ :: (forall d. Data d => d -> u) -> ConLike -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ConLike -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConLike -> m ConLike #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConLike -> m ConLike #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConLike -> m ConLike #

NamedThing ConLike 
Instance details

Defined in ConLike

Uniquable ConLike 
Instance details

Defined in ConLike

Methods

getUnique :: ConLike -> Unique #

Outputable ConLike 
Instance details

Defined in ConLike

Methods

ppr :: ConLike -> SDoc #

pprPrec :: Rational -> ConLike -> SDoc #

OutputableBndr ConLike 
Instance details

Defined in ConLike

dataConName :: DataCon -> Name #

The Name of the DataCon, giving it a unique, rooted identification

dataConTyCon :: DataCon -> TyCon #

The type constructor that we are building via this data constructor

dataConExTyCoVars :: DataCon -> [TyCoVar] #

The existentially-quantified type/coercion variables of the constructor including dependent (kind-) GADT equalities

dataConUserTyVars :: DataCon -> [TyVar] #

The type variables of the constructor, in the order the user wrote them

dataConUserTyVarBinders :: DataCon -> [TyVarBinder] #

TyCoVarBinders for the type variables of the constructor, in the order the user wrote them

dataConSourceArity :: DataCon -> Arity #

Source-level arity of the data constructor

dataConFieldLabels :: DataCon -> [FieldLabel] #

The labels for the fields of this particular DataCon

dataConInstOrigArgTys :: DataCon -> [Type] -> [Type] #

Returns just the instantiated value argument types of a DataCon, (excluding dictionary args)

dataConStupidTheta :: DataCon -> ThetaType #

The "stupid theta" of the DataCon, such as data Eq a in:

data Eq a => T a = ...

dataConFullSig :: DataCon -> ([TyVar], [TyCoVar], [EqSpec], ThetaType, [Type], Type) #

The "full signature" of the DataCon returns, in order:

1) The result of dataConUnivTyVars

2) The result of dataConExTyCoVars

3) The non-dependent GADT equalities. Dependent GADT equalities are implied by coercion variables in return value (2).

4) The other constraints of the data constructor type, excluding GADT equalities

5) The original argument types to the DataCon (i.e. before any change of the representation of the type)

6) The original result type of the DataCon

data DataCon #

A data constructor

Instances

Instances details
Eq DataCon 
Instance details

Defined in DataCon

Methods

(==) :: DataCon -> DataCon -> Bool #

(/=) :: DataCon -> DataCon -> Bool #

Data DataCon 
Instance details

Defined in DataCon

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataCon -> c DataCon #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DataCon #

toConstr :: DataCon -> Constr #

dataTypeOf :: DataCon -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DataCon) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DataCon) #

gmapT :: (forall b. Data b => b -> b) -> DataCon -> DataCon #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataCon -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataCon -> r #

gmapQ :: (forall d. Data d => d -> u) -> DataCon -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DataCon -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataCon -> m DataCon #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataCon -> m DataCon #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataCon -> m DataCon #

Ord DataCon # 
Instance details

Defined in Language.Haskell.Liquid.Types.Types

Show DataCon # 
Instance details

Defined in Language.Haskell.Liquid.Types.Types

NamedThing DataCon 
Instance details

Defined in DataCon

Uniquable DataCon 
Instance details

Defined in DataCon

Methods

getUnique :: DataCon -> Unique #

Outputable DataCon 
Instance details

Defined in DataCon

Methods

ppr :: DataCon -> SDoc #

pprPrec :: Rational -> DataCon -> SDoc #

OutputableBndr DataCon 
Instance details

Defined in DataCon

Symbolic DataCon 
Instance details

Defined in Language.Haskell.Liquid.Types.Types

Methods

symbol :: DataCon -> Symbol

PPrint DataCon # 
Instance details

Defined in Language.Haskell.Liquid.Types.Types

Methods

pprintTidy :: Tidy -> DataCon -> Doc #

pprintPrec :: Int -> Tidy -> DataCon -> Doc #

Hashable DataCon 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

hashWithSalt :: Int -> DataCon -> Int

hash :: DataCon -> Int

ResolveSym DataCon # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Resolve

Qualify (Measure SpecType DataCon) # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Resolve

data DataConRep #

Data Constructor Representation See Note [Data constructor workers and wrappers]

data EqSpec #

An EqSpec is a tyvar/type pair representing an equality made in rejigging a GADT constructor

Instances

Instances details
Outputable EqSpec 
Instance details

Defined in DataCon

Methods

ppr :: EqSpec -> SDoc #

pprPrec :: Rational -> EqSpec -> SDoc #

pprLExpr :: forall (p :: Pass). OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc #

pprExpr :: forall (p :: Pass). OutputableBndrId p => HsExpr (GhcPass p) -> SDoc #

pprSplice :: forall (p :: Pass). OutputableBndrId p => HsSplice (GhcPass p) -> SDoc #

pprPatBind :: forall (bndr :: Pass) (p :: Pass) body. (OutputableBndrId bndr, OutputableBndrId p, Outputable body) => LPat (GhcPass bndr) -> GRHSs (GhcPass p) body -> SDoc #

pprFunBind :: forall (idR :: Pass) body. (OutputableBndrId idR, Outputable body) => MatchGroup (GhcPass idR) body -> SDoc #

data HsExpr p #

A Haskell expression.

Constructors

HsVar (XVar p) (Located (IdP p))

Variable

HsUnboundVar (XUnboundVar p) UnboundVar

Unbound variable; also used for "holes" (_ or _x). Turned from HsVar to HsUnboundVar by the renamer, when it finds an out-of-scope variable or hole. Turned into HsVar by type checker, to support deferred type errors.

HsConLikeOut (XConLikeOut p) ConLike

After typechecker only; must be different HsVar for pretty printing

HsRecFld (XRecFld p) (AmbiguousFieldOcc p)

Variable pointing to record selector Not in use after typechecking

HsOverLabel (XOverLabel p) (Maybe (IdP p)) FastString

Overloaded label (Note [Overloaded labels] in GHC.OverloadedLabels) Just id means RebindableSyntax is in use, and gives the id of the in-scope fromLabel. NB: Not in use after typechecking

HsIPVar (XIPVar p) HsIPName

Implicit parameter (not in use after typechecking)

HsOverLit (XOverLitE p) (HsOverLit p)

Overloaded literals

HsLit (XLitE p) (HsLit p)

Simple (non-overloaded) literals

HsLam (XLam p) (MatchGroup p (LHsExpr p))

Lambda abstraction. Currently always a single match

HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p))

Lambda-case

HsApp (XApp p) (LHsExpr p) (LHsExpr p)

Application

HsAppType (XAppTypeE p) (LHsExpr p) (LHsWcType (NoGhcTc p))

Visible type application

Explicit type argument; e.g f @Int x y NB: Has wildcards, but no implicit quantification

OpApp (XOpApp p) (LHsExpr p) (LHsExpr p) (LHsExpr p)

Operator applications: NB Bracketed ops such as (+) come out as Vars.

NegApp (XNegApp p) (LHsExpr p) (SyntaxExpr p)

Negation operator. Contains the negated expression and the name of negate

HsPar (XPar p) (LHsExpr p)

Parenthesised expr; see Note [Parens in HsSyn]

SectionL (XSectionL p) (LHsExpr p) (LHsExpr p) 
SectionR (XSectionR p) (LHsExpr p) (LHsExpr p) 
ExplicitTuple (XExplicitTuple p) [LHsTupArg p] Boxity

Used for explicit tuples and sections thereof

ExplicitSum (XExplicitSum p) ConTag Arity (LHsExpr p)

Used for unboxed sum types

There will be multiple AnnVbar, (1 - alternative) before the expression, (arity - alternative) after it

HsCase (XCase p) (LHsExpr p) (MatchGroup p (LHsExpr p))
HsIf (XIf p) (Maybe (SyntaxExpr p)) (LHsExpr p) (LHsExpr p) (LHsExpr p)
HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)]

Multi-way if

HsLet (XLet p) (LHsLocalBinds p) (LHsExpr p)

let(rec)

HsDo (XDo p) (HsStmtContext Name) (Located [ExprLStmt p])
ExplicitList (XExplicitList p) (Maybe (SyntaxExpr p)) [LHsExpr p]

Syntactic list: [a,b,c,...]

RecordCon

Record construction

RecordUpd

Record update

ExprWithTySig (XExprWithTySig p) (LHsExpr p) (LHsSigWcType (NoGhcTc p))

Expression with an explicit type signature. e :: type

ArithSeq (XArithSeq p) (Maybe (SyntaxExpr p)) (ArithSeqInfo p)

Arithmetic sequence

HsSCC (XSCC p) SourceText StringLiteral (LHsExpr p) 
HsCoreAnn (XCoreAnn p) SourceText StringLiteral (LHsExpr p)
HsBracket (XBracket p) (HsBracket p)
HsRnBracketOut (XRnBracketOut p) (HsBracket GhcRn) [PendingRnSplice] 
HsTcBracketOut (XTcBracketOut p) (HsBracket GhcRn) [PendingTcSplice] 
HsSpliceE (XSpliceE p) (HsSplice p)
HsProc (XProc p) (LPat p) (LHsCmdTop p)

proc notation for Arrows

HsStatic (XStatic p) (LHsExpr p)
HsTick (XTick p) (Tickish (IdP p)) (LHsExpr p) 
HsBinTick (XBinTick p) Int Int (LHsExpr p) 
HsTickPragma (XTickPragma p) SourceText (StringLiteral, (Int, Int), (Int, Int)) ((SourceText, SourceText), (SourceText, SourceText)) (LHsExpr p)
HsWrap (XWrap p) HsWrapper (HsExpr p) 
XExpr (XXExpr p) 

Instances

Instances details
p ~ GhcPs => DisambInfixOp (HsExpr p) 
Instance details

Defined in RdrHsSyn

p ~ GhcPs => DisambECP (HsExpr p) 
Instance details

Defined in RdrHsSyn

Associated Types

type Body (HsExpr p) :: Type -> Type #

type InfixOp (HsExpr p) #

type FunArg (HsExpr p) #

Methods

ecpFromCmd' :: LHsCmd GhcPs -> PV (Located (HsExpr p)) #

ecpFromExp' :: LHsExpr GhcPs -> PV (Located (HsExpr p)) #

mkHsLamPV :: SrcSpan -> MatchGroup GhcPs (Located (HsExpr p)) -> PV (Located (HsExpr p)) #

mkHsLetPV :: SrcSpan -> LHsLocalBinds GhcPs -> Located (HsExpr p) -> PV (Located (HsExpr p)) #

superInfixOp :: (DisambInfixOp (InfixOp (HsExpr p)) => PV (Located (HsExpr p))) -> PV (Located (HsExpr p)) #

mkHsOpAppPV :: SrcSpan -> Located (HsExpr p) -> Located (InfixOp (HsExpr p)) -> Located (HsExpr p) -> PV (Located (HsExpr p)) #

mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> MatchGroup GhcPs (Located (HsExpr p)) -> PV (Located (HsExpr p)) #

superFunArg :: (DisambECP (FunArg (HsExpr p)) => PV (Located (HsExpr p))) -> PV (Located (HsExpr p)) #

mkHsAppPV :: SrcSpan -> Located (HsExpr p) -> Located (FunArg (HsExpr p)) -> PV (Located (HsExpr p)) #

mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> Located (HsExpr p) -> Bool -> Located (HsExpr p) -> PV (Located (HsExpr p)) #

mkHsDoPV :: SrcSpan -> Located [LStmt GhcPs (Located (HsExpr p))] -> PV (Located (HsExpr p)) #

mkHsParPV :: SrcSpan -> Located (HsExpr p) -> PV (Located (HsExpr p)) #

mkHsVarPV :: Located RdrName -> PV (Located (HsExpr p)) #

mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located (HsExpr p)) #

mkHsOverLitPV :: Located (HsOverLit GhcPs) -> PV (Located (HsExpr p)) #

mkHsWildCardPV :: SrcSpan -> PV (Located (HsExpr p)) #

mkHsTySigPV :: SrcSpan -> Located (HsExpr p) -> LHsType GhcPs -> PV (Located (HsExpr p)) #

mkHsExplicitListPV :: SrcSpan -> [Located (HsExpr p)] -> PV (Located (HsExpr p)) #

mkHsSplicePV :: Located (HsSplice GhcPs) -> PV (Located (HsExpr p)) #

mkHsRecordPV :: SrcSpan -> SrcSpan -> Located (HsExpr p) -> ([LHsRecField GhcPs (Located (HsExpr p))], Maybe SrcSpan) -> PV (Located (HsExpr p)) #

mkHsNegAppPV :: SrcSpan -> Located (HsExpr p) -> PV (Located (HsExpr p)) #

mkHsSectionR_PV :: SrcSpan -> Located (InfixOp (HsExpr p)) -> Located (HsExpr p) -> PV (Located (HsExpr p)) #

mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> Located (HsExpr p) -> PV (Located (HsExpr p)) #

mkHsAsPatPV :: SrcSpan -> Located RdrName -> Located (HsExpr p) -> PV (Located (HsExpr p)) #

mkHsLazyPatPV :: SrcSpan -> Located (HsExpr p) -> PV (Located (HsExpr p)) #

mkSumOrTuplePV :: SrcSpan -> Boxity -> SumOrTuple (HsExpr p) -> PV (Located (HsExpr p)) #

OutputableBndrId p => Outputable (HsExpr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: HsExpr (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsExpr (GhcPass p) -> SDoc #

type FunArg (HsExpr p) 
Instance details

Defined in RdrHsSyn

type FunArg (HsExpr p) = HsExpr p
type InfixOp (HsExpr p) 
Instance details

Defined in RdrHsSyn

type InfixOp (HsExpr p) = HsExpr p
type Body (HsExpr p) 
Instance details

Defined in RdrHsSyn

type Body (HsExpr p) = HsExpr

data HsCmd id #

Haskell Command (e.g. a "statement" in an Arrow proc block)

Instances

Instances details
p ~ GhcPs => DisambECP (HsCmd p) 
Instance details

Defined in RdrHsSyn

Associated Types

type Body (HsCmd p) :: Type -> Type #

type InfixOp (HsCmd p) #

type FunArg (HsCmd p) #

Methods

ecpFromCmd' :: LHsCmd GhcPs -> PV (Located (HsCmd p)) #

ecpFromExp' :: LHsExpr GhcPs -> PV (Located (HsCmd p)) #

mkHsLamPV :: SrcSpan -> MatchGroup GhcPs (Located (HsCmd p)) -> PV (Located (HsCmd p)) #

mkHsLetPV :: SrcSpan -> LHsLocalBinds GhcPs -> Located (HsCmd p) -> PV (Located (HsCmd p)) #

superInfixOp :: (DisambInfixOp (InfixOp (HsCmd p)) => PV (Located (HsCmd p))) -> PV (Located (HsCmd p)) #

mkHsOpAppPV :: SrcSpan -> Located (HsCmd p) -> Located (InfixOp (HsCmd p)) -> Located (HsCmd p) -> PV (Located (HsCmd p)) #

mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> MatchGroup GhcPs (Located (HsCmd p)) -> PV (Located (HsCmd p)) #

superFunArg :: (DisambECP (FunArg (HsCmd p)) => PV (Located (HsCmd p))) -> PV (Located (HsCmd p)) #

mkHsAppPV :: SrcSpan -> Located (HsCmd p) -> Located (FunArg (HsCmd p)) -> PV (Located (HsCmd p)) #

mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> Located (HsCmd p) -> Bool -> Located (HsCmd p) -> PV (Located (HsCmd p)) #

mkHsDoPV :: SrcSpan -> Located [LStmt GhcPs (Located (HsCmd p))] -> PV (Located (HsCmd p)) #

mkHsParPV :: SrcSpan -> Located (HsCmd p) -> PV (Located (HsCmd p)) #

mkHsVarPV :: Located RdrName -> PV (Located (HsCmd p)) #

mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located (HsCmd p)) #

mkHsOverLitPV :: Located (HsOverLit GhcPs) -> PV (Located (HsCmd p)) #

mkHsWildCardPV :: SrcSpan -> PV (Located (HsCmd p)) #

mkHsTySigPV :: SrcSpan -> Located (HsCmd p) -> LHsType GhcPs -> PV (Located (HsCmd p)) #

mkHsExplicitListPV :: SrcSpan -> [Located (HsCmd p)] -> PV (Located (HsCmd p)) #

mkHsSplicePV :: Located (HsSplice GhcPs) -> PV (Located (HsCmd p)) #

mkHsRecordPV :: SrcSpan -> SrcSpan -> Located (HsCmd p) -> ([LHsRecField GhcPs (Located (HsCmd p))], Maybe SrcSpan) -> PV (Located (HsCmd p)) #

mkHsNegAppPV :: SrcSpan -> Located (HsCmd p) -> PV (Located (HsCmd p)) #

mkHsSectionR_PV :: SrcSpan -> Located (InfixOp (HsCmd p)) -> Located (HsCmd p) -> PV (Located (HsCmd p)) #

mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> Located (HsCmd p) -> PV (Located (HsCmd p)) #

mkHsAsPatPV :: SrcSpan -> Located RdrName -> Located (HsCmd p) -> PV (Located (HsCmd p)) #

mkHsLazyPatPV :: SrcSpan -> Located (HsCmd p) -> PV (Located (HsCmd p)) #

mkSumOrTuplePV :: SrcSpan -> Boxity -> SumOrTuple (HsCmd p) -> PV (Located (HsCmd p)) #

OutputableBndrId p => Outputable (HsCmd (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: HsCmd (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsCmd (GhcPass p) -> SDoc #

type FunArg (HsCmd p) 
Instance details

Defined in RdrHsSyn

type FunArg (HsCmd p) = HsExpr p
type InfixOp (HsCmd p) 
Instance details

Defined in RdrHsSyn

type InfixOp (HsCmd p) = HsExpr p
type Body (HsCmd p) 
Instance details

Defined in RdrHsSyn

type Body (HsCmd p) = HsCmd

data MatchGroup p body #

Constructors

MG 

Fields

XMatchGroup (XXMatchGroup p body) 

data GRHSs p body #

Guarded Right-Hand Sides

GRHSs are used both for pattern bindings and for Matches

Constructors

GRHSs 

Fields

XGRHSs (XXGRHSs p body) 

data SyntaxExpr p #

Syntax Expression

SyntaxExpr is like PostTcExpr, but it's filled in a little earlier, by the renamer. It's used for rebindable syntax.

E.g. (>>=) is filled in before the renamer by the appropriate Name for (>>=), and then instantiated by the type checker with its type args etc

This should desugar to

syn_res_wrap $ syn_expr (syn_arg_wraps[0] arg0)
                        (syn_arg_wraps[1] arg1) ...

where the actual arguments come from elsewhere in the AST. This could be defined using GhcPass p and such, but it's harder to get it all to work out that way. (noSyntaxExpr is hard to write, for example.)

Instances

Instances details
OutputableBndrId p => Outputable (SyntaxExpr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type LHsExpr p #

Arguments

 = Located (HsExpr p)

May have AnnKeywordId : AnnComma when in a list

Located Haskell Expression

pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc #

replaceWrappedName :: IEWrappedName name1 -> name2 -> IEWrappedName name2 #

ieWrappedName :: IEWrappedName name -> name #

ieNames :: forall (p :: Pass). IE (GhcPass p) -> [IdP (GhcPass p)] #

ieName :: forall (p :: Pass). IE (GhcPass p) -> IdP (GhcPass p) #

isImportDeclQualified :: ImportDeclQualifiedStyle -> Bool #

Convenience function to answer the question if an import decl. is qualified.

importDeclQualifiedStyle :: Maybe (Located a) -> Maybe (Located a) -> ImportDeclQualifiedStyle #

Given two possible located qualified tokens, compute a style (in a conforming Haskell program only one of the two can be not Nothing). This is called from y.

type LImportDecl pass #

Arguments

 = Located (ImportDecl pass)

When in a list this may have

Located Import Declaration

data ImportDeclQualifiedStyle #

If/how an import is qualified.

Constructors

QualifiedPre

qualified appears in prepositive position.

QualifiedPost

qualified appears in postpositive position.

NotQualified

Not qualified.

Instances

Instances details
Eq ImportDeclQualifiedStyle 
Instance details

Defined in GHC.Hs.ImpExp

Data ImportDeclQualifiedStyle 
Instance details

Defined in GHC.Hs.ImpExp

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImportDeclQualifiedStyle -> c ImportDeclQualifiedStyle #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImportDeclQualifiedStyle #

toConstr :: ImportDeclQualifiedStyle -> Constr #

dataTypeOf :: ImportDeclQualifiedStyle -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImportDeclQualifiedStyle) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImportDeclQualifiedStyle) #

gmapT :: (forall b. Data b => b -> b) -> ImportDeclQualifiedStyle -> ImportDeclQualifiedStyle #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImportDeclQualifiedStyle -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImportDeclQualifiedStyle -> r #

gmapQ :: (forall d. Data d => d -> u) -> ImportDeclQualifiedStyle -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ImportDeclQualifiedStyle -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImportDeclQualifiedStyle -> m ImportDeclQualifiedStyle #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportDeclQualifiedStyle -> m ImportDeclQualifiedStyle #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportDeclQualifiedStyle -> m ImportDeclQualifiedStyle #

data ImportDecl pass #

Import Declaration

A single Haskell import declaration.

Constructors

ImportDecl 

Fields

XImportDecl (XXImportDecl pass)

AnnKeywordIds

Instances

Instances details
OutputableBndrId p => Outputable (ImportDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.ImpExp

data IEWrappedName name #

A name in an import or export specification which may have adornments. Used primarily for accurate pretty printing of ParsedSource, and API Annotation placement.

Constructors

IEName (Located name)

no extra

IEPattern (Located name)

pattern X

IEType (Located name)

type (:+:)

Instances

Instances details
Eq name => Eq (IEWrappedName name) 
Instance details

Defined in GHC.Hs.ImpExp

Methods

(==) :: IEWrappedName name -> IEWrappedName name -> Bool #

(/=) :: IEWrappedName name -> IEWrappedName name -> Bool #

Data name => Data (IEWrappedName name) 
Instance details

Defined in GHC.Hs.ImpExp

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IEWrappedName name -> c (IEWrappedName name) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IEWrappedName name) #

toConstr :: IEWrappedName name -> Constr #

dataTypeOf :: IEWrappedName name -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IEWrappedName name)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IEWrappedName name)) #

gmapT :: (forall b. Data b => b -> b) -> IEWrappedName name -> IEWrappedName name #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IEWrappedName name -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IEWrappedName name -> r #

gmapQ :: (forall d. Data d => d -> u) -> IEWrappedName name -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IEWrappedName name -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IEWrappedName name -> m (IEWrappedName name) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWrappedName name -> m (IEWrappedName name) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWrappedName name -> m (IEWrappedName name) #

HasOccName name => HasOccName (IEWrappedName name) 
Instance details

Defined in GHC.Hs.ImpExp

Methods

occName :: IEWrappedName name -> OccName #

OutputableBndr name => Outputable (IEWrappedName name) 
Instance details

Defined in GHC.Hs.ImpExp

Methods

ppr :: IEWrappedName name -> SDoc #

pprPrec :: Rational -> IEWrappedName name -> SDoc #

OutputableBndr name => OutputableBndr (IEWrappedName name) 
Instance details

Defined in GHC.Hs.ImpExp

type LIEWrappedName name = Located (IEWrappedName name) #

Located name with possible adornment - AnnKeywordIds : AnnType, AnnPattern

type LIE pass #

Arguments

 = Located (IE pass)

When in a list this may have

Located Import or Export

data IE pass #

Imported or exported entity.

Constructors

IEVar (XIEVar pass) (LIEWrappedName (IdP pass))

Imported or Exported Variable

IEThingAbs (XIEThingAbs pass) (LIEWrappedName (IdP pass))

Imported or exported Thing with Absent list

The thing is a Class/Type (can't tell) - AnnKeywordIds : AnnPattern, AnnType,AnnVal

IEThingAll (XIEThingAll pass) (LIEWrappedName (IdP pass))

Imported or exported Thing with All imported or exported

The thing is a ClassType and the All refers to methodsconstructors

IEThingWith (XIEThingWith pass) (LIEWrappedName (IdP pass)) IEWildcard [LIEWrappedName (IdP pass)] [Located (FieldLbl (IdP pass))]

Imported or exported Thing With given imported or exported

The thing is a Class/Type and the imported or exported things are methods/constructors and record fields; see Note [IEThingWith] - AnnKeywordIds : AnnOpen, AnnClose, AnnComma, AnnType

IEModuleContents (XIEModuleContents pass) (Located ModuleName)

Imported or exported module contents

(Export Only)

IEGroup (XIEGroup pass) Int HsDocString

Doc section heading

IEDoc (XIEDoc pass) HsDocString

Some documentation

IEDocNamed (XIEDocNamed pass) String

Reference to named doc

XIE (XXIE pass) 

Instances

Instances details
OutputableBndrId p => Outputable (IE (GhcPass p)) 
Instance details

Defined in GHC.Hs.ImpExp

Methods

ppr :: IE (GhcPass p) -> SDoc #

pprPrec :: Rational -> IE (GhcPass p) -> SDoc #

data IEWildcard #

Imported or Exported Wildcard

Constructors

NoIEWildcard 
IEWildcard Int 

Instances

Instances details
Eq IEWildcard 
Instance details

Defined in GHC.Hs.ImpExp

Data IEWildcard 
Instance details

Defined in GHC.Hs.ImpExp

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IEWildcard -> c IEWildcard #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IEWildcard #

toConstr :: IEWildcard -> Constr #

dataTypeOf :: IEWildcard -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IEWildcard) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IEWildcard) #

gmapT :: (forall b. Data b => b -> b) -> IEWildcard -> IEWildcard #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IEWildcard -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IEWildcard -> r #

gmapQ :: (forall d. Data d => d -> u) -> IEWildcard -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IEWildcard -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IEWildcard -> m IEWildcard #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWildcard -> m IEWildcard #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWildcard -> m IEWildcard #

data Pat p #

Constructors

WildPat (XWildPat p)

Wildcard Pattern The sole reason for a type on a WildPat is to support hsPatType :: Pat Id -> Type

VarPat (XVarPat p) (Located (IdP p))

Variable Pattern

LazyPat (XLazyPat p) (LPat p)

Lazy Pattern ^ - AnnKeywordId : AnnTilde

AsPat (XAsPat p) (Located (IdP p)) (LPat p)

As pattern ^ - AnnKeywordId : AnnAt

ParPat (XParPat p) (LPat p)

Parenthesised pattern See Note [Parens in HsSyn] in GHC.Hs.Expr ^ - AnnKeywordId : AnnOpen '(', AnnClose ')'

BangPat (XBangPat p) (LPat p)

Bang pattern ^ - AnnKeywordId : AnnBang

ListPat (XListPat p) [LPat p]

Syntactic List

TuplePat (XTuplePat p) [LPat p] Boxity

Tuple sub-patterns

SumPat (XSumPat p) (LPat p) ConTag Arity

Anonymous sum pattern

ConPatIn (Located (IdP p)) (HsConPatDetails p)

Constructor Pattern In

ConPatOut

Constructor Pattern Out

ViewPat (XViewPat p) (LHsExpr p) (LPat p)

View Pattern

SplicePat (XSplicePat p) (HsSplice p)

Splice Pattern (Includes quasi-quotes)

LitPat (XLitPat p) (HsLit p)

Literal Pattern Used for *non-overloaded* literal patterns: Int, Int, Char, String, etc.

NPat (XNPat p) (Located (HsOverLit p)) (Maybe (SyntaxExpr p)) (SyntaxExpr p)

Natural Pattern

NPlusKPat (XNPlusKPat p) (Located (IdP p)) (Located (HsOverLit p)) (HsOverLit p) (SyntaxExpr p) (SyntaxExpr p)

n+k pattern

SigPat (XSigPat p) (LPat p) (LHsSigWcType (NoGhcTc p))

Pattern with a type signature

CoPat (XCoPat p) HsWrapper (Pat p) Type

Coercion Pattern

XPat (XXPat p)

Trees that Grow extension point for new constructors

Instances

Instances details
OutputableBndrId p => Outputable (Pat (GhcPass p)) 
Instance details

Defined in GHC.Hs.Pat

Methods

ppr :: Pat (GhcPass p) -> SDoc #

pprPrec :: Rational -> Pat (GhcPass p) -> SDoc #

type LPat p = XRec p Pat #

noExtCon :: NoExtCon -> a #

Eliminate a NoExtCon. Much like absurd.

noExtField :: NoExtField #

Used when constructing a term with an unused extension point.

data NoExtField #

A placeholder type for TTG extension points that are not currently unused to represent any particular value.

This should not be confused with NoExtCon, which are found in unused extension constructors and therefore should never be inhabited. In contrast, NoExtField is used in extension points (e.g., as the field of some constructor), so it must have an inhabitant to construct AST passes that manipulate fields with that extension point as their type.

Constructors

NoExtField 

Instances

Instances details
Eq NoExtField 
Instance details

Defined in GHC.Hs.Extension

Data NoExtField 
Instance details

Defined in GHC.Hs.Extension

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NoExtField -> c NoExtField #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NoExtField #

toConstr :: NoExtField -> Constr #

dataTypeOf :: NoExtField -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NoExtField) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NoExtField) #

gmapT :: (forall b. Data b => b -> b) -> NoExtField -> NoExtField #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NoExtField -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NoExtField -> r #

gmapQ :: (forall d. Data d => d -> u) -> NoExtField -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NoExtField -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NoExtField -> m NoExtField #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtField -> m NoExtField #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtField -> m NoExtField #

Ord NoExtField 
Instance details

Defined in GHC.Hs.Extension

Outputable NoExtField 
Instance details

Defined in GHC.Hs.Extension

data NoExtCon #

Used in TTG extension constructors that have yet to be extended with anything. If an extension constructor has NoExtCon as its field, it is not intended to ever be constructed anywhere, and any function that consumes the extension constructor can eliminate it by way of noExtCon.

This should not be confused with NoExtField, which are found in unused extension points (not constructors) and therefore can be inhabited.

Instances

Instances details
Eq NoExtCon 
Instance details

Defined in GHC.Hs.Extension

Data NoExtCon 
Instance details

Defined in GHC.Hs.Extension

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NoExtCon -> c NoExtCon #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NoExtCon #

toConstr :: NoExtCon -> Constr #

dataTypeOf :: NoExtCon -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NoExtCon) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NoExtCon) #

gmapT :: (forall b. Data b => b -> b) -> NoExtCon -> NoExtCon #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NoExtCon -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NoExtCon -> r #

gmapQ :: (forall d. Data d => d -> u) -> NoExtCon -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NoExtCon -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NoExtCon -> m NoExtCon #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtCon -> m NoExtCon #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NoExtCon -> m NoExtCon #

Ord NoExtCon 
Instance details

Defined in GHC.Hs.Extension

Outputable NoExtCon 
Instance details

Defined in GHC.Hs.Extension

data GhcPass (c :: Pass) #

Used as a data type index for the hsSyn AST

Instances

Instances details
Eq (XCFieldOcc (GhcPass p)) => Eq (FieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

Methods

(==) :: FieldOcc (GhcPass p) -> FieldOcc (GhcPass p) -> Bool #

(/=) :: FieldOcc (GhcPass p) -> FieldOcc (GhcPass p) -> Bool #

Eq (GhcPass c) 
Instance details

Defined in GHC.Hs.Extension

Methods

(==) :: GhcPass c -> GhcPass c -> Bool #

(/=) :: GhcPass c -> GhcPass c -> Bool #

Data (HsModule GhcPs) 
Instance details

Defined in GHC.Hs

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule GhcPs -> c (HsModule GhcPs) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsModule GhcPs) #

toConstr :: HsModule GhcPs -> Constr #

dataTypeOf :: HsModule GhcPs -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsModule GhcPs)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsModule GhcPs)) #

gmapT :: (forall b. Data b => b -> b) -> HsModule GhcPs -> HsModule GhcPs #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcPs -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcPs -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsModule GhcPs -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule GhcPs -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule GhcPs -> m (HsModule GhcPs) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcPs -> m (HsModule GhcPs) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcPs -> m (HsModule GhcPs) #

Data (HsModule GhcRn) 
Instance details

Defined in GHC.Hs

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule GhcRn -> c (HsModule GhcRn) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsModule GhcRn) #

toConstr :: HsModule GhcRn -> Constr #

dataTypeOf :: HsModule GhcRn -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsModule GhcRn)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsModule GhcRn)) #

gmapT :: (forall b. Data b => b -> b) -> HsModule GhcRn -> HsModule GhcRn #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcRn -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcRn -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsModule GhcRn -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule GhcRn -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule GhcRn -> m (HsModule GhcRn) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcRn -> m (HsModule GhcRn) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcRn -> m (HsModule GhcRn) #

Data (HsModule GhcTc) 
Instance details

Defined in GHC.Hs

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule GhcTc -> c (HsModule GhcTc) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsModule GhcTc) #

toConstr :: HsModule GhcTc -> Constr #

dataTypeOf :: HsModule GhcTc -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsModule GhcTc)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsModule GhcTc)) #

gmapT :: (forall b. Data b => b -> b) -> HsModule GhcTc -> HsModule GhcTc #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcTc -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcTc -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsModule GhcTc -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule GhcTc -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule GhcTc -> m (HsModule GhcTc) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcTc -> m (HsModule GhcTc) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcTc -> m (HsModule GhcTc) #

Typeable c => Data (GhcPass c) 
Instance details

Defined in GHC.Hs.Extension

Methods

gfoldl :: (forall d b. Data d => c0 (d -> b) -> d -> c0 b) -> (forall g. g -> c0 g) -> GhcPass c -> c0 (GhcPass c) #

gunfold :: (forall b r. Data b => c0 (b -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (GhcPass c) #

toConstr :: GhcPass c -> Constr #

dataTypeOf :: GhcPass c -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (GhcPass c)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (GhcPass c)) #

gmapT :: (forall b. Data b => b -> b) -> GhcPass c -> GhcPass c #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GhcPass c -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GhcPass c -> r #

gmapQ :: (forall d. Data d => d -> u) -> GhcPass c -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GhcPass c -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GhcPass c -> m (GhcPass c) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GhcPass c -> m (GhcPass c) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GhcPass c -> m (GhcPass c) #

Ord (XCFieldOcc (GhcPass p)) => Ord (FieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

DisambECP (PatBuilder GhcPs) 
Instance details

Defined in RdrHsSyn

Associated Types

type Body (PatBuilder GhcPs) :: Type -> Type #

type InfixOp (PatBuilder GhcPs) #

type FunArg (PatBuilder GhcPs) #

Methods

ecpFromCmd' :: LHsCmd GhcPs -> PV (Located (PatBuilder GhcPs)) #

ecpFromExp' :: LHsExpr GhcPs -> PV (Located (PatBuilder GhcPs)) #

mkHsLamPV :: SrcSpan -> MatchGroup GhcPs (Located (PatBuilder GhcPs)) -> PV (Located (PatBuilder GhcPs)) #

mkHsLetPV :: SrcSpan -> LHsLocalBinds GhcPs -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) #

superInfixOp :: (DisambInfixOp (InfixOp (PatBuilder GhcPs)) => PV (Located (PatBuilder GhcPs))) -> PV (Located (PatBuilder GhcPs)) #

mkHsOpAppPV :: SrcSpan -> Located (PatBuilder GhcPs) -> Located (InfixOp (PatBuilder GhcPs)) -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> MatchGroup GhcPs (Located (PatBuilder GhcPs)) -> PV (Located (PatBuilder GhcPs)) #

superFunArg :: (DisambECP (FunArg (PatBuilder GhcPs)) => PV (Located (PatBuilder GhcPs))) -> PV (Located (PatBuilder GhcPs)) #

mkHsAppPV :: SrcSpan -> Located (PatBuilder GhcPs) -> Located (FunArg (PatBuilder GhcPs)) -> PV (Located (PatBuilder GhcPs)) #

mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> Located (PatBuilder GhcPs) -> Bool -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkHsDoPV :: SrcSpan -> Located [LStmt GhcPs (Located (PatBuilder GhcPs))] -> PV (Located (PatBuilder GhcPs)) #

mkHsParPV :: SrcSpan -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkHsVarPV :: Located RdrName -> PV (Located (PatBuilder GhcPs)) #

mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkHsOverLitPV :: Located (HsOverLit GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkHsWildCardPV :: SrcSpan -> PV (Located (PatBuilder GhcPs)) #

mkHsTySigPV :: SrcSpan -> Located (PatBuilder GhcPs) -> LHsType GhcPs -> PV (Located (PatBuilder GhcPs)) #

mkHsExplicitListPV :: SrcSpan -> [Located (PatBuilder GhcPs)] -> PV (Located (PatBuilder GhcPs)) #

mkHsSplicePV :: Located (HsSplice GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkHsRecordPV :: SrcSpan -> SrcSpan -> Located (PatBuilder GhcPs) -> ([LHsRecField GhcPs (Located (PatBuilder GhcPs))], Maybe SrcSpan) -> PV (Located (PatBuilder GhcPs)) #

mkHsNegAppPV :: SrcSpan -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkHsSectionR_PV :: SrcSpan -> Located (InfixOp (PatBuilder GhcPs)) -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkHsAsPatPV :: SrcSpan -> Located RdrName -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkHsLazyPatPV :: SrcSpan -> Located (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkSumOrTuplePV :: SrcSpan -> Boxity -> SumOrTuple (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) #

NamedThing (HsTyVarBndr GhcRn) 
Instance details

Defined in GHC.Hs.Types

OutputableBndrId a => Outputable (InstInfo (GhcPass a)) 
Instance details

Defined in TcEnv

Methods

ppr :: InstInfo (GhcPass a) -> SDoc #

pprPrec :: Rational -> InstInfo (GhcPass a) -> SDoc #

Outputable (PatBuilder GhcPs) 
Instance details

Defined in RdrHsSyn

OutputableBndrId p => Outputable (HsModule (GhcPass p)) 
Instance details

Defined in GHC.Hs

Methods

ppr :: HsModule (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsModule (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (HsCmdTop (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: HsCmdTop (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsCmdTop (GhcPass p) -> SDoc #

OutputableBndrId idL => Outputable (ApplicativeArg (GhcPass idL)) 
Instance details

Defined in GHC.Hs.Expr

OutputableBndrId p => Outputable (HsSplicedThing (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

OutputableBndrId p => Outputable (HsBracket (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

OutputableBndrId p => Outputable (ArithSeqInfo (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

(Outputable (GhcPass p), Outputable (NameOrRdrName (GhcPass p))) => Outputable (HsStmtContext (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

OutputableBndrId p => Outputable (HsDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: HsDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsDecl (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (HsGroup (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: HsGroup (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsGroup (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (SpliceDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (TyClDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: TyClDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> TyClDecl (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (TyClGroup (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (FamilyDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (HsDataDefn (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (HsDerivingClause (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (StandaloneKindSig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (ConDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: ConDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> ConDecl (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (TyFamInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (DataFamInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (ClsInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (InstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: InstDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> InstDecl (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (DerivDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (DerivStrategy (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (DefaultDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (ForeignDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (RuleDecls (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (RuleDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: RuleDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> RuleDecl (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (RuleBndr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: RuleBndr (GhcPass p) -> SDoc #

pprPrec :: Rational -> RuleBndr (GhcPass p) -> SDoc #

OutputableBndr (IdP (GhcPass p)) => Outputable (WarnDecls (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndr (IdP (GhcPass p)) => Outputable (WarnDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: WarnDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> WarnDecl (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (AnnDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: AnnDecl (GhcPass p) -> SDoc #

pprPrec :: Rational -> AnnDecl (GhcPass p) -> SDoc #

OutputableBndr (IdP (GhcPass p)) => Outputable (RoleAnnotDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

OutputableBndrId p => Outputable (ABExport (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

Methods

ppr :: ABExport (GhcPass p) -> SDoc #

pprPrec :: Rational -> ABExport (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (HsIPBinds (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

OutputableBndrId p => Outputable (IPBind (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

Methods

ppr :: IPBind (GhcPass p) -> SDoc #

pprPrec :: Rational -> IPBind (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (Sig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

Methods

ppr :: Sig (GhcPass p) -> SDoc #

pprPrec :: Rational -> Sig (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (FixitySig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

OutputableBndrId p => Outputable (LHsQTyVars (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

OutputableBndrId p => Outputable (HsTyVarBndr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

OutputableBndrId p => Outputable (HsType (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

Methods

ppr :: HsType (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsType (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (ConDeclField (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

Outputable (AmbiguousFieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

Outputable (HsLit (GhcPass p)) 
Instance details

Defined in GHC.Hs.Lit

Methods

ppr :: HsLit (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsLit (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (HsOverLit (GhcPass p)) 
Instance details

Defined in GHC.Hs.Lit

OutputableBndrId p => Outputable (HsExpr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: HsExpr (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsExpr (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (HsCmd (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: HsCmd (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsCmd (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (HsSplice (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: HsSplice (GhcPass p) -> SDoc #

pprPrec :: Rational -> HsSplice (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (SyntaxExpr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

OutputableBndrId p => Outputable (ImportDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.ImpExp

OutputableBndrId p => Outputable (IE (GhcPass p)) 
Instance details

Defined in GHC.Hs.ImpExp

Methods

ppr :: IE (GhcPass p) -> SDoc #

pprPrec :: Rational -> IE (GhcPass p) -> SDoc #

OutputableBndrId p => Outputable (Pat (GhcPass p)) 
Instance details

Defined in GHC.Hs.Pat

Methods

ppr :: Pat (GhcPass p) -> SDoc #

pprPrec :: Rational -> Pat (GhcPass p) -> SDoc #

OutputableBndr (AmbiguousFieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Types

(OutputableBndrId pr, Outputable body) => Outputable (Match (GhcPass pr) body) 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: Match (GhcPass pr) body -> SDoc #

pprPrec :: Rational -> Match (GhcPass pr) body -> SDoc #

(OutputableBndrId pl, OutputableBndrId pr) => Outputable (HsLocalBindsLR (GhcPass pl) (GhcPass pr)) 
Instance details

Defined in GHC.Hs.Binds

(OutputableBndrId pl, OutputableBndrId pr) => Outputable (HsValBindsLR (GhcPass pl) (GhcPass pr)) 
Instance details

Defined in GHC.Hs.Binds

(OutputableBndrId pl, OutputableBndrId pr) => Outputable (HsBindLR (GhcPass pl) (GhcPass pr)) 
Instance details

Defined in GHC.Hs.Binds

Methods

ppr :: HsBindLR (GhcPass pl) (GhcPass pr) -> SDoc #

pprPrec :: Rational -> HsBindLR (GhcPass pl) (GhcPass pr) -> SDoc #

(OutputableBndrId l, OutputableBndrId r, Outputable (XXPatSynBind (GhcPass l) (GhcPass r))) => Outputable (PatSynBind (GhcPass l) (GhcPass r)) 
Instance details

Defined in GHC.Hs.Binds

Outputable thing => Outputable (HsImplicitBndrs (GhcPass p) thing) 
Instance details

Defined in GHC.Hs.Types

Methods

ppr :: HsImplicitBndrs (GhcPass p) thing -> SDoc #

pprPrec :: Rational -> HsImplicitBndrs (GhcPass p) thing -> SDoc #

Outputable thing => Outputable (HsWildCardBndrs (GhcPass p) thing) 
Instance details

Defined in GHC.Hs.Types

Methods

ppr :: HsWildCardBndrs (GhcPass p) thing -> SDoc #

pprPrec :: Rational -> HsWildCardBndrs (GhcPass p) thing -> SDoc #

(OutputableBndrId pl, OutputableBndrId pr, Outputable body) => Outputable (StmtLR (GhcPass pl) (GhcPass pr) body) 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: StmtLR (GhcPass pl) (GhcPass pr) body -> SDoc #

pprPrec :: Rational -> StmtLR (GhcPass pl) (GhcPass pr) body -> SDoc #

type IdP GhcPs 
Instance details

Defined in GHC.Hs.Extension

type IdP GhcRn 
Instance details

Defined in GHC.Hs.Extension

type IdP GhcRn = Name
type IdP GhcTc 
Instance details

Defined in GHC.Hs.Extension

type IdP GhcTc = Id
type XIPBinds GhcPs 
Instance details

Defined in GHC.Hs.Binds

type XIPBinds GhcRn 
Instance details

Defined in GHC.Hs.Binds

type XIPBinds GhcTc 
Instance details

Defined in GHC.Hs.Binds

type XSynDecl GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XSynDecl GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XSynDecl GhcTc 
Instance details

Defined in GHC.Hs.Decls

type XDataDecl GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XDataDecl GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XDataDecl GhcTc 
Instance details

Defined in GHC.Hs.Decls

type XClassDecl GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XClassDecl GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XClassDecl GhcTc 
Instance details

Defined in GHC.Hs.Decls

type XViaStrategy GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XViaStrategy GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XViaStrategy GhcTc 
Instance details

Defined in GHC.Hs.Decls

type XForeignImport GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XForeignImport GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XForeignImport GhcTc 
Instance details

Defined in GHC.Hs.Decls

type XForeignExport GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XForeignExport GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XForeignExport GhcTc 
Instance details

Defined in GHC.Hs.Decls

type XHsRule GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XHsRule GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XHsRule GhcTc 
Instance details

Defined in GHC.Hs.Decls

type XOpApp GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XOpApp GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XOpApp GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XExplicitSum GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XExplicitSum GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XExplicitSum GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XMultiIf GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XMultiIf GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XMultiIf GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XDo GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XDo GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XDo GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XDo GhcTc = Type
type XExplicitList GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XExplicitList GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XExplicitList GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XRecordCon GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XRecordCon GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XRecordCon GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XRecordUpd GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XRecordUpd GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XRecordUpd GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XArithSeq GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XArithSeq GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XArithSeq GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XStatic GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XStatic GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XStatic GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XUnambiguous GhcPs 
Instance details

Defined in GHC.Hs.Types

type XUnambiguous GhcRn 
Instance details

Defined in GHC.Hs.Types

type XUnambiguous GhcTc 
Instance details

Defined in GHC.Hs.Types

type XAmbiguous GhcPs 
Instance details

Defined in GHC.Hs.Types

type XAmbiguous GhcRn 
Instance details

Defined in GHC.Hs.Types

type XAmbiguous GhcTc 
Instance details

Defined in GHC.Hs.Types

type XMissing GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XMissing GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XMissing GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XCmdTop GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdTop GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdTop GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XCmdArrApp GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdArrApp GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdArrApp GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XCmdDo GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdDo GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdDo GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XOverLit GhcPs 
Instance details

Defined in GHC.Hs.Lit

type XOverLit GhcRn 
Instance details

Defined in GHC.Hs.Lit

type XOverLit GhcTc 
Instance details

Defined in GHC.Hs.Lit

type XWildPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XWildPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XWildPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XListPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XListPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XListPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XTuplePat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XTuplePat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XTuplePat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XSumPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XSumPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XSumPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XSumPat GhcTc = [Type]
type XViewPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XViewPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XViewPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XNPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XNPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XNPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XNPlusKPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XNPlusKPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XNPlusKPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XSigPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XSigPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XSigPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XHsQTvs GhcPs 
Instance details

Defined in GHC.Hs.Types

type XHsQTvs GhcRn 
Instance details

Defined in GHC.Hs.Types

type XHsQTvs GhcRn = HsQTvsRn
type XHsQTvs GhcTc 
Instance details

Defined in GHC.Hs.Types

type XHsQTvs GhcTc = HsQTvsRn
type XSpliceTy GhcPs 
Instance details

Defined in GHC.Hs.Types

type XSpliceTy GhcRn 
Instance details

Defined in GHC.Hs.Types

type XSpliceTy GhcTc 
Instance details

Defined in GHC.Hs.Types

type XExplicitListTy GhcPs 
Instance details

Defined in GHC.Hs.Types

type XExplicitListTy GhcRn 
Instance details

Defined in GHC.Hs.Types

type XExplicitListTy GhcTc 
Instance details

Defined in GHC.Hs.Types

type XExplicitTupleTy GhcPs 
Instance details

Defined in GHC.Hs.Types

type XExplicitTupleTy GhcRn 
Instance details

Defined in GHC.Hs.Types

type XExplicitTupleTy GhcTc 
Instance details

Defined in GHC.Hs.Types

type XCFieldOcc GhcPs 
Instance details

Defined in GHC.Hs.Types

type XCFieldOcc GhcRn 
Instance details

Defined in GHC.Hs.Types

type XCFieldOcc GhcTc 
Instance details

Defined in GHC.Hs.Types

type XMG GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XMG GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XMG GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XHsIB GhcPs _1 
Instance details

Defined in GHC.Hs.Types

type XHsIB GhcRn _1 
Instance details

Defined in GHC.Hs.Types

type XHsIB GhcRn _1 = [Name]
type XHsIB GhcTc _1 
Instance details

Defined in GHC.Hs.Types

type XHsIB GhcTc _1 = [Name]
type XHsWC GhcPs b 
Instance details

Defined in GHC.Hs.Types

type XHsWC GhcRn b 
Instance details

Defined in GHC.Hs.Types

type XHsWC GhcRn b = [Name]
type XHsWC GhcTc b 
Instance details

Defined in GHC.Hs.Types

type XHsWC GhcTc b = [Name]
type XPatBind GhcPs (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XPatBind GhcRn (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XPatBind GhcTc (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type FunArg (PatBuilder GhcPs) 
Instance details

Defined in RdrHsSyn

type InfixOp (PatBuilder GhcPs) 
Instance details

Defined in RdrHsSyn

type Body (PatBuilder GhcPs) 
Instance details

Defined in RdrHsSyn

type XABE (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XXABExport (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XXHsIPBinds (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XCIPBind (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XXIPBind (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XTypeSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XPatSynSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XClassOpSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XIdSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XFixSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XInlineSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XSpecSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XSpecInstSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XMinimalSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XSCCFunSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XCompleteMatchSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XXSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XFixitySig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XXFixitySig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XStandaloneKindSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Decls

type XXStandaloneKindSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Decls

type XTyClD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XInstD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XDerivD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XValD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XSigD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XKindSigD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XDefD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XForD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XWarningD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XAnnD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XRuleD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XSpliceD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XDocD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XRoleAnnotD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXHsDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCHsGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXHsGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XSpliceDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXSpliceDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XFamDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXTyClDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCTyClGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXTyClGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XNoSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCKindSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XTyVarSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXFamilyResultSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCFamilyDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXFamilyDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCHsDataDefn (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXHsDataDefn (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCHsDerivingClause (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXHsDerivingClause (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XConDeclGADT (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XConDeclH98 (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXConDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCClsInstDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXClsInstDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XClsInstD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XDataFamInstD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XTyFamInstD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXInstDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCDerivDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXDerivDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCDefaultDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXDefaultDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXForeignDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCRuleDecls (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXRuleDecls (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXRuleDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCRuleBndr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XRuleBndrSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXRuleBndr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XWarnings (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXWarnDecls (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XWarning (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXWarnDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XHsAnnotation (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXAnnDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCRoleAnnotDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXRoleAnnotDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XVar (GhcPass _1) = NoExtField
type XUnboundVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XConLikeOut (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XRecFld (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XOverLabel (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XIPVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XOverLitE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XLitE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XLam (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XLam (GhcPass _1) = NoExtField
type XLamCase (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XApp (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XApp (GhcPass _1) = NoExtField
type XAppTypeE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XNegApp (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XPar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XPar (GhcPass _1) = NoExtField
type XSectionL (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XSectionR (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XExplicitTuple (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCase (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XIf (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XIf (GhcPass _1) = NoExtField
type XLet (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XLet (GhcPass _1) = NoExtField
type XExprWithTySig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XSCC (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XSCC (GhcPass _1) = NoExtField
type XCoreAnn (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XBracket (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XRnBracketOut (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XTcBracketOut (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XSpliceE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XProc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XTick (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XBinTick (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XTickPragma (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XWrap (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXExpr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXExpr (GhcPass _1) = NoExtCon
type XXAmbiguousFieldOcc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XPresent (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXTupArg (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XTypedSplice (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XUntypedSplice (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XQuasiQuote (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XSpliced (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXSplice (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XExpBr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XPatBr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XDecBrL (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XDecBrG (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XTypBr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XVarBr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XTExpBr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXBracket (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXCmdTop (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCmdArrForm (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCmdApp (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCmdLam (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCmdPar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCmdCase (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCmdIf (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCmdLet (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCmdWrap (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXCmd (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXCmd (GhcPass _1) = NoExtCon
type XApplicativeArgOne (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XApplicativeArgMany (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXApplicativeArg (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XHsChar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsCharPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsString (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsStringPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsInt (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsIntPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsWordPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsInt64Prim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsWord64Prim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsInteger (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsRat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsFloatPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsDoublePrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XXLit (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XXLit (GhcPass _1) = NoExtCon
type XXOverLit (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XVarPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type XLazyPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type XAsPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type XParPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type XBangPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type XSplicePat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type XLitPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type XCoPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type XXPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type XXPat (GhcPass _1) = NoExtCon
type XXLHsQTyVars (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XForAllTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XQualTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XTyVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XAppTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XAppKindTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XFunTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XListTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XTupleTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XSumTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XOpTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XParTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XIParamTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XStarTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XKindSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XDocTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XBangTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XRecTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XTyLit (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XWildCardTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XXType (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XUserTyVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XKindedTyVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XXTyVarBndr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XConDeclField (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XXConDeclField (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XXFieldOcc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type XCImportDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XXImportDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEThingAbs (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEThingAll (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEThingWith (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEModuleContents (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEDoc (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEDocNamed (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XXIE (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XXIE (GhcPass _1) = NoExtCon
type XRec (GhcPass p) f 
Instance details

Defined in GHC.Hs.Extension

type XRec (GhcPass p) f = Located (f (GhcPass p))
type XFunBind (GhcPass pL) GhcTc 
Instance details

Defined in GHC.Hs.Binds

type XFunBind (GhcPass pL) GhcRn 
Instance details

Defined in GHC.Hs.Binds

type XFunBind (GhcPass pL) GhcPs 
Instance details

Defined in GHC.Hs.Binds

type XPSB (GhcPass idL) GhcTc 
Instance details

Defined in GHC.Hs.Binds

type XPSB (GhcPass idL) GhcTc = NameSet
type XPSB (GhcPass idL) GhcRn 
Instance details

Defined in GHC.Hs.Binds

type XPSB (GhcPass idL) GhcRn = NameSet
type XPSB (GhcPass idL) GhcPs 
Instance details

Defined in GHC.Hs.Binds

type XCFamEqn (GhcPass _1) r 
Instance details

Defined in GHC.Hs.Decls

type XXFamEqn (GhcPass _1) r 
Instance details

Defined in GHC.Hs.Decls

type XXFamEqn (GhcPass _1) r = NoExtCon
type XXMatchGroup (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XCMatch (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XCMatch (GhcPass _1) b = NoExtField
type XXMatch (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XXMatch (GhcPass _1) b = NoExtCon
type XCGRHSs (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XCGRHSs (GhcPass _1) b = NoExtField
type XXGRHSs (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XXGRHSs (GhcPass _1) b = NoExtCon
type XCGRHS (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XCGRHS (GhcPass _1) b = NoExtField
type XXGRHS (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XXGRHS (GhcPass _1) b = NoExtCon
type XXHsImplicitBndrs (GhcPass _1) _2 
Instance details

Defined in GHC.Hs.Types

type XXHsWildCardBndrs (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Types

type XBindStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XBindStmt (GhcPass _1) GhcTc b = Type
type XBindStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XBindStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XApplicativeStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XApplicativeStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XApplicativeStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XBodyStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XBodyStmt (GhcPass _1) GhcTc b = Type
type XBodyStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XBodyStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XParStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XParStmt (GhcPass _1) GhcTc b = Type
type XParStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XParStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XTransStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XTransStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XTransStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XRecStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XRecStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XRecStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XHsValBinds (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XHsIPBinds (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XEmptyLocalBinds (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XXHsLocalBindsLR (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XValBinds (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XXValBindsLR (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XVarBind (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XAbsBinds (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XPatSynBind (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XXHsBindsLR (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XXPatSynBind (GhcPass idL) (GhcPass idR) 
Instance details

Defined in GHC.Hs.Binds

type XParStmtBlock (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Expr

type XXParStmtBlock (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Expr

type XLastStmt (GhcPass _1) (GhcPass _2) b 
Instance details

Defined in GHC.Hs.Expr

type XLastStmt (GhcPass _1) (GhcPass _2) b = NoExtField
type XLetStmt (GhcPass _1) (GhcPass _2) b 
Instance details

Defined in GHC.Hs.Expr

type XLetStmt (GhcPass _1) (GhcPass _2) b = NoExtField
type XXStmtLR (GhcPass _1) (GhcPass _2) b 
Instance details

Defined in GHC.Hs.Expr

type XXStmtLR (GhcPass _1) (GhcPass _2) b = NoExtCon

data Pass #

Constructors

Parsed 
Renamed 
Typechecked 

Instances

Instances details
Data Pass 
Instance details

Defined in GHC.Hs.Extension

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pass -> c Pass #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Pass #

toConstr :: Pass -> Constr #

dataTypeOf :: Pass -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Pass) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Pass) #

gmapT :: (forall b. Data b => b -> b) -> Pass -> Pass #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pass -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pass -> r #

gmapQ :: (forall d. Data d => d -> u) -> Pass -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Pass -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pass -> m Pass #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pass -> m Pass #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pass -> m Pass #

type GhcTcId = GhcTc #

type family XRec p (f :: Type -> Type) = (r :: Type) | r -> p f #

GHC's L prefixed variants wrap their vanilla variant in this type family, to add SrcLoc info via Located. Other passes than GhcPass not interested in location information can define this instance as f p.

Instances

Instances details
type XRec (GhcPass p) f 
Instance details

Defined in GHC.Hs.Extension

type XRec (GhcPass p) f = Located (f (GhcPass p))

type family IdP p #

Maps the "normal" id type for a given pass

Instances

Instances details
type IdP GhcPs 
Instance details

Defined in GHC.Hs.Extension

type IdP GhcRn 
Instance details

Defined in GHC.Hs.Extension

type IdP GhcRn = Name
type IdP GhcTc 
Instance details

Defined in GHC.Hs.Extension

type IdP GhcTc = Id

type LIdP p = Located (IdP p) #

type family NoGhcTc p where ... #

Marks that a field uses the GhcRn variant even when the pass parameter is GhcTc. Useful for storing HsTypes in GHC.Hs.Exprs, say, because HsType GhcTc should never occur.

Equations

NoGhcTc (GhcPass pass) = GhcPass (NoGhcTcPass pass) 
NoGhcTc other = other 

type family NoGhcTcPass (p :: Pass) :: Pass where ... #

Equations

NoGhcTcPass 'Typechecked = 'Renamed 
NoGhcTcPass other = other 

type family XHsValBinds x x' #

Instances

Instances details
type XHsValBinds (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type family XHsIPBinds x x' #

Instances

Instances details
type XHsIPBinds (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type family XEmptyLocalBinds x x' #

Instances

Instances details
type XEmptyLocalBinds (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type family XXHsLocalBindsLR x x' #

Instances

Instances details
type XXHsLocalBindsLR (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type ForallXHsLocalBindsLR (c :: Type -> Constraint) x x' = (c (XHsValBinds x x'), c (XHsIPBinds x x'), c (XEmptyLocalBinds x x'), c (XXHsLocalBindsLR x x')) #

type family XValBinds x x' #

Instances

Instances details
type XValBinds (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type family XXValBindsLR x x' #

Instances

Instances details
type XXValBindsLR (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type ForallXValBindsLR (c :: Type -> Constraint) x x' = (c (XValBinds x x'), c (XXValBindsLR x x')) #

type family XFunBind x x' #

Instances

Instances details
type XFunBind (GhcPass pL) GhcTc 
Instance details

Defined in GHC.Hs.Binds

type XFunBind (GhcPass pL) GhcRn 
Instance details

Defined in GHC.Hs.Binds

type XFunBind (GhcPass pL) GhcPs 
Instance details

Defined in GHC.Hs.Binds

type family XPatBind x x' #

Instances

Instances details
type XPatBind GhcPs (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XPatBind GhcRn (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XPatBind GhcTc (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type family XVarBind x x' #

Instances

Instances details
type XVarBind (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type family XAbsBinds x x' #

Instances

Instances details
type XAbsBinds (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type family XPatSynBind x x' #

Instances

Instances details
type XPatSynBind (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type family XXHsBindsLR x x' #

Instances

Instances details
type XXHsBindsLR (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type ForallXHsBindsLR (c :: Type -> Constraint) x x' = (c (XFunBind x x'), c (XPatBind x x'), c (XVarBind x x'), c (XAbsBinds x x'), c (XPatSynBind x x'), c (XXHsBindsLR x x')) #

type family XABE x #

Instances

Instances details
type XABE (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XXABExport x #

Instances

Instances details
type XXABExport (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type ForallXABExport (c :: Type -> Constraint) x = (c (XABE x), c (XXABExport x)) #

type family XPSB x x' #

Instances

Instances details
type XPSB (GhcPass idL) GhcTc 
Instance details

Defined in GHC.Hs.Binds

type XPSB (GhcPass idL) GhcTc = NameSet
type XPSB (GhcPass idL) GhcRn 
Instance details

Defined in GHC.Hs.Binds

type XPSB (GhcPass idL) GhcRn = NameSet
type XPSB (GhcPass idL) GhcPs 
Instance details

Defined in GHC.Hs.Binds

type family XXPatSynBind x x' #

Instances

Instances details
type XXPatSynBind (GhcPass idL) (GhcPass idR) 
Instance details

Defined in GHC.Hs.Binds

type ForallXPatSynBind (c :: Type -> Constraint) x x' = (c (XPSB x x'), c (XXPatSynBind x x')) #

type family XIPBinds x #

Instances

Instances details
type XIPBinds GhcPs 
Instance details

Defined in GHC.Hs.Binds

type XIPBinds GhcRn 
Instance details

Defined in GHC.Hs.Binds

type XIPBinds GhcTc 
Instance details

Defined in GHC.Hs.Binds

type family XXHsIPBinds x #

Instances

Instances details
type XXHsIPBinds (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type ForallXHsIPBinds (c :: Type -> Constraint) x = (c (XIPBinds x), c (XXHsIPBinds x)) #

type family XCIPBind x #

Instances

Instances details
type XCIPBind (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XXIPBind x #

Instances

Instances details
type XXIPBind (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type ForallXIPBind (c :: Type -> Constraint) x = (c (XCIPBind x), c (XXIPBind x)) #

type family XTypeSig x #

Instances

Instances details
type XTypeSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XPatSynSig x #

Instances

Instances details
type XPatSynSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XClassOpSig x #

Instances

Instances details
type XClassOpSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XIdSig x #

Instances

Instances details
type XIdSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XFixSig x #

Instances

Instances details
type XFixSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XInlineSig x #

Instances

Instances details
type XInlineSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XSpecSig x #

Instances

Instances details
type XSpecSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XSpecInstSig x #

Instances

Instances details
type XSpecInstSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XMinimalSig x #

Instances

Instances details
type XMinimalSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XSCCFunSig x #

Instances

Instances details
type XSCCFunSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XCompleteMatchSig x #

Instances

Instances details
type XCompleteMatchSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XXSig x #

Instances

Instances details
type XXSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type ForallXSig (c :: Type -> Constraint) x = (c (XTypeSig x), c (XPatSynSig x), c (XClassOpSig x), c (XIdSig x), c (XFixSig x), c (XInlineSig x), c (XSpecSig x), c (XSpecInstSig x), c (XMinimalSig x), c (XSCCFunSig x), c (XCompleteMatchSig x), c (XXSig x)) #

type family XFixitySig x #

Instances

Instances details
type XFixitySig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XXFixitySig x #

Instances

Instances details
type XXFixitySig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type ForallXFixitySig (c :: Type -> Constraint) x = (c (XFixitySig x), c (XXFixitySig x)) #

type family XStandaloneKindSig x #

Instances

Instances details
type XStandaloneKindSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Decls

type family XXStandaloneKindSig x #

Instances

Instances details
type XXStandaloneKindSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Decls

type family XTyClD x #

Instances

Instances details
type XTyClD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XInstD x #

Instances

Instances details
type XInstD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XDerivD x #

Instances

Instances details
type XDerivD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XValD x #

Instances

Instances details
type XValD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XSigD x #

Instances

Instances details
type XSigD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XKindSigD x #

Instances

Instances details
type XKindSigD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XDefD x #

Instances

Instances details
type XDefD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XForD x #

Instances

Instances details
type XForD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XWarningD x #

Instances

Instances details
type XWarningD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XAnnD x #

Instances

Instances details
type XAnnD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XRuleD x #

Instances

Instances details
type XRuleD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XSpliceD x #

Instances

Instances details
type XSpliceD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XDocD x #

Instances

Instances details
type XDocD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XRoleAnnotD x #

Instances

Instances details
type XRoleAnnotD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXHsDecl x #

Instances

Instances details
type XXHsDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXHsDecl (c :: Type -> Constraint) x = (c (XTyClD x), c (XInstD x), c (XDerivD x), c (XValD x), c (XSigD x), c (XKindSigD x), c (XDefD x), c (XForD x), c (XWarningD x), c (XAnnD x), c (XRuleD x), c (XSpliceD x), c (XDocD x), c (XRoleAnnotD x), c (XXHsDecl x)) #

type family XCHsGroup x #

Instances

Instances details
type XCHsGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXHsGroup x #

Instances

Instances details
type XXHsGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXHsGroup (c :: Type -> Constraint) x = (c (XCHsGroup x), c (XXHsGroup x)) #

type family XSpliceDecl x #

Instances

Instances details
type XSpliceDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXSpliceDecl x #

Instances

Instances details
type XXSpliceDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXSpliceDecl (c :: Type -> Constraint) x = (c (XSpliceDecl x), c (XXSpliceDecl x)) #

type family XFamDecl x #

Instances

Instances details
type XFamDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XSynDecl x #

Instances

Instances details
type XSynDecl GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XSynDecl GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XSynDecl GhcTc 
Instance details

Defined in GHC.Hs.Decls

type family XDataDecl x #

Instances

Instances details
type XDataDecl GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XDataDecl GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XDataDecl GhcTc 
Instance details

Defined in GHC.Hs.Decls

type family XClassDecl x #

Instances

Instances details
type XClassDecl GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XClassDecl GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XClassDecl GhcTc 
Instance details

Defined in GHC.Hs.Decls

type family XXTyClDecl x #

Instances

Instances details
type XXTyClDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXTyClDecl (c :: Type -> Constraint) x = (c (XFamDecl x), c (XSynDecl x), c (XDataDecl x), c (XClassDecl x), c (XXTyClDecl x)) #

type family XCTyClGroup x #

Instances

Instances details
type XCTyClGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXTyClGroup x #

Instances

Instances details
type XXTyClGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXTyClGroup (c :: Type -> Constraint) x = (c (XCTyClGroup x), c (XXTyClGroup x)) #

type family XNoSig x #

Instances

Instances details
type XNoSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XCKindSig x #

Instances

Instances details
type XCKindSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XTyVarSig x #

Instances

Instances details
type XTyVarSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXFamilyResultSig x #

Instances

Instances details
type XXFamilyResultSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXFamilyResultSig (c :: Type -> Constraint) x = (c (XNoSig x), c (XCKindSig x), c (XTyVarSig x), c (XXFamilyResultSig x)) #

type family XCFamilyDecl x #

Instances

Instances details
type XCFamilyDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXFamilyDecl x #

Instances

Instances details
type XXFamilyDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXFamilyDecl (c :: Type -> Constraint) x = (c (XCFamilyDecl x), c (XXFamilyDecl x)) #

type family XCHsDataDefn x #

Instances

Instances details
type XCHsDataDefn (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXHsDataDefn x #

Instances

Instances details
type XXHsDataDefn (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXHsDataDefn (c :: Type -> Constraint) x = (c (XCHsDataDefn x), c (XXHsDataDefn x)) #

type family XCHsDerivingClause x #

Instances

Instances details
type XCHsDerivingClause (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXHsDerivingClause x #

Instances

Instances details
type XXHsDerivingClause (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XConDeclGADT x #

Instances

Instances details
type XConDeclGADT (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XConDeclH98 x #

Instances

Instances details
type XConDeclH98 (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXConDecl x #

Instances

Instances details
type XXConDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXConDecl (c :: Type -> Constraint) x = (c (XConDeclGADT x), c (XConDeclH98 x), c (XXConDecl x)) #

type family XCFamEqn x r #

Instances

Instances details
type XCFamEqn (GhcPass _1) r 
Instance details

Defined in GHC.Hs.Decls

type family XXFamEqn x r #

Instances

Instances details
type XXFamEqn (GhcPass _1) r 
Instance details

Defined in GHC.Hs.Decls

type XXFamEqn (GhcPass _1) r = NoExtCon

type ForallXFamEqn (c :: Type -> Constraint) x r = (c (XCFamEqn x r), c (XXFamEqn x r)) #

type family XCClsInstDecl x #

Instances

Instances details
type XCClsInstDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXClsInstDecl x #

Instances

Instances details
type XXClsInstDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XClsInstD x #

Instances

Instances details
type XClsInstD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XDataFamInstD x #

Instances

Instances details
type XDataFamInstD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XTyFamInstD x #

Instances

Instances details
type XTyFamInstD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXInstDecl x #

Instances

Instances details
type XXInstDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXInstDecl (c :: Type -> Constraint) x = (c (XClsInstD x), c (XDataFamInstD x), c (XTyFamInstD x), c (XXInstDecl x)) #

type family XCDerivDecl x #

Instances

Instances details
type XCDerivDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXDerivDecl x #

Instances

Instances details
type XXDerivDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXDerivDecl (c :: Type -> Constraint) x = (c (XCDerivDecl x), c (XXDerivDecl x)) #

type family XViaStrategy x #

Instances

Instances details
type XViaStrategy GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XViaStrategy GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XViaStrategy GhcTc 
Instance details

Defined in GHC.Hs.Decls

type family XCDefaultDecl x #

Instances

Instances details
type XCDefaultDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXDefaultDecl x #

Instances

Instances details
type XXDefaultDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XForeignImport x #

Instances

Instances details
type XForeignImport GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XForeignImport GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XForeignImport GhcTc 
Instance details

Defined in GHC.Hs.Decls

type family XForeignExport x #

Instances

Instances details
type XForeignExport GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XForeignExport GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XForeignExport GhcTc 
Instance details

Defined in GHC.Hs.Decls

type family XXForeignDecl x #

Instances

Instances details
type XXForeignDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XCRuleDecls x #

Instances

Instances details
type XCRuleDecls (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXRuleDecls x #

Instances

Instances details
type XXRuleDecls (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXRuleDecls (c :: Type -> Constraint) x = (c (XCRuleDecls x), c (XXRuleDecls x)) #

type family XHsRule x #

Instances

Instances details
type XHsRule GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XHsRule GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XHsRule GhcTc 
Instance details

Defined in GHC.Hs.Decls

type family XXRuleDecl x #

Instances

Instances details
type XXRuleDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXRuleDecl (c :: Type -> Constraint) x = (c (XHsRule x), c (XXRuleDecl x)) #

type family XCRuleBndr x #

Instances

Instances details
type XCRuleBndr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XRuleBndrSig x #

Instances

Instances details
type XRuleBndrSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXRuleBndr x #

Instances

Instances details
type XXRuleBndr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXRuleBndr (c :: Type -> Constraint) x = (c (XCRuleBndr x), c (XRuleBndrSig x), c (XXRuleBndr x)) #

type family XWarnings x #

Instances

Instances details
type XWarnings (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXWarnDecls x #

Instances

Instances details
type XXWarnDecls (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXWarnDecls (c :: Type -> Constraint) x = (c (XWarnings x), c (XXWarnDecls x)) #

type family XWarning x #

Instances

Instances details
type XWarning (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXWarnDecl x #

Instances

Instances details
type XXWarnDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXWarnDecl (c :: Type -> Constraint) x = (c (XWarning x), c (XXWarnDecl x)) #

type family XHsAnnotation x #

Instances

Instances details
type XHsAnnotation (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXAnnDecl x #

Instances

Instances details
type XXAnnDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type ForallXAnnDecl (c :: Type -> Constraint) x = (c (XHsAnnotation x), c (XXAnnDecl x)) #

type family XCRoleAnnotDecl x #

Instances

Instances details
type XCRoleAnnotDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXRoleAnnotDecl x #

Instances

Instances details
type XXRoleAnnotDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XVar x #

Instances

Instances details
type XVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XVar (GhcPass _1) = NoExtField

type family XUnboundVar x #

Instances

Instances details
type XUnboundVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XConLikeOut x #

Instances

Instances details
type XConLikeOut (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XRecFld x #

Instances

Instances details
type XRecFld (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XOverLabel x #

Instances

Instances details
type XOverLabel (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XIPVar x #

Instances

Instances details
type XIPVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XOverLitE x #

Instances

Instances details
type XOverLitE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XLitE x #

Instances

Instances details
type XLitE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XLam x #

Instances

Instances details
type XLam (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XLam (GhcPass _1) = NoExtField

type family XLamCase x #

Instances

Instances details
type XLamCase (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XApp x #

Instances

Instances details
type XApp (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XApp (GhcPass _1) = NoExtField

type family XAppTypeE x #

Instances

Instances details
type XAppTypeE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XOpApp x #

Instances

Instances details
type XOpApp GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XOpApp GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XOpApp GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XNegApp x #

Instances

Instances details
type XNegApp (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XPar x #

Instances

Instances details
type XPar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XPar (GhcPass _1) = NoExtField

type family XSectionL x #

Instances

Instances details
type XSectionL (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XSectionR x #

Instances

Instances details
type XSectionR (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XExplicitTuple x #

Instances

Instances details
type XExplicitTuple (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XExplicitSum x #

Instances

Instances details
type XExplicitSum GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XExplicitSum GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XExplicitSum GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XCase x #

Instances

Instances details
type XCase (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XIf x #

Instances

Instances details
type XIf (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XIf (GhcPass _1) = NoExtField

type family XMultiIf x #

Instances

Instances details
type XMultiIf GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XMultiIf GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XMultiIf GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XLet x #

Instances

Instances details
type XLet (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XLet (GhcPass _1) = NoExtField

type family XDo x #

Instances

Instances details
type XDo GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XDo GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XDo GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XDo GhcTc = Type

type family XExplicitList x #

Instances

Instances details
type XExplicitList GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XExplicitList GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XExplicitList GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XRecordCon x #

Instances

Instances details
type XRecordCon GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XRecordCon GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XRecordCon GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XRecordUpd x #

Instances

Instances details
type XRecordUpd GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XRecordUpd GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XRecordUpd GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XExprWithTySig x #

Instances

Instances details
type XExprWithTySig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XArithSeq x #

Instances

Instances details
type XArithSeq GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XArithSeq GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XArithSeq GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XSCC x #

Instances

Instances details
type XSCC (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XSCC (GhcPass _1) = NoExtField

type family XCoreAnn x #

Instances

Instances details
type XCoreAnn (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XBracket x #

Instances

Instances details
type XBracket (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XRnBracketOut x #

Instances

Instances details
type XRnBracketOut (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XTcBracketOut x #

Instances

Instances details
type XTcBracketOut (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XSpliceE x #

Instances

Instances details
type XSpliceE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XProc x #

Instances

Instances details
type XProc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XStatic x #

Instances

Instances details
type XStatic GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XStatic GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XStatic GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XTick x #

Instances

Instances details
type XTick (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XBinTick x #

Instances

Instances details
type XBinTick (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XTickPragma x #

Instances

Instances details
type XTickPragma (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XWrap x #

Instances

Instances details
type XWrap (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XXExpr x #

Instances

Instances details
type XXExpr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXExpr (GhcPass _1) = NoExtCon

type ForallXExpr (c :: Type -> Constraint) x = (c (XVar x), c (XUnboundVar x), c (XConLikeOut x), c (XRecFld x), c (XOverLabel x), c (XIPVar x), c (XOverLitE x), c (XLitE x), c (XLam x), c (XLamCase x), c (XApp x), c (XAppTypeE x), c (XOpApp x), c (XNegApp x), c (XPar x), c (XSectionL x), c (XSectionR x), c (XExplicitTuple x), c (XExplicitSum x), c (XCase x), c (XIf x), c (XMultiIf x), c (XLet x), c (XDo x), c (XExplicitList x), c (XRecordCon x), c (XRecordUpd x), c (XExprWithTySig x), c (XArithSeq x), c (XSCC x), c (XCoreAnn x), c (XBracket x), c (XRnBracketOut x), c (XTcBracketOut x), c (XSpliceE x), c (XProc x), c (XStatic x), c (XTick x), c (XBinTick x), c (XTickPragma x), c (XWrap x), c (XXExpr x)) #

type family XUnambiguous x #

Instances

Instances details
type XUnambiguous GhcPs 
Instance details

Defined in GHC.Hs.Types

type XUnambiguous GhcRn 
Instance details

Defined in GHC.Hs.Types

type XUnambiguous GhcTc 
Instance details

Defined in GHC.Hs.Types

type family XAmbiguous x #

Instances

Instances details
type XAmbiguous GhcPs 
Instance details

Defined in GHC.Hs.Types

type XAmbiguous GhcRn 
Instance details

Defined in GHC.Hs.Types

type XAmbiguous GhcTc 
Instance details

Defined in GHC.Hs.Types

type family XXAmbiguousFieldOcc x #

Instances

Instances details
type XXAmbiguousFieldOcc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XPresent x #

Instances

Instances details
type XPresent (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XMissing x #

Instances

Instances details
type XMissing GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XMissing GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XMissing GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XXTupArg x #

Instances

Instances details
type XXTupArg (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type ForallXTupArg (c :: Type -> Constraint) x = (c (XPresent x), c (XMissing x), c (XXTupArg x)) #

type family XTypedSplice x #

Instances

Instances details
type XTypedSplice (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XUntypedSplice x #

Instances

Instances details
type XUntypedSplice (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XQuasiQuote x #

Instances

Instances details
type XQuasiQuote (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XSpliced x #

Instances

Instances details
type XSpliced (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XXSplice x #

Instances

Instances details
type XXSplice (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type ForallXSplice (c :: Type -> Constraint) x = (c (XTypedSplice x), c (XUntypedSplice x), c (XQuasiQuote x), c (XSpliced x), c (XXSplice x)) #

type family XExpBr x #

Instances

Instances details
type XExpBr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XPatBr x #

Instances

Instances details
type XPatBr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XDecBrL x #

Instances

Instances details
type XDecBrL (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XDecBrG x #

Instances

Instances details
type XDecBrG (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XTypBr x #

Instances

Instances details
type XTypBr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XVarBr x #

Instances

Instances details
type XVarBr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XTExpBr x #

Instances

Instances details
type XTExpBr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XXBracket x #

Instances

Instances details
type XXBracket (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type ForallXBracket (c :: Type -> Constraint) x = (c (XExpBr x), c (XPatBr x), c (XDecBrL x), c (XDecBrG x), c (XTypBr x), c (XVarBr x), c (XTExpBr x), c (XXBracket x)) #

type family XCmdTop x #

Instances

Instances details
type XCmdTop GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdTop GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdTop GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XXCmdTop x #

Instances

Instances details
type XXCmdTop (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type ForallXCmdTop (c :: Type -> Constraint) x = (c (XCmdTop x), c (XXCmdTop x)) #

type family XMG x b #

Instances

Instances details
type XMG GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XMG GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XMG GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type family XXMatchGroup x b #

Instances

Instances details
type XXMatchGroup (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type ForallXMatchGroup (c :: Type -> Constraint) x b = (c (XMG x b), c (XXMatchGroup x b)) #

type family XCMatch x b #

Instances

Instances details
type XCMatch (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XCMatch (GhcPass _1) b = NoExtField

type family XXMatch x b #

Instances

Instances details
type XXMatch (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XXMatch (GhcPass _1) b = NoExtCon

type ForallXMatch (c :: Type -> Constraint) x b = (c (XCMatch x b), c (XXMatch x b)) #

type family XCGRHSs x b #

Instances

Instances details
type XCGRHSs (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XCGRHSs (GhcPass _1) b = NoExtField

type family XXGRHSs x b #

Instances

Instances details
type XXGRHSs (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XXGRHSs (GhcPass _1) b = NoExtCon

type ForallXGRHSs (c :: Type -> Constraint) x b = (c (XCGRHSs x b), c (XXGRHSs x b)) #

type family XCGRHS x b #

Instances

Instances details
type XCGRHS (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XCGRHS (GhcPass _1) b = NoExtField

type family XXGRHS x b #

Instances

Instances details
type XXGRHS (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XXGRHS (GhcPass _1) b = NoExtCon

type ForallXGRHS (c :: Type -> Constraint) x b = (c (XCGRHS x b), c (XXGRHS x b)) #

type family XLastStmt x x' b #

Instances

Instances details
type XLastStmt (GhcPass _1) (GhcPass _2) b 
Instance details

Defined in GHC.Hs.Expr

type XLastStmt (GhcPass _1) (GhcPass _2) b = NoExtField

type family XBindStmt x x' b #

Instances

Instances details
type XBindStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XBindStmt (GhcPass _1) GhcTc b = Type
type XBindStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XBindStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type family XApplicativeStmt x x' b #

Instances

Instances details
type XApplicativeStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XApplicativeStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XApplicativeStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type family XBodyStmt x x' b #

Instances

Instances details
type XBodyStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XBodyStmt (GhcPass _1) GhcTc b = Type
type XBodyStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XBodyStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type family XLetStmt x x' b #

Instances

Instances details
type XLetStmt (GhcPass _1) (GhcPass _2) b 
Instance details

Defined in GHC.Hs.Expr

type XLetStmt (GhcPass _1) (GhcPass _2) b = NoExtField

type family XParStmt x x' b #

Instances

Instances details
type XParStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XParStmt (GhcPass _1) GhcTc b = Type
type XParStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XParStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type family XTransStmt x x' b #

Instances

Instances details
type XTransStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XTransStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XTransStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type family XRecStmt x x' b #

Instances

Instances details
type XRecStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XRecStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XRecStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type family XXStmtLR x x' b #

Instances

Instances details
type XXStmtLR (GhcPass _1) (GhcPass _2) b 
Instance details

Defined in GHC.Hs.Expr

type XXStmtLR (GhcPass _1) (GhcPass _2) b = NoExtCon

type ForallXStmtLR (c :: Type -> Constraint) x x' b = (c (XLastStmt x x' b), c (XBindStmt x x' b), c (XApplicativeStmt x x' b), c (XBodyStmt x x' b), c (XLetStmt x x' b), c (XParStmt x x' b), c (XTransStmt x x' b), c (XRecStmt x x' b), c (XXStmtLR x x' b)) #

type family XCmdArrApp x #

Instances

Instances details
type XCmdArrApp GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdArrApp GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdArrApp GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XCmdArrForm x #

Instances

Instances details
type XCmdArrForm (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XCmdApp x #

Instances

Instances details
type XCmdApp (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XCmdLam x #

Instances

Instances details
type XCmdLam (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XCmdPar x #

Instances

Instances details
type XCmdPar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XCmdCase x #

Instances

Instances details
type XCmdCase (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XCmdIf x #

Instances

Instances details
type XCmdIf (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XCmdLet x #

Instances

Instances details
type XCmdLet (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XCmdDo x #

Instances

Instances details
type XCmdDo GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdDo GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdDo GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XCmdWrap x #

Instances

Instances details
type XCmdWrap (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XXCmd x #

Instances

Instances details
type XXCmd (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXCmd (GhcPass _1) = NoExtCon

type ForallXCmd (c :: Type -> Constraint) x = (c (XCmdArrApp x), c (XCmdArrForm x), c (XCmdApp x), c (XCmdLam x), c (XCmdPar x), c (XCmdCase x), c (XCmdIf x), c (XCmdLet x), c (XCmdDo x), c (XCmdWrap x), c (XXCmd x)) #

type family XParStmtBlock x x' #

Instances

Instances details
type XParStmtBlock (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Expr

type family XXParStmtBlock x x' #

Instances

Instances details
type XXParStmtBlock (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Expr

type ForallXParStmtBlock (c :: Type -> Constraint) x x' = (c (XParStmtBlock x x'), c (XXParStmtBlock x x')) #

type family XApplicativeArgOne x #

Instances

Instances details
type XApplicativeArgOne (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XApplicativeArgMany x #

Instances

Instances details
type XApplicativeArgMany (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XXApplicativeArg x #

Instances

Instances details
type XXApplicativeArg (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XHsChar x #

Instances

Instances details
type XHsChar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XHsCharPrim x #

Instances

Instances details
type XHsCharPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XHsString x #

Instances

Instances details
type XHsString (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XHsStringPrim x #

Instances

Instances details
type XHsStringPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XHsInt x #

Instances

Instances details
type XHsInt (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XHsIntPrim x #

Instances

Instances details
type XHsIntPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XHsWordPrim x #

Instances

Instances details
type XHsWordPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XHsInt64Prim x #

Instances

Instances details
type XHsInt64Prim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XHsWord64Prim x #

Instances

Instances details
type XHsWord64Prim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XHsInteger x #

Instances

Instances details
type XHsInteger (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XHsRat x #

Instances

Instances details
type XHsRat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XHsFloatPrim x #

Instances

Instances details
type XHsFloatPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XHsDoublePrim x #

Instances

Instances details
type XHsDoublePrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XXLit x #

Instances

Instances details
type XXLit (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XXLit (GhcPass _1) = NoExtCon

type ForallXHsLit (c :: Type -> Constraint) x = (c (XHsChar x), c (XHsCharPrim x), c (XHsDoublePrim x), c (XHsFloatPrim x), c (XHsInt x), c (XHsInt64Prim x), c (XHsIntPrim x), c (XHsInteger x), c (XHsRat x), c (XHsString x), c (XHsStringPrim x), c (XHsWord64Prim x), c (XHsWordPrim x), c (XXLit x)) #

Helper to apply a constraint to all extension points. It has one entry per extension point type family.

type family XOverLit x #

Instances

Instances details
type XOverLit GhcPs 
Instance details

Defined in GHC.Hs.Lit

type XOverLit GhcRn 
Instance details

Defined in GHC.Hs.Lit

type XOverLit GhcTc 
Instance details

Defined in GHC.Hs.Lit

type family XXOverLit x #

Instances

Instances details
type XXOverLit (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type ForallXOverLit (c :: Type -> Constraint) x = (c (XOverLit x), c (XXOverLit x)) #

type family XWildPat x #

Instances

Instances details
type XWildPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XWildPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XWildPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type family XVarPat x #

Instances

Instances details
type XVarPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type family XLazyPat x #

Instances

Instances details
type XLazyPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type family XAsPat x #

Instances

Instances details
type XAsPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type family XParPat x #

Instances

Instances details
type XParPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type family XBangPat x #

Instances

Instances details
type XBangPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type family XListPat x #

Instances

Instances details
type XListPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XListPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XListPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type family XTuplePat x #

Instances

Instances details
type XTuplePat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XTuplePat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XTuplePat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type family XSumPat x #

Instances

Instances details
type XSumPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XSumPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XSumPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XSumPat GhcTc = [Type]

type family XConPat x #

type family XViewPat x #

Instances

Instances details
type XViewPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XViewPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XViewPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type family XSplicePat x #

Instances

Instances details
type XSplicePat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type family XLitPat x #

Instances

Instances details
type XLitPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type family XNPat x #

Instances

Instances details
type XNPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XNPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XNPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type family XNPlusKPat x #

Instances

Instances details
type XNPlusKPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XNPlusKPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XNPlusKPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type family XSigPat x #

Instances

Instances details
type XSigPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XSigPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XSigPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type family XCoPat x #

Instances

Instances details
type XCoPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type family XXPat x #

Instances

Instances details
type XXPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type XXPat (GhcPass _1) = NoExtCon

type ForallXPat (c :: Type -> Constraint) x = (c (XWildPat x), c (XVarPat x), c (XLazyPat x), c (XAsPat x), c (XParPat x), c (XBangPat x), c (XListPat x), c (XTuplePat x), c (XSumPat x), c (XViewPat x), c (XSplicePat x), c (XLitPat x), c (XNPat x), c (XNPlusKPat x), c (XSigPat x), c (XCoPat x), c (XXPat x)) #

type family XHsQTvs x #

Instances

Instances details
type XHsQTvs GhcPs 
Instance details

Defined in GHC.Hs.Types

type XHsQTvs GhcRn 
Instance details

Defined in GHC.Hs.Types

type XHsQTvs GhcRn = HsQTvsRn
type XHsQTvs GhcTc 
Instance details

Defined in GHC.Hs.Types

type XHsQTvs GhcTc = HsQTvsRn

type family XXLHsQTyVars x #

Instances

Instances details
type XXLHsQTyVars (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type ForallXLHsQTyVars (c :: Type -> Constraint) x = (c (XHsQTvs x), c (XXLHsQTyVars x)) #

type family XHsIB x b #

Instances

Instances details
type XHsIB GhcPs _1 
Instance details

Defined in GHC.Hs.Types

type XHsIB GhcRn _1 
Instance details

Defined in GHC.Hs.Types

type XHsIB GhcRn _1 = [Name]
type XHsIB GhcTc _1 
Instance details

Defined in GHC.Hs.Types

type XHsIB GhcTc _1 = [Name]

type family XXHsImplicitBndrs x b #

Instances

Instances details
type XXHsImplicitBndrs (GhcPass _1) _2 
Instance details

Defined in GHC.Hs.Types

type ForallXHsImplicitBndrs (c :: Type -> Constraint) x b = (c (XHsIB x b), c (XXHsImplicitBndrs x b)) #

type family XHsWC x b #

Instances

Instances details
type XHsWC GhcPs b 
Instance details

Defined in GHC.Hs.Types

type XHsWC GhcRn b 
Instance details

Defined in GHC.Hs.Types

type XHsWC GhcRn b = [Name]
type XHsWC GhcTc b 
Instance details

Defined in GHC.Hs.Types

type XHsWC GhcTc b = [Name]

type family XXHsWildCardBndrs x b #

Instances

Instances details
type XXHsWildCardBndrs (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Types

type ForallXHsWildCardBndrs (c :: Type -> Constraint) x b = (c (XHsWC x b), c (XXHsWildCardBndrs x b)) #

type family XForAllTy x #

Instances

Instances details
type XForAllTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XQualTy x #

Instances

Instances details
type XQualTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XTyVar x #

Instances

Instances details
type XTyVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XAppTy x #

Instances

Instances details
type XAppTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XAppKindTy x #

Instances

Instances details
type XAppKindTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XFunTy x #

Instances

Instances details
type XFunTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XListTy x #

Instances

Instances details
type XListTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XTupleTy x #

Instances

Instances details
type XTupleTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XSumTy x #

Instances

Instances details
type XSumTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XOpTy x #

Instances

Instances details
type XOpTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XParTy x #

Instances

Instances details
type XParTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XIParamTy x #

Instances

Instances details
type XIParamTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XStarTy x #

Instances

Instances details
type XStarTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XKindSig x #

Instances

Instances details
type XKindSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XSpliceTy x #

Instances

Instances details
type XSpliceTy GhcPs 
Instance details

Defined in GHC.Hs.Types

type XSpliceTy GhcRn 
Instance details

Defined in GHC.Hs.Types

type XSpliceTy GhcTc 
Instance details

Defined in GHC.Hs.Types

type family XDocTy x #

Instances

Instances details
type XDocTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XBangTy x #

Instances

Instances details
type XBangTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XRecTy x #

Instances

Instances details
type XRecTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XExplicitListTy x #

Instances

Instances details
type XExplicitListTy GhcPs 
Instance details

Defined in GHC.Hs.Types

type XExplicitListTy GhcRn 
Instance details

Defined in GHC.Hs.Types

type XExplicitListTy GhcTc 
Instance details

Defined in GHC.Hs.Types

type family XExplicitTupleTy x #

Instances

Instances details
type XExplicitTupleTy GhcPs 
Instance details

Defined in GHC.Hs.Types

type XExplicitTupleTy GhcRn 
Instance details

Defined in GHC.Hs.Types

type XExplicitTupleTy GhcTc 
Instance details

Defined in GHC.Hs.Types

type family XTyLit x #

Instances

Instances details
type XTyLit (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XWildCardTy x #

Instances

Instances details
type XWildCardTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XXType x #

Instances

Instances details
type XXType (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type ForallXType (c :: Type -> Constraint) x = (c (XForAllTy x), c (XQualTy x), c (XTyVar x), c (XAppTy x), c (XAppKindTy x), c (XFunTy x), c (XListTy x), c (XTupleTy x), c (XSumTy x), c (XOpTy x), c (XParTy x), c (XIParamTy x), c (XStarTy x), c (XKindSig x), c (XSpliceTy x), c (XDocTy x), c (XBangTy x), c (XRecTy x), c (XExplicitListTy x), c (XExplicitTupleTy x), c (XTyLit x), c (XWildCardTy x), c (XXType x)) #

Helper to apply a constraint to all extension points. It has one entry per extension point type family.

type family XUserTyVar x #

Instances

Instances details
type XUserTyVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XKindedTyVar x #

Instances

Instances details
type XKindedTyVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XXTyVarBndr x #

Instances

Instances details
type XXTyVarBndr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type ForallXTyVarBndr (c :: Type -> Constraint) x = (c (XUserTyVar x), c (XKindedTyVar x), c (XXTyVarBndr x)) #

type family XConDeclField x #

Instances

Instances details
type XConDeclField (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XXConDeclField x #

Instances

Instances details
type XXConDeclField (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type family XCFieldOcc x #

Instances

Instances details
type XCFieldOcc GhcPs 
Instance details

Defined in GHC.Hs.Types

type XCFieldOcc GhcRn 
Instance details

Defined in GHC.Hs.Types

type XCFieldOcc GhcTc 
Instance details

Defined in GHC.Hs.Types

type family XXFieldOcc x #

Instances

Instances details
type XXFieldOcc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Types

type ForallXFieldOcc (c :: Type -> Constraint) x = (c (XCFieldOcc x), c (XXFieldOcc x)) #

type family XCImportDecl x #

Instances

Instances details
type XCImportDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XXImportDecl x #

Instances

Instances details
type XXImportDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type ForallXImportDecl (c :: Type -> Constraint) x = (c (XCImportDecl x), c (XXImportDecl x)) #

type family XIEVar x #

Instances

Instances details
type XIEVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XIEThingAbs x #

Instances

Instances details
type XIEThingAbs (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XIEThingAll x #

Instances

Instances details
type XIEThingAll (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XIEThingWith x #

Instances

Instances details
type XIEThingWith (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XIEModuleContents x #

Instances

Instances details
type XIEModuleContents (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XIEGroup x #

Instances

Instances details
type XIEGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XIEDoc x #

Instances

Instances details
type XIEDoc (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XIEDocNamed x #

Instances

Instances details
type XIEDocNamed (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XXIE x #

Instances

Instances details
type XXIE (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XXIE (GhcPass _1) = NoExtCon

type ForallXIE (c :: Type -> Constraint) x = (c (XIEVar x), c (XIEThingAbs x), c (XIEThingAll x), c (XIEThingWith x), c (XIEModuleContents x), c (XIEGroup x), c (XIEDoc x), c (XIEDocNamed x), c (XXIE x)) #

class Convertable a b | a -> b where #

Conversion of annotations from one type index to another. This is required where the AST is converted from one pass to another, and the extension values need to be brought along if possible. So for example a SourceText is converted via id, but needs a type signature to keep the type checker happy.

Methods

convert :: a -> b #

Instances

Instances details
Convertable a a 
Instance details

Defined in GHC.Hs.Extension

Methods

convert :: a -> a #

type ConvertIdX a b = (XHsDoublePrim a ~ XHsDoublePrim b, XHsFloatPrim a ~ XHsFloatPrim b, XHsRat a ~ XHsRat b, XHsInteger a ~ XHsInteger b, XHsWord64Prim a ~ XHsWord64Prim b, XHsInt64Prim a ~ XHsInt64Prim b, XHsWordPrim a ~ XHsWordPrim b, XHsIntPrim a ~ XHsIntPrim b, XHsInt a ~ XHsInt b, XHsStringPrim a ~ XHsStringPrim b, XHsString a ~ XHsString b, XHsCharPrim a ~ XHsCharPrim b, XHsChar a ~ XHsChar b, XXLit a ~ XXLit b) #

A constraint capturing all the extension points that can be converted via instance Convertable a a

type OutputableX p = (Outputable (XIPBinds p), Outputable (XViaStrategy p), Outputable (XViaStrategy GhcRn)) #

Provide a summary constraint that gives all am Outputable constraint to extension points needing one

type OutputableBndrId (pass :: Pass) = (OutputableBndr (NameOrRdrName (IdP (GhcPass pass))), OutputableBndr (IdP (GhcPass pass)), OutputableBndr (NameOrRdrName (IdP (NoGhcTc (GhcPass pass)))), OutputableBndr (IdP (NoGhcTc (GhcPass pass))), NoGhcTc (GhcPass pass) ~ NoGhcTc (NoGhcTc (GhcPass pass)), OutputableX (GhcPass pass), OutputableX (NoGhcTc (GhcPass pass))) #

Constraint type to bundle up the requirement for OutputableBndr on both the p and the NameOrRdrName type for it

type family NameOrRdrName id where ... #

Follow the id, but never beyond Name. This is used in a HsMatchContext, for printing messages related to a Match

isExportedId :: Var -> Bool #

isExportedIdVar means "don't throw this away"

mustHaveLocalBinding :: Var -> Bool #

mustHaveLocalBinding returns True of Ids and TyVars that must have a binding in this module. The converse is not quite right: there are some global Ids that must have bindings, such as record selectors. But that doesn't matter, because it's only used for assertions

isLocalVar :: Var -> Bool #

isLocalVar returns True for type variables as well as local Ids These are the variables that we need to pay attention to when finding free variables, or doing dependency analysis.

isNonCoVarId :: Var -> Bool #

Is this a term variable (Id) that is not a coercion variable? Satisfies isId v ==> isCoVar v == not (isNonCoVarId v).

isCoVar :: Var -> Bool #

Is this a coercion variable? Satisfies isId v ==> isCoVar v == not (isNonCoVarId v).

isId :: Var -> Bool #

Is this a value-level (i.e., computationally relevant) Identifier? Satisfies isId = not . isTyVar.

isTyVar :: Var -> Bool #

Is this a type-level (i.e., computationally irrelevant, thus erasable) variable? Satisfies isTyVar = not . isId.

setIdNotExported :: Id -> Id #

We can only do this to LocalIds

setIdExported :: Id -> Id #

Exports the given local Id. Can also be called on global Ids, such as data constructors and class operations, which are born as global Ids and automatically exported

globaliseId :: Id -> Id #

If it's a local, make it global

mkExportedLocalVar :: IdDetails -> Name -> Type -> IdInfo -> Id #

Exported Vars will not be removed as dead code

updateTyVarKindM :: Monad m => (Kind -> m Kind) -> TyVar -> m TyVar #

mkTyVarBinders :: ArgFlag -> [TyVar] -> [TyVarBinder] #

Make many named binders Input vars should be type variables

mkTyCoVarBinders :: ArgFlag -> [TyCoVar] -> [TyCoVarBinder] #

Make many named binders

mkTyVarBinder :: ArgFlag -> TyVar -> TyVarBinder #

Make a named binder var should be a type variable

mkTyCoVarBinder :: ArgFlag -> TyCoVar -> TyCoVarBinder #

Make a named binder

binderArgFlag :: VarBndr tv argf -> argf #

binderVars :: [VarBndr tv argf] -> [tv] #

binderVar :: VarBndr tv argf -> tv #

argToForallVisFlag :: ArgFlag -> ForallVisFlag #

Convert an ArgFlag to its corresponding ForallVisFlag.

sameVis :: ArgFlag -> ArgFlag -> Bool #

Do these denote the same level of visibility? Required arguments are visible, others are not. So this function equates Specified and Inferred. Used for printing.

isInvisibleArgFlag :: ArgFlag -> Bool #

Does this ArgFlag classify an argument that is not written in Haskell?

isVisibleArgFlag :: ArgFlag -> Bool #

Does this ArgFlag classify an argument that is written in Haskell?

updateVarTypeM :: Monad m => (Type -> m Type) -> Id -> m Id #

updateVarType :: (Type -> Type) -> Id -> Id #

setVarType :: Id -> Type -> Id #

nonDetCmpVar :: Var -> Var -> Ordering #

Compare Vars by their Uniques. This is what Ord Var does, provided here to make it explicit at the call-site that it can introduce non-determinism. See Note [Unique Determinism]

type Id = Var #

Identifier

type CoVar = Id #

Coercion Variable

type NcId = Id #

 

type TyVar = Var #

Type or kind Variable

type TKVar = Var #

Type or Kind Variable

type TcTyVar = Var #

Type variable that might be a metavariable

type TypeVar = Var #

Type Variable

type KindVar = Var #

Kind Variable

type EvId = Id #

Evidence Identifier

type EvVar = EvId #

Evidence Variable

type DFunId = Id #

Dictionary Function Identifier

type DictId = EvId #

Dictionary Identifier

type IpId = EvId #

Implicit parameter Identifier

type EqVar = EvId #

Equality Variable

type JoinId = Id #

type TyCoVar = Id #

Type or Coercion Variable

type InVar = Var #

type InTyVar = TyVar #

type InCoVar = CoVar #

type InId = Id #

type OutVar = Var #

type OutId = Id #

data ForallVisFlag #

Is a forall invisible (e.g., forall a b. {...}, with a dot) or visible (e.g., forall a b -> {...}, with an arrow)?

Constructors

ForallVis

A visible forall (with an arrow)

ForallInvis

An invisible forall (with a dot)

Instances

Instances details
Eq ForallVisFlag 
Instance details

Defined in Var

Data ForallVisFlag 
Instance details

Defined in Var

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForallVisFlag -> c ForallVisFlag #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ForallVisFlag #

toConstr :: ForallVisFlag -> Constr #

dataTypeOf :: ForallVisFlag -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ForallVisFlag) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForallVisFlag) #

gmapT :: (forall b. Data b => b -> b) -> ForallVisFlag -> ForallVisFlag #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForallVisFlag -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForallVisFlag -> r #

gmapQ :: (forall d. Data d => d -> u) -> ForallVisFlag -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ForallVisFlag -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForallVisFlag -> m ForallVisFlag #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForallVisFlag -> m ForallVisFlag #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForallVisFlag -> m ForallVisFlag #

Ord ForallVisFlag 
Instance details

Defined in Var

Outputable ForallVisFlag 
Instance details

Defined in Var

data VarBndr var argf #

Constructors

Bndr var argf 

Instances

Instances details
(Eq tyvar, Eq argf) => Eq (VarBndr tyvar argf) # 
Instance details

Defined in Language.Haskell.Liquid.GHC.TypeRep

Methods

(==) :: VarBndr tyvar argf -> VarBndr tyvar argf -> Bool #

(/=) :: VarBndr tyvar argf -> VarBndr tyvar argf -> Bool #

(Data var, Data argf) => Data (VarBndr var argf) 
Instance details

Defined in Var

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> VarBndr var argf -> c (VarBndr var argf) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (VarBndr var argf) #

toConstr :: VarBndr var argf -> Constr #

dataTypeOf :: VarBndr var argf -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (VarBndr var argf)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (VarBndr var argf)) #

gmapT :: (forall b. Data b => b -> b) -> VarBndr var argf -> VarBndr var argf #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> VarBndr var argf -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> VarBndr var argf -> r #

gmapQ :: (forall d. Data d => d -> u) -> VarBndr var argf -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> VarBndr var argf -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> VarBndr var argf -> m (VarBndr var argf) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> VarBndr var argf -> m (VarBndr var argf) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> VarBndr var argf -> m (VarBndr var argf) #

NamedThing tv => NamedThing (VarBndr tv flag) 
Instance details

Defined in Var

Methods

getOccName :: VarBndr tv flag -> OccName #

getName :: VarBndr tv flag -> Name #

(Binary tv, Binary vis) => Binary (VarBndr tv vis) 
Instance details

Defined in Var

Methods

put_ :: BinHandle -> VarBndr tv vis -> IO () #

put :: BinHandle -> VarBndr tv vis -> IO (Bin (VarBndr tv vis)) #

get :: BinHandle -> IO (VarBndr tv vis) #

Outputable tv => Outputable (VarBndr tv TyConBndrVis) 
Instance details

Defined in TyCon

Outputable tv => Outputable (VarBndr tv ArgFlag) 
Instance details

Defined in Var

type TyCoVarBinder = VarBndr TyCoVar ArgFlag #

Variable Binder

A TyCoVarBinder is the binder of a ForAllTy It's convenient to define this synonym here rather its natural home in TyCoRep, because it's used in DataCon.hs-boot

A TyVarBinder is a binder with only TyVar

data Token #

Instances

Instances details
Show Token 
Instance details

Defined in Lexer

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

Outputable Token 
Instance details

Defined in Lexer

Methods

ppr :: Token -> SDoc #

pprPrec :: Rational -> Token -> SDoc #

unicodeAnn :: AnnKeywordId -> AnnKeywordId #

Convert a normal annotation into its unicode equivalent one

getAndRemoveAnnotationComments :: ApiAnns -> SrcSpan -> ([Located AnnotationComment], ApiAnns) #

Retrieve the comments allocated to the current SrcSpan, and remove them from the annotations

getAnnotationComments :: ApiAnns -> SrcSpan -> [Located AnnotationComment] #

Retrieve the comments allocated to the current SrcSpan

Note: A given SrcSpan may appear in multiple AST elements, beware of duplicates

getAndRemoveAnnotation :: ApiAnns -> SrcSpan -> AnnKeywordId -> ([SrcSpan], ApiAnns) #

Retrieve a list of annotation SrcSpans based on the SrcSpan of the annotated AST element, and the known type of the annotation. The list is removed from the annotations.

getAnnotation :: ApiAnns -> SrcSpan -> AnnKeywordId -> [SrcSpan] #

Retrieve a list of annotation SrcSpans based on the SrcSpan of the annotated AST element, and the known type of the annotation.

data AnnKeywordId #

API Annotations exist so that tools can perform source to source conversions of Haskell code. They are used to keep track of the various syntactic keywords that are not captured in the existing AST.

The annotations, together with original source comments are made available in the pm_annotations field of ParsedModule. Comments are only retained if Opt_KeepRawTokenStream is set in DynFlags before parsing.

The wiki page describing this feature is https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations

Note: in general the names of these are taken from the corresponding token, unless otherwise noted See note [Api annotations] above for details of the usage

Constructors

AnnAnyclass 
AnnAs 
AnnAt 
AnnBang

!

AnnBackquote

'`'

AnnBy 
AnnCase

case or lambda case

AnnClass 
AnnClose

'#)' or '#-}' etc

AnnCloseB

'|)'

AnnCloseBU

'|)', unicode variant

AnnCloseC

'}'

AnnCloseQ

'|]'

AnnCloseQU

'|]', unicode variant

AnnCloseP

')'

AnnCloseS

']'

AnnColon 
AnnComma

as a list separator

AnnCommaTuple

in a RdrName for a tuple

AnnDarrow

'=>'

AnnDarrowU

'=>', unicode variant

AnnData 
AnnDcolon

'::'

AnnDcolonU

'::', unicode variant

AnnDefault 
AnnDeriving 
AnnDo 
AnnDot

.

AnnDotdot

'..'

AnnElse 
AnnEqual 
AnnExport 
AnnFamily 
AnnForall 
AnnForallU

Unicode variant

AnnForeign 
AnnFunId

for function name in matches where there are multiple equations for the function.

AnnGroup 
AnnHeader

for CType

AnnHiding 
AnnIf 
AnnImport 
AnnIn 
AnnInfix

'infix' or 'infixl' or 'infixr'

AnnInstance 
AnnLam 
AnnLarrow

'<-'

AnnLarrowU

'<-', unicode variant

AnnLet 
AnnMdo 
AnnMinus

-

AnnModule 
AnnNewtype 
AnnName

where a name loses its location in the AST, this carries it

AnnOf 
AnnOpen

'(#' or '{-# LANGUAGE' etc

AnnOpenB

'(|'

AnnOpenBU

'(|', unicode variant

AnnOpenC

'{'

AnnOpenE

'[e|' or '[e||'

AnnOpenEQ

'[|'

AnnOpenEQU

'[|', unicode variant

AnnOpenP

'('

AnnOpenPE

'$('

AnnOpenPTE

'$$('

AnnOpenS

'['

AnnPackageName 
AnnPattern 
AnnProc 
AnnQualified 
AnnRarrow

'->'

AnnRarrowU

'->', unicode variant

AnnRec 
AnnRole 
AnnSafe 
AnnSemi

';'

AnnSimpleQuote

'''

AnnSignature 
AnnStatic

static

AnnStock 
AnnThen 
AnnThIdSplice

$

AnnThIdTySplice

$$

AnnThTyQuote

double '''

AnnTilde

'~'

AnnType 
AnnUnit

() for types

AnnUsing 
AnnVal

e.g. INTEGER

AnnValStr

String value, will need quotes when output

AnnVbar

'|'

AnnVia

via

AnnWhere 
Annlarrowtail

-<

AnnlarrowtailU

-<, unicode variant

Annrarrowtail

'->'

AnnrarrowtailU

'->', unicode variant

AnnLarrowtail

-<<

AnnLarrowtailU

-<<, unicode variant

AnnRarrowtail

>>-

AnnRarrowtailU

>>-, unicode variant

AnnEofPos 

Instances

Instances details
Eq AnnKeywordId 
Instance details

Defined in ApiAnnotation

Data AnnKeywordId 
Instance details

Defined in ApiAnnotation

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnKeywordId -> c AnnKeywordId #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnKeywordId #

toConstr :: AnnKeywordId -> Constr #

dataTypeOf :: AnnKeywordId -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnKeywordId) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnKeywordId) #

gmapT :: (forall b. Data b => b -> b) -> AnnKeywordId -> AnnKeywordId #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnKeywordId -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnKeywordId -> r #

gmapQ :: (forall d. Data d => d -> u) -> AnnKeywordId -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnKeywordId -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnKeywordId -> m AnnKeywordId #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnKeywordId -> m AnnKeywordId #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnKeywordId -> m AnnKeywordId #

Ord AnnKeywordId 
Instance details

Defined in ApiAnnotation

Show AnnKeywordId 
Instance details

Defined in ApiAnnotation

Outputable AnnKeywordId 
Instance details

Defined in ApiAnnotation

data AnnotationComment #

Constructors

AnnDocCommentNext String

something beginning '-- |'

AnnDocCommentPrev String

something beginning '-- ^'

AnnDocCommentNamed String

something beginning '-- $'

AnnDocSection Int String

a section heading

AnnDocOptions String

doc options (prune, ignore-exports, etc)

AnnLineComment String

comment starting by "--"

AnnBlockComment String

comment in {- -}

Instances

Instances details
Eq AnnotationComment 
Instance details

Defined in ApiAnnotation

Data AnnotationComment 
Instance details

Defined in ApiAnnotation

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnotationComment -> c AnnotationComment #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnotationComment #

toConstr :: AnnotationComment -> Constr #

dataTypeOf :: AnnotationComment -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnotationComment) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnotationComment) #

gmapT :: (forall b. Data b => b -> b) -> AnnotationComment -> AnnotationComment #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnotationComment -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnotationComment -> r #

gmapQ :: (forall d. Data d => d -> u) -> AnnotationComment -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnotationComment -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnotationComment -> m AnnotationComment #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnotationComment -> m AnnotationComment #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnotationComment -> m AnnotationComment #

Ord AnnotationComment 
Instance details

Defined in ApiAnnotation

Show AnnotationComment 
Instance details

Defined in ApiAnnotation

Outputable AnnotationComment 
Instance details

Defined in ApiAnnotation

starInfo :: Bool -> RdrName -> SDoc #

Display info about the treatment of * under NoStarIsType.

With StarIsType, three properties of * hold:

(a) it is not an infix operator (b) it is always in scope (c) it is a synonym for Data.Kind.Type

However, the user might not know that he's working on a module with NoStarIsType and write code that still assumes (a), (b), and (c), which actually do not hold in that module.

Violation of (a) shows up in the parser. For instance, in the following examples, we have * not applied to enough arguments:

data A :: * data F :: * -> *

Violation of (b) or (c) show up in the renamer and the typechecker respectively. For instance:

type K = Either * Bool

This will parse differently depending on whether StarIsType is enabled, but it will parse nonetheless. With NoStarIsType it is parsed as a type operator, thus we have ((*) Either Bool). Now there are two cases to consider:

  1. There is no definition of (*) in scope. In this case the renamer will fail to look it up. This is a violation of assumption (b).
  2. There is a definition of the (*) type operator in scope (for example coming from GHC.TypeNats). In this case the user will get a kind mismatch error. This is a violation of assumption (c).

The user might unknowingly be working on a module with NoStarIsType or use * as Type out of habit. So it is important to give a hint whenever an assumption about * is violated. Unfortunately, it is somewhat difficult to deal with (c), so we limit ourselves to (a) and (b).

starInfo generates an appropriate hint to the user depending on the extensions enabled in the module and the name that triggered the error. That is, if we have NoStarIsType and the error is related to * or its Unicode variant, the resulting SDoc will contain a helpful suggestion. Otherwise it is empty.

pprNameProvenance :: GlobalRdrElt -> SDoc #

Print out one place where the name was define/imported (With -dppr-debug, print them all)

qualSpecOK :: ModuleName -> ImportSpec -> Bool #

Is in scope qualified with the given module?

unQualSpecOK :: ImportSpec -> Bool #

Is in scope unqualified?

transformGREs :: (GlobalRdrElt -> GlobalRdrElt) -> [OccName] -> GlobalRdrEnv -> GlobalRdrEnv #

Apply a transformation function to the GREs for these OccNames

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 RnNames.exports_from_avail

pickGREs :: RdrName -> [GlobalRdrElt] -> [GlobalRdrElt] #

Takes a list of GREs which have the right OccName x Pick those GREs that are in scope * Qualified, as 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]

unQualOK :: GlobalRdrElt -> Bool #

Test if an unqualified version of this thing would be in scope

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 [Parents for record fields].

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 [Parents for record fields] for why this happens.

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.

gresToAvailInfo :: [GlobalRdrElt] -> [AvailInfo] #

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.

gresFromAvails :: Maybe ImportSpec -> [AvailInfo] -> [GlobalRdrElt] #

make a GlobalRdrEnv where all the elements point to the same Provenance (useful for "hiding" imports, or imports with no details).

getRdrName :: NamedThing thing => thing -> RdrName #

mkQual :: NameSpace -> (FastString, FastString) -> RdrName #

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

data RdrName #

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`
( ~ )

Constructors

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

Instances

Instances details
Eq RdrName 
Instance details

Defined in RdrName

Methods

(==) :: RdrName -> RdrName -> Bool #

(/=) :: RdrName -> RdrName -> Bool #

Data RdrName 
Instance details

Defined in RdrName

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RdrName -> c RdrName #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RdrName #

toConstr :: RdrName -> Constr #

dataTypeOf :: RdrName -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RdrName) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RdrName) #

gmapT :: (forall b. Data b => b -> b) -> RdrName -> RdrName #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RdrName -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RdrName -> r #

gmapQ :: (forall d. Data d => d -> u) -> RdrName -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RdrName -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RdrName -> m RdrName #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RdrName -> m RdrName #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RdrName -> m RdrName #

Ord RdrName 
Instance details

Defined in RdrName

DisambInfixOp RdrName 
Instance details

Defined in RdrHsSyn

HasOccName RdrName 
Instance details

Defined in RdrName

Methods

occName :: RdrName -> OccName #

Outputable RdrName 
Instance details

Defined in RdrName

Methods

ppr :: RdrName -> SDoc #

pprPrec :: Rational -> RdrName -> SDoc #

OutputableBndr RdrName 
Instance details

Defined in RdrName

data LocalRdrEnv #

Local Reader Environment

This environment is used to store local bindings (let, where, lambda, case). It is keyed by OccName, because we never use it for qualified names We keep the current mapping, *and* the set of all Names in scope Reason: see Note [Splicing Exact names] in RnEnv

Instances

Instances details
Outputable LocalRdrEnv 
Instance details

Defined in RdrName

type GlobalRdrEnv = OccEnv [GlobalRdrElt] #

Global Reader Environment

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 RnNames 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 (gre_name gre), but not always in the case of record seectors; see greOccName

data GlobalRdrElt #

Global Reader Element

An element of the GlobalRdrEnv

Constructors

GRE 

Fields

Instances

Instances details
Eq GlobalRdrElt 
Instance details

Defined in RdrName

Data GlobalRdrElt 
Instance details

Defined in RdrName

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GlobalRdrElt -> c GlobalRdrElt #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GlobalRdrElt #

toConstr :: GlobalRdrElt -> Constr #

dataTypeOf :: GlobalRdrElt -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GlobalRdrElt) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GlobalRdrElt) #

gmapT :: (forall b. Data b => b -> b) -> GlobalRdrElt -> GlobalRdrElt #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GlobalRdrElt -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GlobalRdrElt -> r #

gmapQ :: (forall d. Data d => d -> u) -> GlobalRdrElt -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GlobalRdrElt -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GlobalRdrElt -> m GlobalRdrElt #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GlobalRdrElt -> m GlobalRdrElt #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GlobalRdrElt -> m GlobalRdrElt #

Outputable GlobalRdrElt 
Instance details

Defined in RdrName

data Parent #

The children of a Name are the things that are abbreviated by the ".." notation in export lists. See Note [Parents]

Constructors

NoParent 
ParentIs 

Fields

FldParent

See Note [Parents for record fields]

Instances

Instances details
Eq Parent 
Instance details

Defined in RdrName

Methods

(==) :: Parent -> Parent -> Bool #

(/=) :: Parent -> Parent -> Bool #

Data Parent 
Instance details

Defined in RdrName

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Parent -> c Parent #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Parent #

toConstr :: Parent -> Constr #

dataTypeOf :: Parent -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Parent) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Parent) #

gmapT :: (forall b. Data b => b -> b) -> Parent -> Parent #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Parent -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Parent -> r #

gmapQ :: (forall d. Data d => d -> u) -> Parent -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Parent -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Parent -> m Parent #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Parent -> m Parent #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Parent -> m Parent #

Outputable Parent 
Instance details

Defined in RdrName

Methods

ppr :: Parent -> SDoc #

pprPrec :: Rational -> Parent -> SDoc #

data 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.

Constructors

ImpSpec 

Instances

Instances details
Eq ImportSpec 
Instance details

Defined in RdrName

Data ImportSpec 
Instance details

Defined in RdrName

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImportSpec -> c ImportSpec #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImportSpec #

toConstr :: ImportSpec -> Constr #

dataTypeOf :: ImportSpec -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImportSpec) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImportSpec) #

gmapT :: (forall b. Data b => b -> b) -> ImportSpec -> ImportSpec #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImportSpec -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImportSpec -> r #

gmapQ :: (forall d. Data d => d -> u) -> ImportSpec -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ImportSpec -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportSpec -> m ImportSpec #

Ord ImportSpec 
Instance details

Defined in RdrName

Outputable ImportSpec 
Instance details

Defined in RdrName

data ImpDeclSpec #

Import Declaration Specification

Describes a particular import declaration and is shared among all the Provenances for that decl

Constructors

ImpDeclSpec 

Fields

  • is_mod :: ModuleName

    Module imported, e.g. import Muggle Note the Muggle may well not be the defining module for this thing!

  • 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

Instances

Instances details
Eq ImpDeclSpec 
Instance details

Defined in RdrName

Data ImpDeclSpec 
Instance details

Defined in RdrName

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImpDeclSpec -> c ImpDeclSpec #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImpDeclSpec #

toConstr :: ImpDeclSpec -> Constr #

dataTypeOf :: ImpDeclSpec -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImpDeclSpec) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImpDeclSpec) #

gmapT :: (forall b. Data b => b -> b) -> ImpDeclSpec -> ImpDeclSpec #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImpDeclSpec -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImpDeclSpec -> r #

gmapQ :: (forall d. Data d => d -> u) -> ImpDeclSpec -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ImpDeclSpec -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpDeclSpec -> m ImpDeclSpec #

Ord ImpDeclSpec 
Instance details

Defined in RdrName

data ImpItemSpec #

Import Item Specification

Describes import info a particular Name

Constructors

ImpAll

The import had no import list, or had a hiding list

ImpSome

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.

Instances

Instances details
Eq ImpItemSpec 
Instance details

Defined in RdrName

Data ImpItemSpec 
Instance details

Defined in RdrName

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImpItemSpec -> c ImpItemSpec #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ImpItemSpec #

toConstr :: ImpItemSpec -> Constr #

dataTypeOf :: ImpItemSpec -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ImpItemSpec) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ImpItemSpec) #

gmapT :: (forall b. Data b => b -> b) -> ImpItemSpec -> ImpItemSpec #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImpItemSpec -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImpItemSpec -> r #

gmapQ :: (forall d. Data d => d -> u) -> ImpItemSpec -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ImpItemSpec -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImpItemSpec -> m ImpItemSpec #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpItemSpec -> m ImpItemSpec #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImpItemSpec -> m ImpItemSpec #

Ord ImpItemSpec 
Instance details

Defined in RdrName

nubAvails :: [AvailInfo] -> [AvailInfo] #

Combines AvailInfos from the same family avails may have several items with the same availName E.g import Ix( Ix(..), index ) will give Ix(Ix,index,range) and Ix(index) We want to combine these; addAvail does that

filterAvail :: (Name -> Bool) -> AvailInfo -> [AvailInfo] -> [AvailInfo] #

filters an AvailInfo by the given predicate

filterAvails :: (Name -> Bool) -> [AvailInfo] -> [AvailInfo] #

filters AvailInfos by the given predicate

trimAvail :: AvailInfo -> Name -> AvailInfo #

trims an AvailInfo to keep only a single name

availNamesWithOccs :: AvailInfo -> [(Name, OccName)] #

Names made available by the availability information, paired with the OccName used to refer to each one.

When DuplicateRecordFields is in use, the Name may be the mangled name of a record selector (e.g. $sel:foo:MkT) while the OccName will be the label of the field (e.g. foo).

See Note [Representing fields in AvailInfo].

availFlds :: AvailInfo -> [FieldLabel] #

Fields made available by the availability information

availNonFldNames :: AvailInfo -> [Name] #

Names for non-fields made available by the availability information

availNamesWithSelectors :: AvailInfo -> [Name] #

All names made available by the availability information (including overloaded selectors)

availNames :: AvailInfo -> [Name] #

All names made available by the availability information (excluding overloaded selectors)

availName :: AvailInfo -> Name #

Just the main name made available, i.e. not the available pieces of type or class brought into scope by the GenAvailInfo

stableAvailCmp :: AvailInfo -> AvailInfo -> Ordering #

Compare lexicographically

data AvailInfo #

Records what things are "available", i.e. in scope

Constructors

Avail Name

An ordinary identifier in scope

AvailTC

A type or class in scope

The AvailTC Invariant: If the type or class is itself to be in scope, it must be first in this list. Thus, typically:

AvailTC Eq [Eq, ==, \/=] []

Fields

  • Name

    The name of the type or class

  • [Name]

    The available pieces of type or class, excluding field selectors.

  • [FieldLabel]

    The record fields of the type (see Note [Representing fields in AvailInfo]).

Instances

Instances details
Eq AvailInfo

Used when deciding if the interface has changed

Instance details

Defined in Avail

Data AvailInfo 
Instance details

Defined in Avail

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AvailInfo -> c AvailInfo #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AvailInfo #

toConstr :: AvailInfo -> Constr #

dataTypeOf :: AvailInfo -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AvailInfo) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AvailInfo) #

gmapT :: (forall b. Data b => b -> b) -> AvailInfo -> AvailInfo #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AvailInfo -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AvailInfo -> r #

gmapQ :: (forall d. Data d => d -> u) -> AvailInfo -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AvailInfo -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo #

Binary AvailInfo 
Instance details

Defined in Avail

Outputable AvailInfo 
Instance details

Defined in Avail

type Avails = [AvailInfo] #

A collection of AvailInfo - several things that are "available"

type FieldLabelString = FastString #

Field labels are just represented as strings; they are not necessarily unique (even within a module)

data FieldLbl a #

Fields in an algebraic record type

Constructors

FieldLabel 

Fields

Instances

Instances details
Functor FieldLbl 
Instance details

Defined in FieldLabel

Methods

fmap :: (a -> b) -> FieldLbl a -> FieldLbl b #

(<$) :: a -> FieldLbl b -> FieldLbl a #

Foldable FieldLbl 
Instance details

Defined in FieldLabel

Methods

fold :: Monoid m => FieldLbl m -> m #

foldMap :: Monoid m => (a -> m) -> FieldLbl a -> m #

foldMap' :: Monoid m => (a -> m) -> FieldLbl a -> m #

foldr :: (a -> b -> b) -> b -> FieldLbl a -> b #

foldr' :: (a -> b -> b) -> b -> FieldLbl a -> b #

foldl :: (b -> a -> b) -> b -> FieldLbl a -> b #

foldl' :: (b -> a -> b) -> b -> FieldLbl a -> b #

foldr1 :: (a -> a -> a) -> FieldLbl a -> a #

foldl1 :: (a -> a -> a) -> FieldLbl a -> a #

toList :: FieldLbl a -> [a] #

null :: FieldLbl a -> Bool #

length :: FieldLbl a -> Int #

elem :: Eq a => a -> FieldLbl a -> Bool #

maximum :: Ord a => FieldLbl a -> a #

minimum :: Ord a => FieldLbl a -> a #

sum :: Num a => FieldLbl a -> a #

product :: Num a => FieldLbl a -> a #

Traversable FieldLbl 
Instance details

Defined in FieldLabel

Methods

traverse :: Applicative f => (a -> f b) -> FieldLbl a -> f (FieldLbl b) #

sequenceA :: Applicative f => FieldLbl (f a) -> f (FieldLbl a) #

mapM :: Monad m => (a -> m b) -> FieldLbl a -> m (FieldLbl b) #

sequence :: Monad m => FieldLbl (m a) -> m (FieldLbl a) #

Eq a => Eq (FieldLbl a) 
Instance details

Defined in FieldLabel

Methods

(==) :: FieldLbl a -> FieldLbl a -> Bool #

(/=) :: FieldLbl a -> FieldLbl a -> Bool #

Data a => Data (FieldLbl a) 
Instance details

Defined in FieldLabel

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldLbl a -> c (FieldLbl a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FieldLbl a) #

toConstr :: FieldLbl a -> Constr #

dataTypeOf :: FieldLbl a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FieldLbl a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FieldLbl a)) #

gmapT :: (forall b. Data b => b -> b) -> FieldLbl a -> FieldLbl a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldLbl a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldLbl a -> r #

gmapQ :: (forall d. Data d => d -> u) -> FieldLbl a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldLbl a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FieldLbl a -> m (FieldLbl a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldLbl a -> m (FieldLbl a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldLbl a -> m (FieldLbl a) #

Binary a => Binary (FieldLbl a) 
Instance details

Defined in FieldLabel

Methods

put_ :: BinHandle -> FieldLbl a -> IO () #

put :: BinHandle -> FieldLbl a -> IO (Bin (FieldLbl a)) #

get :: BinHandle -> IO (FieldLbl a) #

Outputable a => Outputable (FieldLbl a) 
Instance details

Defined in FieldLabel

Methods

ppr :: FieldLbl a -> SDoc #

pprPrec :: Rational -> FieldLbl a -> SDoc #

concatDocs :: [HsDocString] -> Maybe HsDocString #

Concat docstrings with two newlines in between.

Empty docstrings are skipped.

If all inputs are empty, Nothing is returned.

appendDocs :: HsDocString -> HsDocString -> HsDocString #

Join two docstrings.

Non-empty docstrings are joined with two newlines in between, resulting in separate paragraphs.

hsDocStringToByteString :: HsDocString -> ByteString #

Return the contents of a HsDocString as a UTF8-encoded ByteString.

data HsDocString #

Haskell Documentation String

Internally this is a UTF8-Encoded ByteString.

Instances

Instances details
Eq HsDocString 
Instance details

Defined in GHC.Hs.Doc

Data HsDocString 
Instance details

Defined in GHC.Hs.Doc

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsDocString -> c HsDocString #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsDocString #

toConstr :: HsDocString -> Constr #

dataTypeOf :: HsDocString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsDocString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsDocString) #

gmapT :: (forall b. Data b => b -> b) -> HsDocString -> HsDocString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsDocString -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsDocString -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsDocString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsDocString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsDocString -> m HsDocString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsDocString -> m HsDocString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsDocString -> m HsDocString #

Show HsDocString 
Instance details

Defined in GHC.Hs.Doc

Binary HsDocString 
Instance details

Defined in GHC.Hs.Doc

Outputable HsDocString 
Instance details

Defined in GHC.Hs.Doc

type LHsDocString = Located HsDocString #

Located Haskell Documentation String

newtype DeclDocMap #

Docs for declarations: functions, data types, instances, methods etc.

Constructors

DeclDocMap (Map Name HsDocString) 

Instances

Instances details
Binary DeclDocMap 
Instance details

Defined in GHC.Hs.Doc

Outputable DeclDocMap 
Instance details

Defined in GHC.Hs.Doc

newtype ArgDocMap #

Docs for arguments. E.g. function arguments, method arguments.

Constructors

ArgDocMap (Map Name (Map Int HsDocString)) 

Instances

Instances details
Binary ArgDocMap 
Instance details

Defined in GHC.Hs.Doc

Outputable ArgDocMap 
Instance details

Defined in GHC.Hs.Doc

findUses :: DefUses -> Uses -> Uses #

Given some DefUses and some Uses, find all the uses, transitively. The result is a superset of the input Uses; and includes things defined in the input DefUses (but only if they are used)

duUses :: DefUses -> Uses #

Collect all Uses, regardless of whether the group is itself used, but remove Defs on the way

allUses :: DefUses -> Uses #

Just like duUses, but Defs are not eliminated from the Uses returned

mkDUs :: [(Defs, Uses)] -> DefUses #

nameSetElemsStable :: NameSet -> [Name] #

Get the elements of a NameSet with some stable ordering. This only works for Names that originate in the source code or have been tidied. See Note [Deterministic UniqFM] to learn about nondeterminism

intersectsNameSet :: NameSet -> NameSet -> Bool #

True if there is a non-empty intersection. s1 intersectsNameSet s2 doesn't compute s2 if s1 is empty

type Defs = NameSet #

A set of names that are defined somewhere

type Uses = NameSet #

A set of names that are used somewhere

type DefUse = (Maybe Defs, Uses) #

(Just ds, us) => The use of any member of the ds implies that all the us are used too. Also, us may mention ds.

Nothing => Nothing is defined in this group, but nevertheless all the uses are essential. Used for instance declarations, for example

type DefUses = OrdList DefUse #

A number of DefUses in dependency order: earlier Defs scope over later Uses In a single (def, use) pair, the defs also scope over the uses

mkBoxedTupleTy :: [Type] -> Type #

Build the type of a small tuple that holds the specified type of thing Flattens 1-tuples. See Note [One-tuples].

unboxedTupleKind :: [Type] -> Kind #

Specialization of unboxedTupleSumKind for tuples

mkPromotedListTy #

Arguments

:: Kind

of the elements of the list

-> [Type]

elements

-> Type 

Make a *promoted* list.

nameStableString :: Name -> String #

Get a string representation of a Name that's unique and stable across recompilations. Used for deterministic generation of binds for derived instances. eg. "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal$String"

pprNameUnqualified :: Name -> SDoc #

Print the string of Name unqualifiedly directly.

stableNameCmp :: Name -> Name -> Ordering #

Compare Names lexicographically This only works for Names that originate in the source code or have been tidied.

localiseName :: Name -> Name #

Make the Name into an internal name, regardless of what it was to begin with

mkFCallName :: Unique -> String -> Name #

Make a name for a foreign call

mkSystemName :: Unique -> OccName -> Name #

Create a name brought into being by the compiler

mkWiredInName :: Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name #

Create a name which is actually defined by the compiler itself

mkExternalName :: Unique -> Module -> OccName -> SrcSpan -> Name #

Create a name which definitely originates in the given module

mkInternalName :: Unique -> OccName -> SrcSpan -> Name #

Create a name which is (for now at least) local to the current module and hence does not need a Module to disambiguate it from other Names

nameIsFromExternalPackage :: UnitId -> Name -> Bool #

Returns True if the Name comes from some other package: neither this package nor the interactive package.

nameIsLocalOrFrom :: Module -> Name -> Bool #

Returns True if the name is (a) Internal (b) External but from the specified module (c) External but from the interactive package

The key idea is that False means: the entity is defined in some other module you can find the details (type, fixity, instances) in some interface file those details will be stored in the EPT or HPT

True means: the entity is defined in this module or earlier in the GHCi session you can find details (type, fixity, instances) in the TcGblEnv or TcLclEnv

The isInteractiveModule part is because successive interactions of a GHCi session each give rise to a fresh module (Ghci1, Ghci2, etc), but they all come from the magic interactive package; and all the details are kept in the TcLclEnv, TcGblEnv, NOT in the HPT or EPT. See Note [The interactive package] in HscTypes

data BuiltInSyntax #

BuiltInSyntax is for things like (:), [] and tuples, which have special syntactic forms. They aren't in scope as such.

Constructors

BuiltInSyntax 
UserSyntax 

class NamedThing a where #

A class allowing convenient access to the Name of various datatypes

Minimal complete definition

getName

Methods

getOccName :: a -> OccName #

getName :: a -> Name #

Instances

Instances details
NamedThing HoleFitCandidate 
Instance details

Defined in TcHoleFitTypes

NamedThing ClsInst 
Instance details

Defined in InstEnv

NamedThing FamInst 
Instance details

Defined in FamInstEnv

NamedThing IfaceDecl 
Instance details

Defined in IfaceSyn

NamedThing IfaceClassOp 
Instance details

Defined in IfaceSyn

NamedThing IfaceConDecl 
Instance details

Defined in IfaceSyn

NamedThing Class 
Instance details

Defined in Class

NamedThing ConLike 
Instance details

Defined in ConLike

NamedThing DataCon 
Instance details

Defined in DataCon

NamedThing PatSyn 
Instance details

Defined in PatSyn

NamedThing TyThing 
Instance details

Defined in TyCoRep

NamedThing Var 
Instance details

Defined in Var

Methods

getOccName :: Var -> OccName #

getName :: Var -> Name #

NamedThing TyCon 
Instance details

Defined in TyCon

NamedThing Name 
Instance details

Defined in Name

NamedThing (HsTyVarBndr GhcRn) 
Instance details

Defined in GHC.Hs.Types

NamedThing (CoAxiom br) 
Instance details

Defined in CoAxiom

Methods

getOccName :: CoAxiom br -> OccName #

getName :: CoAxiom br -> Name #

NamedThing e => NamedThing (Located e) 
Instance details

Defined in Name

NamedThing tv => NamedThing (VarBndr tv flag) 
Instance details

Defined in Var

Methods

getOccName :: VarBndr tv flag -> OccName #

getName :: VarBndr tv flag -> Name #

mkFunTy :: AnonArgFlag -> Type -> Type -> Type infixr 3 #

mkForAllTy :: TyCoVar -> ArgFlag -> Type -> Type #

Like mkTyCoForAllTy, but does not check the occurrence of the binder See Note [Unused coercion variable in ForAllTy]

data Type #

Constructors

TyVarTy Var

Vanilla type or kind variable (*never* a coercion variable)

AppTy Type Type

Type application to something other than a TyCon. Parameters:

1) Function: must not be a TyConApp or CastTy, must be another AppTy, or TyVarTy See Note Respecting definitional equality about the no CastTy requirement

2) Argument type

TyConApp TyCon [KindOrType]

Application of a TyCon, including newtypes and synonyms. Invariant: saturated applications of FunTyCon must use FunTy and saturated synonyms must use their own constructors. However, unsaturated FunTyCons do appear as TyConApps. Parameters:

1) Type constructor being applied to.

2) Type arguments. Might not have enough type arguments here to saturate the constructor. Even type synonyms are not necessarily saturated; for example unsaturated type synonyms can appear as the right hand side of a type synonym.

ForAllTy !TyCoVarBinder Type

A Π type.

FunTy

t1 -> t2 Very common, so an important special case See Note [Function types]

Fields

LitTy TyLit

Type literals are similar to type constructors.

CastTy Type KindCoercion

A kind cast. The coercion is always nominal. INVARIANT: The cast is never refl. INVARIANT: The Type is not a CastTy (use TransCo instead) See Note Respecting definitional equality and (EQ3)

CoercionTy Coercion

Injection of a Coercion into a type This should only ever be used in the RHS of an AppTy, in the list of a TyConApp, when applying a promoted GADT data constructor

Instances

Instances details
Eq Type # 
Instance details

Defined in Language.Haskell.Liquid.GHC.TypeRep

Methods

(==) :: Type -> Type -> Bool #

(/=) :: Type -> Type -> Bool #

Data Type 
Instance details

Defined in TyCoRep

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Type -> c Type #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Type #

toConstr :: Type -> Constr #

dataTypeOf :: Type -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Type) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Type) #

gmapT :: (forall b. Data b => b -> b) -> Type -> Type #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r #

gmapQ :: (forall d. Data d => d -> u) -> Type -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Type -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Type -> m Type #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type #

NFData Type # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

rnf :: Type -> () #

Outputable Type 
Instance details

Defined in TyCoRep

Methods

ppr :: Type -> SDoc #

pprPrec :: Rational -> Type -> SDoc #

Fixpoint Type 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

toFix :: Type -> Doc

simplify :: Type -> Type

PPrint Type # 
Instance details

Defined in Language.Haskell.Liquid.Types.PrettyPrint

Methods

pprintTidy :: Tidy -> Type -> Doc #

pprintPrec :: Int -> Tidy -> Type -> Doc #

Default Type 
Instance details

Defined in Language.Haskell.Liquid.Synthesize.GHC

Methods

def :: Type

Subable Type # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Play

Methods

sub :: HashMap CoreBndr CoreExpr -> Type -> Type #

subTy :: HashMap TyVar Type -> Type -> Type #

SubsTy TyVar Type SpecType # 
Instance details

Defined in Language.Haskell.Liquid.Types.RefType

Methods

subt :: (TyVar, Type) -> SpecType -> SpecType #

Eq (DeBruijn Type) 
Instance details

Defined in CoreMap

Methods

(==) :: DeBruijn Type -> DeBruijn Type -> Bool #

(/=) :: DeBruijn Type -> DeBruijn Type -> Bool #

Show (Axiom Var Type CoreExpr) # 
Instance details

Defined in Language.Haskell.Liquid.Types.Types

data TyThing #

A global typecheckable-thing, essentially anything that has a name. Not to be confused with a TcTyThing, which is also a typecheckable thing but in the *local* context. See TcEnv for how to retrieve a TyThing given a Name.

Instances

Instances details
NamedThing TyThing 
Instance details

Defined in TyCoRep

Outputable TyThing 
Instance details

Defined in TyCoRep

Methods

ppr :: TyThing -> SDoc #

pprPrec :: Rational -> TyThing -> SDoc #

PPrint TyThing # 
Instance details

Defined in Language.Haskell.Liquid.Types.Types

Methods

pprintTidy :: Tidy -> TyThing -> Doc #

pprintPrec :: Int -> Tidy -> TyThing -> Doc #

data Coercion #

A Coercion is concrete evidence of the equality/convertibility of two types.

Instances

Instances details
Eq Coercion # 
Instance details

Defined in Language.Haskell.Liquid.GHC.TypeRep

Data Coercion 
Instance details

Defined in TyCoRep

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Coercion -> c Coercion #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Coercion #

toConstr :: Coercion -> Constr #

dataTypeOf :: Coercion -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Coercion) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Coercion) #

gmapT :: (forall b. Data b => b -> b) -> Coercion -> Coercion #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Coercion -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Coercion -> r #

gmapQ :: (forall d. Data d => d -> u) -> Coercion -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Coercion -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Coercion -> m Coercion #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Coercion -> m Coercion #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Coercion -> m Coercion #

Outputable Coercion 
Instance details

Defined in TyCoRep

Subable Coercion # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Play

Methods

sub :: HashMap CoreBndr CoreExpr -> Coercion -> Coercion #

subTy :: HashMap TyVar Type -> Coercion -> Coercion #

Eq (DeBruijn Coercion) 
Instance details

Defined in CoreMap

Methods

(==) :: DeBruijn Coercion -> DeBruijn Coercion -> Bool #

(/=) :: DeBruijn Coercion -> DeBruijn Coercion -> Bool #

data UnivCoProvenance #

For simplicity, we have just one UnivCo that represents a coercion from some type to some other type, with (in general) no restrictions on the type. The UnivCoProvenance specifies more exactly what the coercion really is and why a program should (or shouldn't!) trust the coercion. It is reasonable to consider each constructor of UnivCoProvenance as a totally independent coercion form; their only commonality is that they don't tell you what types they coercion between. (That info is in the UnivCo constructor of Coercion.

Constructors

UnsafeCoerceProv

From unsafeCoerce#. These are unsound.

PhantomProv KindCoercion

See Note [Phantom coercions]. Only in Phantom roled coercions

ProofIrrelProv KindCoercion

From the fact that any two coercions are considered equivalent. See Note [ProofIrrelProv]. Can be used in Nominal or Representational coercions

PluginProv String

From a plugin, which asserts that this coercion is sound. The string is for the use of the plugin.

Instances

Instances details
Data UnivCoProvenance 
Instance details

Defined in TyCoRep

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnivCoProvenance -> c UnivCoProvenance #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnivCoProvenance #

toConstr :: UnivCoProvenance -> Constr #

dataTypeOf :: UnivCoProvenance -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UnivCoProvenance) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnivCoProvenance) #

gmapT :: (forall b. Data b => b -> b) -> UnivCoProvenance -> UnivCoProvenance #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnivCoProvenance -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnivCoProvenance -> r #

gmapQ :: (forall d. Data d => d -> u) -> UnivCoProvenance -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UnivCoProvenance -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnivCoProvenance -> m UnivCoProvenance #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnivCoProvenance -> m UnivCoProvenance #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnivCoProvenance -> m UnivCoProvenance #

Outputable UnivCoProvenance 
Instance details

Defined in TyCoRep

data TyLit #

Instances

Instances details
Eq TyLit 
Instance details

Defined in TyCoRep

Methods

(==) :: TyLit -> TyLit -> Bool #

(/=) :: TyLit -> TyLit -> Bool #

Data TyLit 
Instance details

Defined in TyCoRep

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyLit -> c TyLit #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyLit #

toConstr :: TyLit -> Constr #

dataTypeOf :: TyLit -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyLit) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyLit) #

gmapT :: (forall b. Data b => b -> b) -> TyLit -> TyLit #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyLit -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyLit -> r #

gmapQ :: (forall d. Data d => d -> u) -> TyLit -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TyLit -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyLit -> m TyLit #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyLit -> m TyLit #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyLit -> m TyLit #

Ord TyLit 
Instance details

Defined in TyCoRep

Methods

compare :: TyLit -> TyLit -> Ordering #

(<) :: TyLit -> TyLit -> Bool #

(<=) :: TyLit -> TyLit -> Bool #

(>) :: TyLit -> TyLit -> Bool #

(>=) :: TyLit -> TyLit -> Bool #

max :: TyLit -> TyLit -> TyLit #

min :: TyLit -> TyLit -> TyLit #

Outputable TyLit 
Instance details

Defined in TyCoRep

Methods

ppr :: TyLit -> SDoc #

pprPrec :: Rational -> TyLit -> SDoc #

data TyCoBinder #

A TyCoBinder represents an argument to a function. TyCoBinders can be dependent (Named) or nondependent (Anon). They may also be visible or not. See Note [TyCoBinders]

Instances

Instances details
Data TyCoBinder 
Instance details

Defined in TyCoRep

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyCoBinder -> c TyCoBinder #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyCoBinder #

toConstr :: TyCoBinder -> Constr #

dataTypeOf :: TyCoBinder -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyCoBinder) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyCoBinder) #

gmapT :: (forall b. Data b => b -> b) -> TyCoBinder -> TyCoBinder #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyCoBinder -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyCoBinder -> r #

gmapQ :: (forall d. Data d => d -> u) -> TyCoBinder -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TyCoBinder -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyCoBinder -> m TyCoBinder #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCoBinder -> m TyCoBinder #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCoBinder -> m TyCoBinder #

Outputable TyCoBinder 
Instance details

Defined in TyCoRep

data MCoercion #

A semantically more meaningful type to represent what may or may not be a useful Coercion.

Constructors

MRefl 
MCo Coercion 

Instances

Instances details
Data MCoercion 
Instance details

Defined in TyCoRep

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MCoercion -> c MCoercion #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MCoercion #

toConstr :: MCoercion -> Constr #

dataTypeOf :: MCoercion -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MCoercion) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MCoercion) #

gmapT :: (forall b. Data b => b -> b) -> MCoercion -> MCoercion #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MCoercion -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MCoercion -> r #

gmapQ :: (forall d. Data d => d -> u) -> MCoercion -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MCoercion -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MCoercion -> m MCoercion #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MCoercion -> m MCoercion #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MCoercion -> m MCoercion #

Outputable MCoercion 
Instance details

Defined in TyCoRep

type PredType = Type #

A type of the form p of constraint kind represents a value whose type is the Haskell predicate p, where a predicate is what occurs before the => in a Haskell type.

We use PredType as documentation to mark those types that we guarantee to have this kind.

It can be expanded into its representation, but:

  • The type checker must treat it as opaque
  • The rest of the compiler treats it as transparent

Consider these examples:

f :: (Eq a) => a -> Int
g :: (?x :: Int -> Int) => a -> Int
h :: (r\l) => {r} => {l::Int | r}

Here the Eq a and ?x :: Int -> Int and rl are all called "predicates"

type Kind = Type #

The key type representing kinds in the compiler.

type ThetaType = [PredType] #

A collection of PredTypes

data ArgFlag #

Argument Flag

Is something required to appear in source Haskell (Required), permitted by request (Specified) (visible type application), or prohibited entirely from appearing in source Haskell (Inferred)? See Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in TyCoRep

Constructors

Inferred 
Specified 
Required 

Instances

Instances details
Eq ArgFlag 
Instance details

Defined in Var

Methods

(==) :: ArgFlag -> ArgFlag -> Bool #

(/=) :: ArgFlag -> ArgFlag -> Bool #

Data ArgFlag 
Instance details

Defined in Var

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArgFlag -> c ArgFlag #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ArgFlag #

toConstr :: ArgFlag -> Constr #

dataTypeOf :: ArgFlag -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ArgFlag) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArgFlag) #

gmapT :: (forall b. Data b => b -> b) -> ArgFlag -> ArgFlag #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArgFlag -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArgFlag -> r #

gmapQ :: (forall d. Data d => d -> u) -> ArgFlag -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ArgFlag -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag #

Ord ArgFlag 
Instance details

Defined in Var

Binary ArgFlag 
Instance details

Defined in Var

Outputable ArgFlag 
Instance details

Defined in Var

Methods

ppr :: ArgFlag -> SDoc #

pprPrec :: Rational -> ArgFlag -> SDoc #

Outputable tv => Outputable (VarBndr tv ArgFlag) 
Instance details

Defined in Var

data AnonArgFlag #

The non-dependent version of ArgFlag.

Constructors

VisArg

Used for (->): an ordinary non-dependent arrow. The argument is visible in source code.

InvisArg

Used for (=>): a non-dependent predicate arrow. The argument is invisible in source code.

Instances

Instances details
Eq AnonArgFlag 
Instance details

Defined in Var

Data AnonArgFlag 
Instance details

Defined in Var

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnonArgFlag -> c AnonArgFlag #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnonArgFlag #

toConstr :: AnonArgFlag -> Constr #

dataTypeOf :: AnonArgFlag -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnonArgFlag) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnonArgFlag) #

gmapT :: (forall b. Data b => b -> b) -> AnonArgFlag -> AnonArgFlag #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnonArgFlag -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnonArgFlag -> r #

gmapQ :: (forall d. Data d => d -> u) -> AnonArgFlag -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AnonArgFlag -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnonArgFlag -> m AnonArgFlag #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnonArgFlag -> m AnonArgFlag #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnonArgFlag -> m AnonArgFlag #

Ord AnonArgFlag 
Instance details

Defined in Var

Binary AnonArgFlag 
Instance details

Defined in Var

Outputable AnonArgFlag 
Instance details

Defined in Var

data Var #

Variable

Essentially a typed Name, that may also contain some additional information about the Var and its use sites.

Instances

Instances details
Eq Var 
Instance details

Defined in Var

Methods

(==) :: Var -> Var -> Bool #

(/=) :: Var -> Var -> Bool #

Data Var 
Instance details

Defined in Var

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Var -> c Var #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Var #

toConstr :: Var -> Constr #

dataTypeOf :: Var -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Var) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var) #

gmapT :: (forall b. Data b => b -> b) -> Var -> Var #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r #

gmapQ :: (forall d. Data d => d -> u) -> Var -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Var -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Var -> m Var #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var #

Ord Var 
Instance details

Defined in Var

Methods

compare :: Var -> Var -> Ordering #

(<) :: Var -> Var -> Bool #

(<=) :: Var -> Var -> Bool #

(>) :: Var -> Var -> Bool #

(>=) :: Var -> Var -> Bool #

max :: Var -> Var -> Var #

min :: Var -> Var -> Var #

Show CoreExpr # 
Instance details

Defined in Language.Haskell.Liquid.Transforms.CoreToLogic

Show Var # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

showsPrec :: Int -> Var -> ShowS #

show :: Var -> String #

showList :: [Var] -> ShowS #

NFData Var # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

rnf :: Var -> () #

NamedThing Var 
Instance details

Defined in Var

Methods

getOccName :: Var -> OccName #

getName :: Var -> Name #

HasOccName Var 
Instance details

Defined in Var

Methods

occName :: Var -> OccName #

Uniquable Var 
Instance details

Defined in Var

Methods

getUnique :: Var -> Unique #

Outputable Var 
Instance details

Defined in Var

Methods

ppr :: Var -> SDoc #

pprPrec :: Rational -> Var -> SDoc #

Symbolic Var
NOTE:REFLECT-IMPORTS
we **eschew** the unique suffix for exported vars, to make it possible to lookup names from symbols _across_ modules; anyways exported names are top-level and you shouldn't have local binders that shadow them. However, we **keep** the unique suffix for local variables, as otherwise there are spurious, but extremely problematic, name collisions in the fixpoint environment.
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

symbol :: Var -> Symbol

Fixpoint Var 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

toFix :: Var -> Doc

simplify :: Var -> Var

PPrint Var # 
Instance details

Defined in Language.Haskell.Liquid.Types.PrettyPrint

Methods

pprintTidy :: Tidy -> Var -> Doc #

pprintPrec :: Int -> Tidy -> Var -> Doc #

Expression Var

Converting to Fixpoint ----------------------------------------------------

Instance details

Defined in Language.Haskell.Liquid.Types.RefType

Methods

expr :: Var -> Expr

Loc Var 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

srcSpan :: Var -> SrcSpan

Hashable Var 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

hashWithSalt :: Int -> Var -> Int

hash :: Var -> Int

Default Var 
Instance details

Defined in Language.Haskell.Liquid.Synthesize.GHC

Methods

def :: Var

CBVisitable CoreBind # 
Instance details

Defined in Language.Haskell.Liquid.Types.Visitors

Methods

freeVars :: HashSet Var -> CoreBind -> [Var] #

readVars :: CoreBind -> [Var] #

letVars :: CoreBind -> [Var] #

literals :: CoreBind -> [Literal] #

Subable CoreExpr # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Play

Methods

sub :: HashMap CoreBndr CoreExpr -> CoreExpr -> CoreExpr #

subTy :: HashMap TyVar Type -> CoreExpr -> CoreExpr #

Subable Var # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Play

Methods

sub :: HashMap CoreBndr CoreExpr -> Var -> Var #

subTy :: HashMap TyVar Type -> Var -> Var #

ResolveSym Var # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Resolve

SubsTy TyVar Type SpecType # 
Instance details

Defined in Language.Haskell.Liquid.Types.RefType

Methods

subt :: (TyVar, Type) -> SpecType -> SpecType #

Eq (DeBruijn CoreExpr) 
Instance details

Defined in CoreMap

Methods

(==) :: DeBruijn CoreExpr -> DeBruijn CoreExpr -> Bool #

(/=) :: DeBruijn CoreExpr -> DeBruijn CoreExpr -> Bool #

Eq (DeBruijn CoreAlt) 
Instance details

Defined in CoreMap

Methods

(==) :: DeBruijn CoreAlt -> DeBruijn CoreAlt -> Bool #

(/=) :: DeBruijn CoreAlt -> DeBruijn CoreAlt -> Bool #

PPrint (Expr Var) # 
Instance details

Defined in Language.Haskell.Liquid.Types.PrettyPrint

Methods

pprintTidy :: Tidy -> Expr Var -> Doc #

pprintPrec :: Int -> Tidy -> Expr Var -> Doc #

PPrint (Bind Var) # 
Instance details

Defined in Language.Haskell.Liquid.Types.PrettyPrint

Methods

pprintTidy :: Tidy -> Bind Var -> Doc #

pprintPrec :: Int -> Tidy -> Bind Var -> Doc #

CBVisitable [CoreBind] # 
Instance details

Defined in Language.Haskell.Liquid.Types.Visitors

Methods

freeVars :: HashSet Var -> [CoreBind] -> [Var] #

readVars :: [CoreBind] -> [Var] #

letVars :: [CoreBind] -> [Var] #

literals :: [CoreBind] -> [Literal] #

CBVisitable (Expr Var) # 
Instance details

Defined in Language.Haskell.Liquid.Types.Visitors

Methods

freeVars :: HashSet Var -> Expr Var -> [Var] #

readVars :: Expr Var -> [Var] #

letVars :: Expr Var -> [Var] #

literals :: Expr Var -> [Literal] #

CBVisitable (Alt Var) # 
Instance details

Defined in Language.Haskell.Liquid.Types.Visitors

Methods

freeVars :: HashSet Var -> Alt Var -> [Var] #

readVars :: Alt Var -> [Var] #

letVars :: Alt Var -> [Var] #

literals :: Alt Var -> [Literal] #

Subable (Alt Var) # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Play

Methods

sub :: HashMap CoreBndr CoreExpr -> Alt Var -> Alt Var #

subTy :: HashMap TyVar Type -> Alt Var -> Alt Var #

Subable (Bind Var) # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Play

Methods

sub :: HashMap CoreBndr CoreExpr -> Bind Var -> Bind Var #

subTy :: HashMap TyVar Type -> Bind Var -> Bind Var #

Show (Axiom Var Type CoreExpr) # 
Instance details

Defined in Language.Haskell.Liquid.Types.Types

traceCmd :: DynFlags -> String -> String -> IO a -> IO a #

isWarnMsgFatal :: DynFlags -> WarnMsg -> Maybe (Maybe WarningFlag) #

Checks if given WarnMsg is a fatal warning.

logOutput :: DynFlags -> PprStyle -> MsgDoc -> IO () #

Like logInfo but with SevOutput rather then SevInfo

putMsg :: DynFlags -> MsgDoc -> IO () #

withTimingSilentD #

Arguments

:: (MonadIO m, HasDynFlags m) 
=> SDoc

The name of the phase

-> (a -> ())

A function to force the result (often either const () or rnf)

-> m a

The body of the phase to be timed

-> m a 

Same as withTiming, but doesn't print timings in the console (when given -vN, N >= 2 or -ddump-timings) and gets the DynFlags from the given Monad.

See Note [withTiming] for more.

withTimingSilent #

Arguments

:: MonadIO m 
=> DynFlags

DynFlags

-> SDoc

The name of the phase

-> (a -> ())

A function to force the result (often either const () or rnf)

-> m a

The body of the phase to be timed

-> m a 

Same as withTiming, but doesn't print timings in the console (when given -vN, N >= 2 or -ddump-timings).

See Note [withTiming] for more.

withTimingD #

Arguments

:: (MonadIO m, HasDynFlags m) 
=> SDoc

The name of the phase

-> (a -> ())

A function to force the result (often either const () or rnf)

-> m a

The body of the phase to be timed

-> m a 

Like withTiming but get DynFlags from the Monad.

withTiming #

Arguments

:: MonadIO m 
=> DynFlags

DynFlags

-> SDoc

The name of the phase

-> (a -> ())

A function to force the result (often either const () or rnf)

-> m a

The body of the phase to be timed

-> m a 

Time a compilation phase.

When timings are enabled (e.g. with the -v2 flag), the allocations and CPU time used by the phase will be reported to stderr. Consider a typical usage: withTiming getDynFlags (text "simplify") force PrintTimings pass. When timings are enabled the following costs are included in the produced accounting,

  • The cost of executing pass to a result r in WHNF
  • The cost of evaluating force r to WHNF (e.g. ())

The choice of the force function depends upon the amount of forcing desired; the goal here is to ensure that the cost of evaluating the result is, to the greatest extent possible, included in the accounting provided by withTiming. Often the pass already sufficiently forces its result during construction; in this case const () is a reasonable choice. In other cases, it is necessary to evaluate the result to normal form, in which case something like Control.DeepSeq.rnf is appropriate.

To avoid adversely affecting compiler performance when timings are not requested, the result is only forced when timings are enabled.

See Note [withTiming] for more.

dumpSDocWithStyle :: PprStyle -> DynFlags -> DumpFlag -> String -> SDoc -> IO () #

Write out a dump. If --dump-to-file is set then this goes to a file. otherwise emit to stdout.

When hdr is empty, we print in a more compact format (no separators and blank lines)

The DumpFlag is used only to choose the filename to use if --dump-to-file is used; it is not used to decide whether to dump the output

dumpSDocForUser :: DynFlags -> PrintUnqualified -> DumpFlag -> String -> SDoc -> IO () #

A wrapper around dumpSDocWithStyle which uses PprUser style.

dumpIfSet_dyn_printer :: PrintUnqualified -> DynFlags -> DumpFlag -> SDoc -> IO () #

a wrapper around dumpSDoc. First check whether the dump flag is set Do nothing if it is unset

Unlike dumpIfSet_dyn, has a printer argument but no header argument

dumpIfSet_dyn :: DynFlags -> DumpFlag -> String -> SDoc -> IO () #

a wrapper around dumpSDoc. First check whether the dump flag is set Do nothing if it is unset

dumpIfSet :: DynFlags -> Bool -> String -> SDoc -> IO () #

doIfSet :: Bool -> IO () -> IO () #

ghcExit :: DynFlags -> Int -> IO () #

mkPlainWarnMsg :: DynFlags -> SrcSpan -> MsgDoc -> ErrMsg #

Variant that doesn't care about qualified/unqualified names

mkWarnMsg :: DynFlags -> SrcSpan -> PrintUnqualified -> MsgDoc -> ErrMsg #

A short (one-line) error message

mkLongWarnMsg :: DynFlags -> SrcSpan -> PrintUnqualified -> MsgDoc -> MsgDoc -> ErrMsg #

A long (multi-line) error message

mkPlainErrMsg :: DynFlags -> SrcSpan -> MsgDoc -> ErrMsg #

Variant that doesn't care about qualified/unqualified names

mkErrMsg :: DynFlags -> SrcSpan -> PrintUnqualified -> MsgDoc -> ErrMsg #

A short (one-line) error message

mkLongErrMsg :: DynFlags -> SrcSpan -> PrintUnqualified -> MsgDoc -> MsgDoc -> ErrMsg #

A long (multi-line) error message

errDoc :: [MsgDoc] -> [MsgDoc] -> [MsgDoc] -> ErrDoc #

allValid :: [Validity] -> Validity #

If they aren't all valid, return the first

data Validity #

Constructors

IsValid

Everything is fine

NotValid MsgDoc

A problem, and some indication of why

data ErrMsg #

Instances

Instances details
Show ErrMsg 
Instance details

Defined in ErrUtils

PPrint ErrMsg #

A whole bunch of PPrint instances follow ----------------------------------

Instance details

Defined in Language.Haskell.Liquid.Types.PrettyPrint

Methods

pprintTidy :: Tidy -> ErrMsg -> Doc #

pprintPrec :: Int -> Tidy -> ErrMsg -> Doc #

data ErrDoc #

Categorise error msgs by their importance. This is so each section can be rendered visually distinct. See Note [Error report] for where these come from.

mkDataCOcc #

Arguments

:: OccName

TyCon or data con string

-> OccSet

avoid these Occs

-> OccName

E.g. $f3OrdMaybe data T = MkT ... deriving( Data ) needs definitions for $tT :: Data.Generics.Basics.DataType $cMkT :: Data.Generics.Basics.Constr

mkDataTOcc #

Arguments

:: OccName

TyCon or data con string

-> OccSet

avoid these Occs

-> OccName

E.g. $f3OrdMaybe data T = MkT ... deriving( Data ) needs definitions for $tT :: Data.Generics.Basics.DataType $cMkT :: Data.Generics.Basics.Constr

mkDFunOcc #

Arguments

:: String

Typically the class and type glommed together e.g. OrdMaybe. Only used in debug mode, for extra clarity

-> Bool

Is this a hs-boot instance DFun?

-> OccSet

avoid these Occs

-> OccName

E.g. $f3OrdMaybe

mkInstTyTcOcc #

Arguments

:: String

Family name, e.g. Map

-> OccSet

avoid these Occs

-> OccName
R:Map

Derive a name for the representation type constructor of a data/newtype instance.

mkLocalOcc #

Arguments

:: Unique

Unique to combine with the OccName

-> OccName

Local name, e.g. sat

-> OccName

Nice unique version, e.g. $L23sat

mkSuperDictSelOcc #

Arguments

:: Int

Index of superclass, e.g. 3

-> OccName

Class, e.g. Ord

-> OccName

Derived Occname, e.g. $p3Ord

isTypeableBindOcc :: OccName -> Bool #

Is an OccName one of a Typeable TyCon or Module binding? This is needed as these bindings are renamed differently. See Note [Grand plan for Typeable] in TcTypeable.

isDerivedOccName :: OccName -> Bool #

Test for definitions internally generated by GHC. This predicte is used to suppress printing of internal definitions in some debug prints

startsWithUnderscore :: OccName -> Bool #

Haskell 98 encourages compilers to suppress warnings about unsed names in a pattern if they start with _: this implements that test

parenSymOcc :: OccName -> SDoc -> SDoc #

Wrap parens around an operator

isSymOcc :: OccName -> Bool #

Test if the OccName is that for any operator (whether it is a data constructor or variable or whatever)

isDataSymOcc :: OccName -> Bool #

Test if the OccName is a data constructor that starts with a symbol (e.g. :, or [])

isValOcc :: OccName -> Bool #

Value OccNamess are those that are either in the variable or data constructor namespaces

pprOccEnv :: (a -> SDoc) -> OccEnv a -> SDoc #

alterOccEnv :: (Maybe elt -> Maybe elt) -> OccEnv elt -> OccName -> OccEnv elt #

filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt #

mkOccEnv_C :: (a -> a -> a) -> [(OccName, a)] -> OccEnv a #

mapOccEnv :: (a -> b) -> OccEnv a -> OccEnv b #

extendOccEnv_Acc :: (a -> b -> b) -> (a -> b) -> OccEnv b -> OccName -> a -> OccEnv b #

extendOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccName -> a -> OccEnv a #

plusOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccEnv a -> OccEnv a #

occEnvElts :: OccEnv a -> [a] #

foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b #

mkOccEnv :: [(OccName, a)] -> OccEnv a #

extendOccEnvList :: OccEnv a -> [(OccName, a)] -> OccEnv a #

extendOccEnv :: OccEnv a -> OccName -> a -> OccEnv a #

unitOccEnv :: OccName -> a -> OccEnv a #

data NameSpace #

Instances

Instances details
Eq NameSpace 
Instance details

Defined in OccName

Ord NameSpace 
Instance details

Defined in OccName

Binary NameSpace 
Instance details

Defined in OccName

class HasOccName name where #

Other names in the compiler add additional information to an OccName. This class provides a consistent way to access the underlying OccName.

Methods

occName :: name -> OccName #

Instances

Instances details
HasOccName HoleFitCandidate 
Instance details

Defined in TcHoleFitTypes

HasOccName TcBinder 
Instance details

Defined in TcRnTypes

Methods

occName :: TcBinder -> OccName #

HasOccName IfaceDecl 
Instance details

Defined in IfaceSyn

Methods

occName :: IfaceDecl -> OccName #

HasOccName IfaceClassOp 
Instance details

Defined in IfaceSyn

HasOccName IfaceConDecl 
Instance details

Defined in IfaceSyn

HasOccName RdrName 
Instance details

Defined in RdrName

Methods

occName :: RdrName -> OccName #

HasOccName Var 
Instance details

Defined in Var

Methods

occName :: Var -> OccName #

HasOccName OccName 
Instance details

Defined in OccName

Methods

occName :: OccName -> OccName #

HasOccName Name 
Instance details

Defined in Name

Methods

occName :: Name -> OccName #

HasOccName name => HasOccName (IEWrappedName name) 
Instance details

Defined in GHC.Hs.ImpExp

Methods

occName :: IEWrappedName name -> OccName #

data OccEnv a #

Instances

Instances details
Data a => Data (OccEnv a) 
Instance details

Defined in OccName

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OccEnv a -> c (OccEnv a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (OccEnv a) #

toConstr :: OccEnv a -> Constr #

dataTypeOf :: OccEnv a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (OccEnv a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (OccEnv a)) #

gmapT :: (forall b. Data b => b -> b) -> OccEnv a -> OccEnv a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OccEnv a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OccEnv a -> r #

gmapQ :: (forall d. Data d => d -> u) -> OccEnv a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> OccEnv a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> OccEnv a -> m (OccEnv a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OccEnv a -> m (OccEnv a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OccEnv a -> m (OccEnv a) #

Outputable a => Outputable (OccEnv a) 
Instance details

Defined in OccName

Methods

ppr :: OccEnv a -> SDoc #

pprPrec :: Rational -> OccEnv a -> SDoc #

emptyFilesToClean :: FilesToClean #

An empty FilesToClean

makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String]) #

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.

canonicalizeHomeModule :: DynFlags -> ModuleName -> Module #

Given a ModuleName of a signature in the home library, find out how it is instantiated. E.g., the canonical form of A in p[A=q[]:A] is q[]:A.

rtsIsProfiled :: Bool #

Was the runtime system built with profiling enabled?

warningHierarchies :: [[String]] #

Warning group hierarchies, where there is an explicit inclusion relation.

Each inner list is a hierarchy of warning groups, ordered from smallest to largest, where each group is a superset of the one before it.

Separating this from warningGroups allows for multiple hierarchies with no inherent relation to be defined.

The special-case Weverything group is not included.

warningGroups :: [(String, [WarningFlag])] #

Warning groups.

As all warnings are in the Weverything set, it is ignored when displaying to the user which group a warning is in.

xFlags :: [FlagSpec Extension] #

These -Xblah flags can all be reversed with -XNoblah

fLangFlags :: [FlagSpec Extension] #

These -f<blah> flags can all be reversed with -fno-<blah>

fFlags :: [FlagSpec GeneralFlag] #

These -f<blah> flags can all be reversed with -fno-<blah>

wWarningFlags :: [FlagSpec WarningFlag] #

These -W<blah> flags can all be reversed with -Wno-<blah>

flagsForCompletion :: Bool -> [String] #

Make a list of flags for shell completion. Filter all available flags into two groups, for interactive GHC vs all other.

allNonDeprecatedFlags :: [String] #

All dynamic flags option strings without the deprecated ones. These are the user facing strings for enabling and disabling options.

putLogMsg :: DynFlags -> WarnReason -> Severity -> SrcSpan -> PprStyle -> MsgDoc -> IO () #

Write an error or warning to the LogOutput.

parseDynamicFlagsFull #

Arguments

:: 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]) 

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.

parseDynamicFilePragma #

Arguments

:: MonadIO m 
=> DynFlags 
-> [Located String] 
-> m (DynFlags, [Located String], [Warn])

Updated DynFlags, left-over arguments, and list of warnings.

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.

parseDynamicFlagsCmdLine #

Arguments

:: MonadIO m 
=> DynFlags 
-> [Located String] 
-> m (DynFlags, [Located String], [Warn])

Updated DynFlags, left-over arguments, and list of warnings.

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).

updOptLevel :: Int -> DynFlags -> DynFlags #

Sets the DynFlags to be appropriate to the optimisation level

getVerbFlags :: DynFlags -> [String] #

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

getOpts #

Arguments

:: DynFlags

DynFlags to retrieve the options from

-> (DynFlags -> [a])

Relevant record accessor: one of the opt_* accessors

-> [a]

Correctly ordered extracted options

Retrieve the options corresponding to a particular opt_* field in the correct order

unsafeFlagsForInfer :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)] #

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 :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)] #

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

safeImplicitImpsReq :: DynFlags -> Bool #

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.

safeDirectImpsReq :: DynFlags -> Bool #

Are all direct imports required to be safe for this Safe Haskell mode? Direct imports are when the code explicitly imports a module

safeImportsOn :: DynFlags -> Bool #

Test if Safe Imports are on in some form

safeInferOn :: DynFlags -> Bool #

Is the Safe Haskell safe inference mode active

safeLanguageOn :: DynFlags -> Bool #

Is the Safe Haskell safe language in use

safeHaskellOn :: DynFlags -> Bool #

Is Safe Haskell on in some way (including inference mode)

packageTrustOn :: DynFlags -> Bool #

Is the -fpackage-trust mode on

dynFlagDependencies :: DynFlags -> [ModuleName] #

Some modules have dependencies on others through the DynFlags rather than textual imports

xopt_set_unlessExplSpec :: Extension -> (DynFlags -> Extension -> DynFlags) -> DynFlags -> DynFlags #

Set or unset a Extension, unless it has been explicitly set or unset before.

xopt :: Extension -> DynFlags -> Bool #

Test whether a Extension is set

wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags #

Mark a WarningFlag as fatal (do not set the flag)

wopt_fatal :: WarningFlag -> DynFlags -> Bool #

Test whether a WarningFlag is set as fatal

wopt :: WarningFlag -> DynFlags -> Bool #

Test whether a WarningFlag is set

gopt :: GeneralFlag -> DynFlags -> Bool #

Test whether a GeneralFlag is set

dopt :: DumpFlag -> DynFlags -> Bool #

Test whether a DumpFlag is set

languageExtensions :: Maybe Language -> [Extension] #

The language extensions implied by the various language variants. When updating this be sure to update the flag documentation in docsusers-guideglasgow_exts.rst.

defaultLogActionHPrintDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO () #

Like defaultLogActionHPutStrDoc but appends an extra newline.

defaultDynFlags :: Settings -> LlvmConfig -> DynFlags #

The normal DynFlags. Note that they are not suitable for use in this form and must be fully initialized by runGhc first.

initDynFlags :: DynFlags -> IO DynFlags #

Used by runGhc to partially initialize a new DynFlags value

dynamicOutputFile :: DynFlags -> FilePath -> FilePath #

Compute the path of the dynamic object corresponding to an object file.

ifGeneratingDynamicToo :: MonadIO m => DynFlags -> m a -> m a -> m a #

whenGeneratingDynamicToo :: MonadIO m => DynFlags -> m () -> m () #

positionIndependent :: DynFlags -> Bool #

Are we building with -fPIE or -fPIC enabled?

targetRetainsAllBindings :: HscTarget -> Bool #

Does this target retain *all* top-level bindings for a module, rather than just the exported bindings, in the TypeEnv and compiled code (if any)? In interpreted mode we do this, so that GHCi can call functions inside a module. In HscNothing mode we also do it, so that Haddock can get access to the GlobalRdrEnv for a module after typechecking it.

isObjectTarget :: HscTarget -> Bool #

Will this target result in an object file on the disk?

versionedAppDir :: DynFlags -> MaybeT IO FilePath #

The directory for this version of ghc in the user's app directory (typically something like ~.ghcx86_64-linux-7.6.3)

settings :: DynFlags -> Settings #

"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.

flattenIncludes :: IncludeSpecs -> [String] #

Concatenate and flatten the list of global and quoted includes returning just a flat list of paths.

addQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs #

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"

addGlobalInclude :: IncludeSpecs -> [String] -> IncludeSpecs #

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.

data WarnReason #

Used when outputting warnings: if a reason is given, it is displayed. If a warning isn't controlled by a flag, this is made explicit at the point of use.

Constructors

NoReason 
Reason !WarningFlag

Warning was enabled with the flag

ErrReason !(Maybe WarningFlag)

Warning was made an error because of -Werror or -Werror=WarningFlag

Instances

Instances details
Show WarnReason 
Instance details

Defined in DynFlags

ToJson WarnReason 
Instance details

Defined in DynFlags

Methods

json :: WarnReason -> JsonDoc #

Outputable WarnReason 
Instance details

Defined in DynFlags

data IncludeSpecs #

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.

Instances

Instances details
Show IncludeSpecs 
Instance details

Defined in DynFlags

data WarningFlag #

Constructors

Opt_WarnDuplicateExports 
Opt_WarnDuplicateConstraints 
Opt_WarnRedundantConstraints 
Opt_WarnHiShadows 
Opt_WarnImplicitPrelude 
Opt_WarnIncompletePatterns 
Opt_WarnIncompleteUniPatterns 
Opt_WarnIncompletePatternsRecUpd 
Opt_WarnOverflowedLiterals 
Opt_WarnEmptyEnumerations 
Opt_WarnMissingFields 
Opt_WarnMissingImportList 
Opt_WarnMissingMethods 
Opt_WarnMissingSignatures 
Opt_WarnMissingLocalSignatures 
Opt_WarnNameShadowing 
Opt_WarnOverlappingPatterns 
Opt_WarnTypeDefaults 
Opt_WarnMonomorphism 
Opt_WarnUnusedTopBinds 
Opt_WarnUnusedLocalBinds 
Opt_WarnUnusedPatternBinds 
Opt_WarnUnusedImports 
Opt_WarnUnusedMatches 
Opt_WarnUnusedTypePatterns 
Opt_WarnUnusedForalls 
Opt_WarnUnusedRecordWildcards 
Opt_WarnRedundantRecordWildcards 
Opt_WarnWarningsDeprecations 
Opt_WarnDeprecatedFlags 
Opt_WarnMissingMonadFailInstances 
Opt_WarnSemigroup 
Opt_WarnDodgyExports 
Opt_WarnDodgyImports 
Opt_WarnOrphans 
Opt_WarnAutoOrphans 
Opt_WarnIdentities 
Opt_WarnTabs 
Opt_WarnUnrecognisedPragmas 
Opt_WarnDodgyForeignImports 
Opt_WarnUnusedDoBind 
Opt_WarnWrongDoBind 
Opt_WarnAlternativeLayoutRuleTransitional 
Opt_WarnUnsafe 
Opt_WarnSafe 
Opt_WarnTrustworthySafe 
Opt_WarnMissedSpecs 
Opt_WarnAllMissedSpecs 
Opt_WarnUnsupportedCallingConventions 
Opt_WarnUnsupportedLlvmVersion 
Opt_WarnMissedExtraSharedLib 
Opt_WarnInlineRuleShadowing 
Opt_WarnTypedHoles 
Opt_WarnPartialTypeSignatures 
Opt_WarnMissingExportedSignatures 
Opt_WarnUntickedPromotedConstructors 
Opt_WarnDerivingTypeable 
Opt_WarnDeferredTypeErrors 
Opt_WarnDeferredOutOfScopeVariables 
Opt_WarnNonCanonicalMonadInstances 
Opt_WarnNonCanonicalMonadFailInstances 
Opt_WarnNonCanonicalMonoidInstances 
Opt_WarnMissingPatternSynonymSignatures 
Opt_WarnUnrecognisedWarningFlags 
Opt_WarnSimplifiableClassConstraints 
Opt_WarnCPPUndef 
Opt_WarnUnbangedStrictPatterns 
Opt_WarnMissingHomeModules 
Opt_WarnPartialFields 
Opt_WarnMissingExportList 
Opt_WarnInaccessibleCode 
Opt_WarnStarIsType 
Opt_WarnStarBinder 
Opt_WarnImplicitKindVars 
Opt_WarnSpaceAfterBang 
Opt_WarnMissingDerivingStrategies 
Opt_WarnPrepositiveQualifiedModule 
Opt_WarnUnusedPackages 
Opt_WarnInferredSafeImports 
Opt_WarnMissingSafeHaskellMode 
Opt_WarnCompatUnqualifiedImports 
Opt_WarnDerivingDefaults 

data Language #

Constructors

Haskell98 
Haskell2010 

Instances

Instances details
Enum Language 
Instance details

Defined in DynFlags

Eq Language 
Instance details

Defined in DynFlags

Show Language 
Instance details

Defined in DynFlags

Outputable Language 
Instance details

Defined in DynFlags

data SafeHaskellMode #

The various Safe Haskell modes

Constructors

Sf_None

inferred unsafe

Sf_Unsafe

declared and checked

Sf_Trustworthy

declared and checked

Sf_Safe

declared and checked

Sf_SafeInferred

inferred as safe

Sf_Ignore

-fno-safe-haskell state

Instances

Instances details
Eq SafeHaskellMode 
Instance details

Defined in DynFlags

Show SafeHaskellMode 
Instance details

Defined in DynFlags

Outputable SafeHaskellMode 
Instance details

Defined in DynFlags

data CfgWeights #

Edge weights to use when generating a CFG from CMM

class HasDynFlags (m :: Type -> Type) where #

Methods

getDynFlags :: m DynFlags #

Instances

Instances details
HasDynFlags Ghc 
Instance details

Defined in GhcMonad

HasDynFlags CompPipeline 
Instance details

Defined in PipelineMonad

HasDynFlags Hsc 
Instance details

Defined in HscTypes

HasDynFlags CoreM 
Instance details

Defined in CoreMonad

HasDynFlags LintM 
Instance details

Defined in CoreLint

Methods

getDynFlags :: LintM DynFlags #

(Monad m, HasDynFlags m) => HasDynFlags (MaybeT m) 
Instance details

Defined in DynFlags

MonadIO m => HasDynFlags (GhcT m) 
Instance details

Defined in GhcMonad

ContainsDynFlags env => HasDynFlags (IOEnv env) 
Instance details

Defined in IOEnv

Methods

getDynFlags :: IOEnv env DynFlags #

(Monad m, HasDynFlags m) => HasDynFlags (ExceptT e m) 
Instance details

Defined in DynFlags

(Monad m, HasDynFlags m) => HasDynFlags (ReaderT a m) 
Instance details

Defined in DynFlags

(Monoid a, Monad m, HasDynFlags m) => HasDynFlags (WriterT a m) 
Instance details

Defined in DynFlags

class ContainsDynFlags t where #

Methods

extractDynFlags :: t -> DynFlags #

Instances

Instances details
ContainsDynFlags (Env gbl lcl) 
Instance details

Defined in TcRnTypes

Methods

extractDynFlags :: Env gbl lcl -> DynFlags #

data ProfAuto #

Constructors

NoProfAuto

no SCC annotations added

ProfAutoAll

top-level and nested functions are annotated

ProfAutoTop

top-level functions annotated only

ProfAutoExports

exported functions annotated only

ProfAutoCalls

annotate call-sites

Instances

Instances details
Enum ProfAuto 
Instance details

Defined in DynFlags

Eq ProfAuto 
Instance details

Defined in DynFlags

data LlvmTarget #

Constructors

LlvmTarget 

data LlvmConfig #

See Note [LLVM Configuration] in SysTools.

Constructors

LlvmConfig 

data HscTarget #

The target code type of the compilation (if any).

Whenever you change the target, also make sure to set ghcLink to something sensible.

HscNothing 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. See Note [-fno-code mode].

Constructors

HscC

Generate C code.

HscAsm

Generate assembly using the native code generator.

HscLlvm

Generate assembly using the llvm code generator.

HscInterpreted

Generate bytecode. (Requires LinkInMemory)

HscNothing

Don't generate any code. See notes above.

Instances

Instances details
Eq HscTarget 
Instance details

Defined in DynFlags

Show HscTarget 
Instance details

Defined in DynFlags

data GhcMode #

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 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.

Constructors

CompManager

--make, GHCi, etc.

OneShot
ghc -c Foo.hs
MkDepend

ghc -M, see Finder for why we need this

Instances

Instances details
Eq GhcMode 
Instance details

Defined in DynFlags

Methods

(==) :: GhcMode -> GhcMode -> Bool #

(/=) :: GhcMode -> GhcMode -> Bool #

Outputable GhcMode 
Instance details

Defined in DynFlags

Methods

ppr :: GhcMode -> SDoc #

pprPrec :: Rational -> GhcMode -> SDoc #

data GhcLink #

What to do in the link step, if there is one.

Constructors

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

Instances

data PackageArg #

We accept flags which make packages visible, but how they select the package varies; this data type reflects what selection criterion is used.

Constructors

PackageArg String

-package, by PackageName

UnitIdArg UnitId

-package-id, by UnitId

Instances

Instances details
Eq PackageArg 
Instance details

Defined in DynFlags

Show PackageArg 
Instance details

Defined in DynFlags

Outputable PackageArg 
Instance details

Defined in DynFlags

data ModRenaming #

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)]

Constructors

ModRenaming 

Fields

Instances

Instances details
Eq ModRenaming 
Instance details

Defined in DynFlags

Outputable ModRenaming 
Instance details

Defined in DynFlags

newtype IgnorePackageFlag #

Flags for manipulating the set of non-broken packages.

Constructors

IgnorePackage String
-ignore-package

Instances

Instances details
Eq IgnorePackageFlag 
Instance details

Defined in DynFlags

data TrustFlag #

Flags for manipulating package trust.

Constructors

TrustPackage String
-trust
DistrustPackage String
-distrust

Instances

Instances details
Eq TrustFlag 
Instance details

Defined in DynFlags

data PackageFlag #

Flags for manipulating packages visibility.

Constructors

ExposePackage String PackageArg ModRenaming

-package, -package-id

HidePackage String
-hide-package

Instances

Instances details
Eq PackageFlag 
Instance details

Defined in DynFlags

Outputable PackageFlag 
Instance details

Defined in DynFlags

data PackageDBFlag #

Instances

Instances details
Eq PackageDBFlag 
Instance details

Defined in DynFlags

data DynLibLoader #

Instances

Instances details
Eq DynLibLoader 
Instance details

Defined in DynFlags

data Way #

Instances

Instances details
Eq Way 
Instance details

Defined in DynFlags

Methods

(==) :: Way -> Way -> Bool #

(/=) :: Way -> Way -> Bool #

Ord Way 
Instance details

Defined in DynFlags

Methods

compare :: Way -> Way -> Ordering #

(<) :: Way -> Way -> Bool #

(<=) :: Way -> Way -> Bool #

(>) :: Way -> Way -> Bool #

(>=) :: Way -> Way -> Bool #

max :: Way -> Way -> Way #

min :: Way -> Way -> Way #

Show Way 
Instance details

Defined in DynFlags

Methods

showsPrec :: Int -> Way -> ShowS #

show :: Way -> String #

showList :: [Way] -> ShowS #

type FatalMessager = String -> IO () #

newtype FlushOut #

Constructors

FlushOut (IO ()) 

newtype FlushErr #

Constructors

FlushErr (IO ()) 

data FlagSpec flag #

Constructors

FlagSpec 

Fields

data PkgConfRef #

Instances

Instances details
Eq PkgConfRef 
Instance details

Defined in DynFlags

data LinkerInfo #

Instances

Instances details
Eq LinkerInfo 
Instance details

Defined in DynFlags

data CompilerInfo #

Instances

Instances details
Eq CompilerInfo 
Instance details

Defined in DynFlags

data FilesToClean #

A collection of files that must be deleted before ghc exits. The current collection is stored in an IORef in DynFlags, filesToClean.

Constructors

FilesToClean 

Fields

data HscSource #

Constructors

HsSrcFile 
HsBootFile 
HsigFile 

Instances

Instances details
Eq HscSource 
Instance details

Defined in DriverPhases

Ord HscSource 
Instance details

Defined in DriverPhases

Show HscSource 
Instance details

Defined in DriverPhases

Binary HscSource 
Instance details

Defined in DriverPhases

data Phase #

Instances

Instances details
Eq Phase 
Instance details

Defined in DriverPhases

Methods

(==) :: Phase -> Phase -> Bool #

(/=) :: Phase -> Phase -> Bool #

Show Phase 
Instance details

Defined in DriverPhases

Methods

showsPrec :: Int -> Phase -> ShowS #

show :: Phase -> String #

showList :: [Phase] -> ShowS #

Outputable Phase 
Instance details

Defined in DriverPhases

Methods

ppr :: Phase -> SDoc #

pprPrec :: Rational -> Phase -> SDoc #

mkModuleEnv :: [(Module, a)] -> ModuleEnv a #

mapModuleEnv :: (a -> b) -> ModuleEnv a -> ModuleEnv b #

plusModuleEnv_C :: (a -> a -> a) -> ModuleEnv a -> ModuleEnv a -> ModuleEnv a #

extendModuleEnvList_C :: (a -> a -> a) -> ModuleEnv a -> [(Module, a)] -> ModuleEnv a #

extendModuleEnvWith :: (a -> a -> a) -> ModuleEnv a -> Module -> a -> ModuleEnv a #

mainUnitId :: UnitId #

This is the package Id for the current program. It is the default package Id if you don't specify a package name. We don't add this prefix to symbol names, since there can be only one main package per program.

splitModuleInsts :: Module -> (InstalledModule, Maybe IndefModule) #

Given a possibly on-the-fly instantiated module, split it into a Module that we definitely can find on-disk, as well as an instantiation if we need to instantiate it on the fly. If the instantiation is Nothing no on-the-fly renaming is needed.

renameHoleUnitId' :: PackageConfigMap -> ShHoleSubst -> UnitId -> UnitId #

Like 'renameHoleUnitId, but requires only PackageConfigMap so it can be used by Packages.

renameHoleModule' :: PackageConfigMap -> ShHoleSubst -> Module -> Module #

Like renameHoleModule, but requires only PackageConfigMap so it can be used by Packages.

renameHoleUnitId :: DynFlags -> ShHoleSubst -> UnitId -> UnitId #

Substitutes holes in a UnitId, suitable for renaming when an include occurs; see Note [Representation of module/name variable].

p[A=A] maps to p[A=B] with A=B.

renameHoleModule :: DynFlags -> ShHoleSubst -> Module -> Module #

Substitutes holes in a Module. NOT suitable for being called directly on a nameModule, see Note [Representation of module/name variable]. p[A=A]:B maps to p[A=q():A]:B with A=q():A; similarly, A maps to q():A.

fsToUnitId :: FastString -> UnitId #

Create a new simple unit identifier from a FastString. Internally, this is primarily used to specify wired-in unit identifiers.

newSimpleUnitId :: ComponentId -> UnitId #

Create a new simple unit identifier (no holes) from a ComponentId.

stableUnitIdCmp :: UnitId -> UnitId -> Ordering #

Compares package ids lexically, rather than by their Uniques

newUnitId :: ComponentId -> [(ModuleName, Module)] -> UnitId #

Create a new, un-hashed unit identifier.

hashUnitId :: ComponentId -> [(ModuleName, Module)] -> FastString #

Generate a uniquely identifying FastString for a unit identifier. This is a one-way function. You can rely on one special property: if a unit identifier is in most general form, its FastString coincides with its ComponentId. This hash is completely internal to GHC and is not used for symbol names or file paths.

unitIdIsDefinite :: UnitId -> Bool #

A UnitId is definite if it has no free holes.

unitIdFreeHoles :: UnitId -> UniqDSet ModuleName #

Retrieve the set of free holes of a UnitId.

installedUnitIdEq :: InstalledUnitId -> UnitId -> Bool #

Test if a UnitId corresponds to a given InstalledUnitId, modulo instantiation.

installedModuleEq :: InstalledModule -> Module -> Bool #

Test if a Module corresponds to a given InstalledModule, modulo instantiation.

toInstalledUnitId :: UnitId -> InstalledUnitId #

Lossy conversion to the on-disk InstalledUnitId for a component.

indefUnitIdToUnitId :: DynFlags -> IndefUnitId -> UnitId #

Injects an IndefUnitId (indefinite library which was on-the-fly instantiated) to a UnitId (either an indefinite or definite library).

newIndefUnitId :: ComponentId -> [(ModuleName, Module)] -> IndefUnitId #

Create a new IndefUnitId given an explicit module substitution.

stableModuleCmp :: Module -> Module -> Ordering #

This gives a stable ordering, as opposed to the Ord instance which gives an ordering based on the Uniques of the components, which may not be stable from run to run of the compiler.

mkHoleModule :: ModuleName -> Module #

Create a module variable at some ModuleName. See Note [Representation of module/name variables]

moduleIsDefinite :: Module -> Bool #

A Module is definite if it has no free holes.

moduleFreeHoles :: Module -> UniqDSet ModuleName #

Calculate the free holes of a Module. If this set is non-empty, this module was defined in an indefinite library that had required signatures.

If a module has free holes, that means that substitutions can operate on it; if it has no free holes, substituting over a module has no effect.

moduleNameColons :: ModuleName -> String #

Returns the string version of the module name, with dots replaced by colons.

moduleNameSlashes :: ModuleName -> String #

Returns the string version of the module name, with dots replaced by slashes.

moduleStableString :: Module -> String #

Get a string representation of a Module that's unique and stable across recompilations. eg. "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal"

stableModuleNameCmp :: ModuleName -> ModuleName -> Ordering #

Compares module names lexically, rather than by their Uniques

addBootSuffixLocnOut :: ModLocation -> ModLocation #

Add the -boot suffix to all output file paths associated with the module, not including the input file itself

addBootSuffixLocn :: ModLocation -> ModLocation #

Add the -boot suffix to all file paths associated with the module

addBootSuffix_maybe :: Bool -> FilePath -> FilePath #

Add the -boot suffix if the Bool argument is True

addBootSuffix :: FilePath -> FilePath #

Add the -boot suffix to .hs, .hi and .o files

data ModLocation #

Module Location

Where a module lives on the file system: the actual locations of the .hs, .hi and .o files, if we have them

Instances

Instances details
Show ModLocation 
Instance details

Defined in Module

Outputable ModLocation 
Instance details

Defined in Module

class ContainsModule t where #

Methods

extractModule :: t -> Module #

Instances

Instances details
ContainsModule DsGblEnv 
Instance details

Defined in TcRnTypes

ContainsModule TcGblEnv 
Instance details

Defined in TcRnTypes

ContainsModule gbl => ContainsModule (Env gbl lcl) 
Instance details

Defined in TcRnTypes

Methods

extractModule :: Env gbl lcl -> Module #

class HasModule (m :: Type -> Type) where #

Methods

getModule :: m Module #

Instances

Instances details
HasModule CoreM 
Instance details

Defined in CoreMonad

ContainsModule env => HasModule (IOEnv env) 
Instance details

Defined in IOEnv

Methods

getModule :: IOEnv env Module #

data IndefUnitId #

A unit identifier which identifies an indefinite library (with holes) that has been *on-the-fly* instantiated with a substitution indefUnitIdInsts. In fact, an indefinite unit identifier could have no holes, but we haven't gotten around to compiling the actual library yet.

An indefinite unit identifier pretty-prints to something like p[H=H,A=aimpl:A>] (p is the ComponentId, and the brackets enclose the module substitution).

Constructors

IndefUnitId 

Fields

Instances

Instances details
Eq IndefUnitId 
Instance details

Defined in Module

Ord IndefUnitId 
Instance details

Defined in Module

Binary IndefUnitId 
Instance details

Defined in Module

Outputable IndefUnitId 
Instance details

Defined in Module

newtype DefUnitId #

A DefUnitId is an InstalledUnitId with the invariant that it only refers to a definite library; i.e., one we have generated code for.

Constructors

DefUnitId 

Instances

Instances details
Eq DefUnitId 
Instance details

Defined in Module

Ord DefUnitId 
Instance details

Defined in Module

Binary DefUnitId 
Instance details

Defined in Module

Outputable DefUnitId 
Instance details

Defined in Module

data InstalledModuleEnv elt #

A map keyed off of InstalledModule

type ShHoleSubst = ModuleNameEnv Module #

Substitution on module variables, mapping module names to module identifiers.

data ModuleEnv elt #

A map keyed off of Modules

type ModuleSet = Set NDModule #

A set of Modules

type ModuleNameEnv elt = UniqFM elt #

A map keyed off of ModuleNames (actually, their Uniques)

type DModuleNameEnv elt = UniqDFM elt #

A map keyed off of ModuleNames (actually, their Uniques) Has deterministic folds and can be deterministically converted to a list

type FastStringEnv a = UniqFM a #

A non-deterministic set of FastStrings. See Note [Deterministic UniqFM] in UniqDFM for explanation why it's not deterministic and why it matters. Use DFastStringEnv if the set eventually gets converted into a list or folded over in a way where the order changes the generated code.

hasKey :: Uniquable a => a -> Unique -> Bool #

isValidKnownKeyUnique :: Unique -> Bool #

The interface file symbol-table encoding assumes that known-key uniques fit in 30-bits; verify this.

See Note [Symbol table representation of names] in BinIface for details.

data Unique #

Unique identifier.

The type of unique identifiers that are used in many places in GHC for fast ordering and equality tests. You should generate these with the functions from the UniqSupply module

These are sometimes also referred to as "keys" in comments in GHC.

Instances

Instances details
Eq Unique 
Instance details

Defined in Unique

Methods

(==) :: Unique -> Unique -> Bool #

(/=) :: Unique -> Unique -> Bool #

Show Unique 
Instance details

Defined in Unique

Uniquable Unique 
Instance details

Defined in Unique

Methods

getUnique :: Unique -> Unique #

Outputable Unique 
Instance details

Defined in Unique

Methods

ppr :: Unique -> SDoc #

pprPrec :: Rational -> Unique -> SDoc #

class Uniquable a where #

Class of things that we can obtain a Unique from

Methods

getUnique :: a -> Unique #

Instances

Instances details
Uniquable Int 
Instance details

Defined in Unique

Methods

getUnique :: Int -> Unique #

Uniquable EvBindsVar 
Instance details

Defined in TcEvidence

Uniquable LocalReg 
Instance details

Defined in CmmExpr

Methods

getUnique :: LocalReg -> Unique #

Uniquable Label 
Instance details

Defined in Hoopl.Label

Methods

getUnique :: Label -> Unique #

Uniquable Class 
Instance details

Defined in Class

Methods

getUnique :: Class -> Unique #

Uniquable CoAxiomRule 
Instance details

Defined in CoAxiom

Uniquable ConLike 
Instance details

Defined in ConLike

Methods

getUnique :: ConLike -> Unique #

Uniquable DataCon 
Instance details

Defined in DataCon

Methods

getUnique :: DataCon -> Unique #

Uniquable PatSyn 
Instance details

Defined in PatSyn

Methods

getUnique :: PatSyn -> Unique #

Uniquable Var 
Instance details

Defined in Var

Methods

getUnique :: Var -> Unique #

Uniquable SourcePackageId 
Instance details

Defined in PackageConfig

Uniquable PackageName 
Instance details

Defined in PackageConfig

Uniquable Unique 
Instance details

Defined in Unique

Methods

getUnique :: Unique -> Unique #

Uniquable Module 
Instance details

Defined in Module

Methods

getUnique :: Module -> Unique #

Uniquable ModuleName 
Instance details

Defined in Module

Uniquable UnitId 
Instance details

Defined in Module

Methods

getUnique :: UnitId -> Unique #

Uniquable InstalledUnitId 
Instance details

Defined in Module

Uniquable ComponentId 
Instance details

Defined in Module

Uniquable FastString 
Instance details

Defined in Unique

Uniquable TyCon 
Instance details

Defined in TyCon

Methods

getUnique :: TyCon -> Unique #

Uniquable OccName 
Instance details

Defined in OccName

Methods

getUnique :: OccName -> Unique #

Uniquable Name 
Instance details

Defined in Name

Methods

getUnique :: Name -> Unique #

Uniquable (CoAxiom br) 
Instance details

Defined in CoAxiom

Methods

getUnique :: CoAxiom br -> Unique #

Uniquable name => Uniquable (AnnTarget name) 
Instance details

Defined in Annotations

Methods

getUnique :: AnnTarget name -> Unique #

mkIntWithInf :: Int -> IntWithInf #

Inject any integer into an IntWithInf

treatZeroAsInf :: Int -> IntWithInf #

Turn a positive number into an IntWithInf, where 0 represents infinity

infinity :: IntWithInf #

A representation of infinity

pprWithSourceText :: SourceText -> SDoc -> SDoc #

Special combinator for showing string literals.

pprAlternative #

Arguments

:: (a -> SDoc)

The pretty printing function to use

-> a

The things to be pretty printed

-> ConTag

Alternative (one-based)

-> Arity

Arity

-> SDoc

SDoc where the alternative havs been pretty printed and finally packed into a paragraph.

Pretty print an alternative in an unboxed sum e.g. "| a | |".

unSwap :: SwapFlag -> (a -> a -> b) -> a -> a -> b #

noOneShotInfo :: OneShotInfo #

It is always safe to assume that an Id has no lambda-bound variable information

fIRST_TAG :: ConTag #

Tags are allocated from here for real constructors or for superclass selectors

pickLR :: LeftOrRight -> (a, a) -> a #

data LeftOrRight #

Constructors

CLeft 
CRight 

Instances

Instances details
Eq LeftOrRight 
Instance details

Defined in BasicTypes

Data LeftOrRight 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LeftOrRight -> c LeftOrRight #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LeftOrRight #

toConstr :: LeftOrRight -> Constr #

dataTypeOf :: LeftOrRight -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LeftOrRight) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LeftOrRight) #

gmapT :: (forall b. Data b => b -> b) -> LeftOrRight -> LeftOrRight #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LeftOrRight -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LeftOrRight -> r #

gmapQ :: (forall d. Data d => d -> u) -> LeftOrRight -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LeftOrRight -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LeftOrRight -> m LeftOrRight #

Outputable LeftOrRight 
Instance details

Defined in BasicTypes

type Arity = Int #

The number of value arguments that can be applied to a value before it does "real work". So: fib 100 has arity 0 x -> fib x has arity 1 See also Note [Definition of arity] in CoreArity

type RepArity = Int #

Representation Arity

The number of represented arguments that can be applied to a value before it does "real work". So: fib 100 has representation arity 0 x -> fib x has representation arity 1 () -> fib (x + y) has representation arity 2

type JoinArity = Int #

The number of arguments that a join point takes. Unlike the arity of a function, this is a purely syntactic property and is fixed when the join point is created (or converted from a value). Both type and value arguments are counted.

type ConTag = Int #

Constructor Tag

Type of the tags associated with each constructor possibility or superclass selector

type ConTagZ = Int #

A *zero-indexed* constructor tag

data Alignment #

A power-of-two alignment

Instances

Instances details
Eq Alignment 
Instance details

Defined in BasicTypes

Ord Alignment 
Instance details

Defined in BasicTypes

Outputable Alignment 
Instance details

Defined in BasicTypes

data OneShotInfo #

If the Id is a lambda-bound variable then it may have lambda-bound variable info. Sometimes we know whether the lambda binding this variable is a "one-shot" lambda; that is, whether it is applied at most once.

This information may be useful in optimisation, as computations may safely be floated inside such a lambda without risk of duplicating work.

Constructors

NoOneShotInfo

No information

OneShotLam

The lambda is applied at most once.

Instances

Instances details
Eq OneShotInfo 
Instance details

Defined in BasicTypes

Outputable OneShotInfo 
Instance details

Defined in BasicTypes

data SwapFlag #

Constructors

NotSwapped 
IsSwapped 

Instances

Instances details
Outputable SwapFlag 
Instance details

Defined in BasicTypes

data PromotionFlag #

Is a TyCon a promoted data constructor or just a normal type constructor?

Constructors

NotPromoted 
IsPromoted 

Instances

Instances details
Eq PromotionFlag 
Instance details

Defined in BasicTypes

Data PromotionFlag 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PromotionFlag -> c PromotionFlag #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PromotionFlag #

toConstr :: PromotionFlag -> Constr #

dataTypeOf :: PromotionFlag -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PromotionFlag) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PromotionFlag) #

gmapT :: (forall b. Data b => b -> b) -> PromotionFlag -> PromotionFlag #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PromotionFlag -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PromotionFlag -> r #

gmapQ :: (forall d. Data d => d -> u) -> PromotionFlag -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PromotionFlag -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PromotionFlag -> m PromotionFlag #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PromotionFlag -> m PromotionFlag #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PromotionFlag -> m PromotionFlag #

data FunctionOrData #

Constructors

IsFunction 
IsData 

Instances

Instances details
Eq FunctionOrData 
Instance details

Defined in BasicTypes

Data FunctionOrData 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FunctionOrData -> c FunctionOrData #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FunctionOrData #

toConstr :: FunctionOrData -> Constr #

dataTypeOf :: FunctionOrData -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FunctionOrData) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FunctionOrData) #

gmapT :: (forall b. Data b => b -> b) -> FunctionOrData -> FunctionOrData #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FunctionOrData -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FunctionOrData -> r #

gmapQ :: (forall d. Data d => d -> u) -> FunctionOrData -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FunctionOrData -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FunctionOrData -> m FunctionOrData #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FunctionOrData -> m FunctionOrData #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FunctionOrData -> m FunctionOrData #

Ord FunctionOrData 
Instance details

Defined in BasicTypes

Outputable FunctionOrData 
Instance details

Defined in BasicTypes

type Version = Int #

data StringLiteral #

A String Literal in the source, including its original raw format for use by source to source manipulation tools.

Constructors

StringLiteral 

Instances

Instances details
Eq StringLiteral 
Instance details

Defined in BasicTypes

Data StringLiteral 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StringLiteral -> c StringLiteral #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StringLiteral #

toConstr :: StringLiteral -> Constr #

dataTypeOf :: StringLiteral -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StringLiteral) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StringLiteral) #

gmapT :: (forall b. Data b => b -> b) -> StringLiteral -> StringLiteral #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StringLiteral -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StringLiteral -> r #

gmapQ :: (forall d. Data d => d -> u) -> StringLiteral -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StringLiteral -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StringLiteral -> m StringLiteral #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StringLiteral -> m StringLiteral #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StringLiteral -> m StringLiteral #

Outputable StringLiteral 
Instance details

Defined in BasicTypes

data WarningTxt #

Warning Text

reason/explanation from a WARNING or DEPRECATED pragma

Instances

Instances details
Eq WarningTxt 
Instance details

Defined in BasicTypes

Data WarningTxt 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WarningTxt -> c WarningTxt #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WarningTxt #

toConstr :: WarningTxt -> Constr #

dataTypeOf :: WarningTxt -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WarningTxt) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WarningTxt) #

gmapT :: (forall b. Data b => b -> b) -> WarningTxt -> WarningTxt #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WarningTxt -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WarningTxt -> r #

gmapQ :: (forall d. Data d => d -> u) -> WarningTxt -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WarningTxt -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> WarningTxt -> m WarningTxt #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WarningTxt -> m WarningTxt #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WarningTxt -> m WarningTxt #

Outputable WarningTxt 
Instance details

Defined in BasicTypes

data Fixity #

Instances

Instances details
Eq Fixity 
Instance details

Defined in BasicTypes

Methods

(==) :: Fixity -> Fixity -> Bool #

(/=) :: Fixity -> Fixity -> Bool #

Data Fixity 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity #

toConstr :: Fixity -> Constr #

dataTypeOf :: Fixity -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) #

gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r #

gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity #

Outputable Fixity 
Instance details

Defined in BasicTypes

Methods

ppr :: Fixity -> SDoc #

pprPrec :: Rational -> Fixity -> SDoc #

data FixityDirection #

Constructors

InfixL 
InfixR 
InfixN 

Instances

Instances details
Eq FixityDirection 
Instance details

Defined in BasicTypes

Data FixityDirection 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FixityDirection -> c FixityDirection #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FixityDirection #

toConstr :: FixityDirection -> Constr #

dataTypeOf :: FixityDirection -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FixityDirection) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FixityDirection) #

gmapT :: (forall b. Data b => b -> b) -> FixityDirection -> FixityDirection #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FixityDirection -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FixityDirection -> r #

gmapQ :: (forall d. Data d => d -> u) -> FixityDirection -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FixityDirection -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection #

Outputable FixityDirection 
Instance details

Defined in BasicTypes

data LexicalFixity #

Captures the fixity of declarations as they are parsed. This is not necessarily the same as the fixity declaration, as the normal fixity may be overridden using parens or backticks.

Constructors

Prefix 
Infix 

Instances

Instances details
Eq LexicalFixity 
Instance details

Defined in BasicTypes

Data LexicalFixity 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LexicalFixity -> c LexicalFixity #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LexicalFixity #

toConstr :: LexicalFixity -> Constr #

dataTypeOf :: LexicalFixity -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LexicalFixity) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LexicalFixity) #

gmapT :: (forall b. Data b => b -> b) -> LexicalFixity -> LexicalFixity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LexicalFixity -> r #

gmapQ :: (forall d. Data d => d -> u) -> LexicalFixity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LexicalFixity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LexicalFixity -> m LexicalFixity #

Outputable LexicalFixity 
Instance details

Defined in BasicTypes

data TopLevelFlag #

Constructors

TopLevel 
NotTopLevel 

Instances

Instances details
Outputable TopLevelFlag 
Instance details

Defined in BasicTypes

data Boxity #

Constructors

Boxed 
Unboxed 

Instances

Instances details
Eq Boxity 
Instance details

Defined in BasicTypes

Methods

(==) :: Boxity -> Boxity -> Bool #

(/=) :: Boxity -> Boxity -> Bool #

Data Boxity 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Boxity -> c Boxity #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Boxity #

toConstr :: Boxity -> Constr #

dataTypeOf :: Boxity -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Boxity) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Boxity) #

gmapT :: (forall b. Data b => b -> b) -> Boxity -> Boxity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r #

gmapQ :: (forall d. Data d => d -> u) -> Boxity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Boxity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity #

Outputable Boxity 
Instance details

Defined in BasicTypes

Methods

ppr :: Boxity -> SDoc #

pprPrec :: Rational -> Boxity -> SDoc #

data RecFlag #

Recursivity Flag

Constructors

Recursive 
NonRecursive 

Instances

Instances details
Eq RecFlag 
Instance details

Defined in BasicTypes

Methods

(==) :: RecFlag -> RecFlag -> Bool #

(/=) :: RecFlag -> RecFlag -> Bool #

Data RecFlag 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RecFlag -> c RecFlag #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RecFlag #

toConstr :: RecFlag -> Constr #

dataTypeOf :: RecFlag -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RecFlag) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RecFlag) #

gmapT :: (forall b. Data b => b -> b) -> RecFlag -> RecFlag #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RecFlag -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RecFlag -> r #

gmapQ :: (forall d. Data d => d -> u) -> RecFlag -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RecFlag -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RecFlag -> m RecFlag #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RecFlag -> m RecFlag #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RecFlag -> m RecFlag #

Outputable RecFlag 
Instance details

Defined in BasicTypes

Methods

ppr :: RecFlag -> SDoc #

pprPrec :: Rational -> RecFlag -> SDoc #

data Origin #

Constructors

FromSource 
Generated 

Instances

Instances details
Eq Origin 
Instance details

Defined in BasicTypes

Methods

(==) :: Origin -> Origin -> Bool #

(/=) :: Origin -> Origin -> Bool #

Data Origin 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Origin -> c Origin #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Origin #

toConstr :: Origin -> Constr #

dataTypeOf :: Origin -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Origin) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Origin) #

gmapT :: (forall b. Data b => b -> b) -> Origin -> Origin #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Origin -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Origin -> r #

gmapQ :: (forall d. Data d => d -> u) -> Origin -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Origin -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Origin -> m Origin #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Origin -> m Origin #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Origin -> m Origin #

Outputable Origin 
Instance details

Defined in BasicTypes

Methods

ppr :: Origin -> SDoc #

pprPrec :: Rational -> Origin -> SDoc #

data OverlapFlag #

The semantics allowed for overlapping instances for a particular instance. See Note [Safe Haskell isSafeOverlap] (in hs) for a explanation of the isSafeOverlap field.

Instances

Instances details
Eq OverlapFlag 
Instance details

Defined in BasicTypes

Data OverlapFlag 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverlapFlag -> c OverlapFlag #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverlapFlag #

toConstr :: OverlapFlag -> Constr #

dataTypeOf :: OverlapFlag -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverlapFlag) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverlapFlag) #

gmapT :: (forall b. Data b => b -> b) -> OverlapFlag -> OverlapFlag #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverlapFlag -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverlapFlag -> r #

gmapQ :: (forall d. Data d => d -> u) -> OverlapFlag -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> OverlapFlag -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverlapFlag -> m OverlapFlag #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapFlag -> m OverlapFlag #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapFlag -> m OverlapFlag #

Outputable OverlapFlag 
Instance details

Defined in BasicTypes

data OverlapMode #

Constructors

NoOverlap SourceText

This instance must not overlap another NoOverlap instance. However, it may be overlapped by Overlapping instances, and it may overlap Overlappable instances.

Overlappable SourceText

Silently ignore this instance if you find a more specific one that matches the constraint you are trying to resolve

Example: constraint (Foo [Int]) instance Foo [Int] instance {--} Foo [a]

Since the second instance has the Overlappable flag, the first instance will be chosen (otherwise its ambiguous which to choose)

Overlapping SourceText

Silently ignore any more general instances that may be used to solve the constraint.

Example: constraint (Foo [Int]) instance {--} Foo [Int] instance Foo [a]

Since the first instance has the Overlapping flag, the second---more general---instance will be ignored (otherwise it is ambiguous which to choose)

Overlaps SourceText

Equivalent to having both Overlapping and Overlappable flags.

Incoherent SourceText

Behave like Overlappable and Overlapping, and in addition pick an an arbitrary one if there are multiple matching candidates, and don't worry about later instantiation

Example: constraint (Foo [b]) instance {-# INCOHERENT -} Foo [Int] instance Foo [a] Without the Incoherent flag, we'd complain that instantiating b would change which instance was chosen. See also note [Incoherent instances] in InstEnv

Instances

Instances details
Eq OverlapMode 
Instance details

Defined in BasicTypes

Data OverlapMode 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OverlapMode -> c OverlapMode #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OverlapMode #

toConstr :: OverlapMode -> Constr #

dataTypeOf :: OverlapMode -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OverlapMode) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OverlapMode) #

gmapT :: (forall b. Data b => b -> b) -> OverlapMode -> OverlapMode #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OverlapMode -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OverlapMode -> r #

gmapQ :: (forall d. Data d => d -> u) -> OverlapMode -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> OverlapMode -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> OverlapMode -> m OverlapMode #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapMode -> m OverlapMode #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OverlapMode -> m OverlapMode #

Outputable OverlapMode 
Instance details

Defined in BasicTypes

newtype PprPrec #

A general-purpose pretty-printing precedence type.

Constructors

PprPrec Int 

Instances

Instances details
Eq PprPrec 
Instance details

Defined in BasicTypes

Methods

(==) :: PprPrec -> PprPrec -> Bool #

(/=) :: PprPrec -> PprPrec -> Bool #

Ord PprPrec 
Instance details

Defined in BasicTypes

Show PprPrec 
Instance details

Defined in BasicTypes

data TupleSort #

Instances

Instances details
Eq TupleSort 
Instance details

Defined in BasicTypes

Data TupleSort 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TupleSort -> c TupleSort #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TupleSort #

toConstr :: TupleSort -> Constr #

dataTypeOf :: TupleSort -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TupleSort) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TupleSort) #

gmapT :: (forall b. Data b => b -> b) -> TupleSort -> TupleSort #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TupleSort -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TupleSort -> r #

gmapQ :: (forall d. Data d => d -> u) -> TupleSort -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TupleSort -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TupleSort -> m TupleSort #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TupleSort -> m TupleSort #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TupleSort -> m TupleSort #

Outputable TupleSort 
Instance details

Defined in BasicTypes

data EP a #

Embedding Projection pair

Constructors

EP 

Fields

data OccInfo #

identifier Occurrence Information

Constructors

ManyOccs

There are many occurrences, or unknown occurrences

IAmDead

Marks unused variables. Sometimes useful for lambda and case-bound variables.

OneOcc

Occurs exactly once (per branch), not inside a rule

IAmALoopBreaker

This identifier breaks a loop of mutually recursive functions. The field marks whether it is only a loop breaker due to a reference in a rule

Fields

Instances

Instances details
Eq OccInfo 
Instance details

Defined in BasicTypes

Methods

(==) :: OccInfo -> OccInfo -> Bool #

(/=) :: OccInfo -> OccInfo -> Bool #

Outputable OccInfo 
Instance details

Defined in BasicTypes

Methods

ppr :: OccInfo -> SDoc #

pprPrec :: Rational -> OccInfo -> SDoc #

type InterestingCxt = Bool #

Interesting Context

type InsideLam = Bool #

Inside Lambda

data TailCallInfo #

Instances

Instances details
Eq TailCallInfo 
Instance details

Defined in BasicTypes

Outputable TailCallInfo 
Instance details

Defined in BasicTypes

data DefMethSpec ty #

Default Method Specification

Constructors

VanillaDM 
GenericDM ty 

Instances

Instances details
Binary (DefMethSpec IfaceType) 
Instance details

Defined in IfaceType

Outputable (DefMethSpec ty) 
Instance details

Defined in BasicTypes

Methods

ppr :: DefMethSpec ty -> SDoc #

pprPrec :: Rational -> DefMethSpec ty -> SDoc #

data SuccessFlag #

Constructors

Succeeded 
Failed 

Instances

Instances details
Outputable SuccessFlag 
Instance details

Defined in BasicTypes

data SourceText #

Constructors

SourceText String 
NoSourceText

For when code is generated, e.g. TH, deriving. The pretty printer will then make its own representation of the item.

Instances

Instances details
Eq SourceText 
Instance details

Defined in BasicTypes

Data SourceText 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceText -> c SourceText #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceText #

toConstr :: SourceText -> Constr #

dataTypeOf :: SourceText -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceText) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceText) #

gmapT :: (forall b. Data b => b -> b) -> SourceText -> SourceText #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceText -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceText -> r #

gmapQ :: (forall d. Data d => d -> u) -> SourceText -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceText -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceText -> m SourceText #

Show SourceText 
Instance details

Defined in BasicTypes

Outputable SourceText 
Instance details

Defined in BasicTypes

type PhaseNum = Int #

Phase Number

data CompilerPhase #

Constructors

Phase PhaseNum 
InitialPhase 

Instances

Instances details
Outputable CompilerPhase 
Instance details

Defined in BasicTypes

data Activation #

Instances

Instances details
Eq Activation 
Instance details

Defined in BasicTypes

Data Activation 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Activation -> c Activation #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Activation #

toConstr :: Activation -> Constr #

dataTypeOf :: Activation -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Activation) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Activation) #

gmapT :: (forall b. Data b => b -> b) -> Activation -> Activation #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Activation -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Activation -> r #

gmapQ :: (forall d. Data d => d -> u) -> Activation -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Activation -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Activation -> m Activation #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Activation -> m Activation #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Activation -> m Activation #

Outputable Activation 
Instance details

Defined in BasicTypes

data RuleMatchInfo #

Rule Match Information

Constructors

ConLike 
FunLike 

Instances

Instances details
Eq RuleMatchInfo 
Instance details

Defined in BasicTypes

Data RuleMatchInfo 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RuleMatchInfo -> c RuleMatchInfo #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RuleMatchInfo #

toConstr :: RuleMatchInfo -> Constr #

dataTypeOf :: RuleMatchInfo -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RuleMatchInfo) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RuleMatchInfo) #

gmapT :: (forall b. Data b => b -> b) -> RuleMatchInfo -> RuleMatchInfo #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RuleMatchInfo -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RuleMatchInfo -> r #

gmapQ :: (forall d. Data d => d -> u) -> RuleMatchInfo -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RuleMatchInfo -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RuleMatchInfo -> m RuleMatchInfo #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleMatchInfo -> m RuleMatchInfo #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleMatchInfo -> m RuleMatchInfo #

Show RuleMatchInfo 
Instance details

Defined in BasicTypes

Outputable RuleMatchInfo 
Instance details

Defined in BasicTypes

data InlinePragma #

Instances

Instances details
Eq InlinePragma 
Instance details

Defined in BasicTypes

Data InlinePragma 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InlinePragma -> c InlinePragma #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InlinePragma #

toConstr :: InlinePragma -> Constr #

dataTypeOf :: InlinePragma -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InlinePragma) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InlinePragma) #

gmapT :: (forall b. Data b => b -> b) -> InlinePragma -> InlinePragma #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InlinePragma -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InlinePragma -> r #

gmapQ :: (forall d. Data d => d -> u) -> InlinePragma -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> InlinePragma -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> InlinePragma -> m InlinePragma #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InlinePragma -> m InlinePragma #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InlinePragma -> m InlinePragma #

Outputable InlinePragma 
Instance details

Defined in BasicTypes

data InlineSpec #

Inline Specification

Instances

Instances details
Eq InlineSpec 
Instance details

Defined in BasicTypes

Data InlineSpec 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InlineSpec -> c InlineSpec #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InlineSpec #

toConstr :: InlineSpec -> Constr #

dataTypeOf :: InlineSpec -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InlineSpec) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InlineSpec) #

gmapT :: (forall b. Data b => b -> b) -> InlineSpec -> InlineSpec #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InlineSpec -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InlineSpec -> r #

gmapQ :: (forall d. Data d => d -> u) -> InlineSpec -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> InlineSpec -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InlineSpec -> m InlineSpec #

Show InlineSpec 
Instance details

Defined in BasicTypes

Outputable InlineSpec 
Instance details

Defined in BasicTypes

data IntegralLit #

Integral Literal

Used (instead of Integer) to represent negative zegative zero which is required for NegativeLiterals extension to correctly parse `-0::Double` as negative zero. See also #13211.

Constructors

IL 

Instances

Instances details
Eq IntegralLit 
Instance details

Defined in BasicTypes

Data IntegralLit 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntegralLit -> c IntegralLit #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IntegralLit #

toConstr :: IntegralLit -> Constr #

dataTypeOf :: IntegralLit -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IntegralLit) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IntegralLit) #

gmapT :: (forall b. Data b => b -> b) -> IntegralLit -> IntegralLit #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntegralLit -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntegralLit -> r #

gmapQ :: (forall d. Data d => d -> u) -> IntegralLit -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntegralLit -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntegralLit -> m IntegralLit #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntegralLit -> m IntegralLit #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntegralLit -> m IntegralLit #

Ord IntegralLit 
Instance details

Defined in BasicTypes

Show IntegralLit 
Instance details

Defined in BasicTypes

Outputable IntegralLit 
Instance details

Defined in BasicTypes

data FractionalLit #

Fractional Literal

Used (instead of Rational) to represent exactly the floating point literal that we encountered in the user's source program. This allows us to pretty-print exactly what the user wrote, which is important e.g. for floating point numbers that can't represented as Doubles (we used to via Double for pretty-printing). See also #2245.

Constructors

FL 

Instances

Instances details
Eq FractionalLit 
Instance details

Defined in BasicTypes

Data FractionalLit 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FractionalLit -> c FractionalLit #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FractionalLit #

toConstr :: FractionalLit -> Constr #

dataTypeOf :: FractionalLit -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FractionalLit) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FractionalLit) #

gmapT :: (forall b. Data b => b -> b) -> FractionalLit -> FractionalLit #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FractionalLit -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FractionalLit -> r #

gmapQ :: (forall d. Data d => d -> u) -> FractionalLit -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FractionalLit -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FractionalLit -> m FractionalLit #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FractionalLit -> m FractionalLit #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FractionalLit -> m FractionalLit #

Ord FractionalLit 
Instance details

Defined in BasicTypes

Show FractionalLit 
Instance details

Defined in BasicTypes

Outputable FractionalLit 
Instance details

Defined in BasicTypes

data SpliceExplicitFlag #

Constructors

ExplicitSplice

= $(f x y)

ImplicitSplice

= f x y, i.e. a naked top level expression

Instances

Instances details
Data SpliceExplicitFlag 
Instance details

Defined in BasicTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpliceExplicitFlag -> c SpliceExplicitFlag #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SpliceExplicitFlag #

toConstr :: SpliceExplicitFlag -> Constr #

dataTypeOf :: SpliceExplicitFlag -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SpliceExplicitFlag) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SpliceExplicitFlag) #

gmapT :: (forall b. Data b => b -> b) -> SpliceExplicitFlag -> SpliceExplicitFlag #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpliceExplicitFlag -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpliceExplicitFlag -> r #

gmapQ :: (forall d. Data d => d -> u) -> SpliceExplicitFlag -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SpliceExplicitFlag -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag #

data TypeOrKind #

Flag to see whether we're type-checking terms or kind-checking types

Constructors

TypeLevel 
KindLevel 

Instances

Instances details
Eq TypeOrKind 
Instance details

Defined in BasicTypes

Outputable TypeOrKind 
Instance details

Defined in BasicTypes

mkLocMessage :: Severity -> SrcSpan -> MsgDoc -> MsgDoc #

Make an unannotated error message with location info.

mkLocMessageAnn #

Arguments

:: Maybe String

optional annotation

-> Severity

severity

-> SrcSpan

location

-> MsgDoc

message

-> MsgDoc 

Make a possibly annotated error message with location info.

dumpSDoc :: DynFlags -> PrintUnqualified -> DumpFlag -> String -> SDoc -> IO () #

A wrapper around dumpSDocWithStyle which uses PprDump style.

data Severity #

Constructors

SevOutput 
SevFatal 
SevInteractive 
SevDump

Log message intended for compiler developers No filelinecolumn stuff

SevInfo

Log messages intended for end users. No filelinecolumn stuff.

SevWarning 
SevError

SevWarning and SevError are used for warnings and errors o The message has a filelinecolumn heading, plus "warning:" or "error:", added by mkLocMessags o Output is intended for end users

Instances

Instances details
Show Severity 
Instance details

Defined in ErrUtils

ToJson Severity 
Instance details

Defined in ErrUtils

Methods

json :: Severity -> JsonDoc #

type MsgDoc = SDoc #

liftL :: (HasSrcSpan a, HasSrcSpan b, Monad m) => (SrcSpanLess a -> m (SrcSpanLess b)) -> a -> m b #

onHasSrcSpan :: (HasSrcSpan a, HasSrcSpan b) => (SrcSpanLess a -> SrcSpanLess b) -> a -> b #

Lifts a function of undecorated entities to one of decorated ones

cL :: HasSrcSpan a => SrcSpan -> SrcSpanLess a -> a #

An abbreviated form of composeSrcSpan, mainly to replace the hardcoded L

dL :: HasSrcSpan a => a -> Located (SrcSpanLess a) #

An abbreviated form of decomposeSrcSpan, mainly to be used in ViewPatterns

isSubspanOf #

Arguments

:: SrcSpan

The span that may be enclosed by the other

-> SrcSpan

The span it may be enclosed by

-> Bool 

Determines whether a span is enclosed by another one

spans :: SrcSpan -> (Int, Int) -> Bool #

Determines whether a span encloses a given line and column index

leftmost_largest :: SrcSpan -> SrcSpan -> Ordering #

Alternative strategies for ordering SrcSpans

leftmost_smallest :: SrcSpan -> SrcSpan -> Ordering #

Alternative strategies for ordering SrcSpans

rightmost :: SrcSpan -> SrcSpan -> Ordering #

Alternative strategies for ordering SrcSpans

cmpLocated :: (HasSrcSpan a, Ord (SrcSpanLess a)) => a -> a -> Ordering #

Tests the ordering of the two located things

eqLocated :: (HasSrcSpan a, Eq (SrcSpanLess a)) => a -> a -> Bool #

Tests whether the two located things are equal

addCLoc :: (HasSrcSpan a, HasSrcSpan b, HasSrcSpan c) => a -> b -> SrcSpanLess c -> c #

Combine locations from two Located things and add them to a third thing

combineLocs :: (HasSrcSpan a, HasSrcSpan b) => a -> b -> SrcSpan #

noLoc :: HasSrcSpan a => SrcSpanLess a -> a #

getLoc :: HasSrcSpan a => a -> SrcSpan #

unLoc :: HasSrcSpan a => a -> SrcSpanLess a #

mapLoc :: (a -> b) -> GenLocated l a -> GenLocated l b #

srcSpanFileName_maybe :: SrcSpan -> Maybe FastString #

Obtains the filename for a SrcSpan if it is "good"

srcSpanEnd :: SrcSpan -> SrcLoc #

Returns the location at the end of the SrcSpan or a "bad" SrcSpan if that is unavailable

srcSpanStart :: SrcSpan -> SrcLoc #

Returns the location at the start of the SrcSpan or a "bad" SrcSpan if that is unavailable

containsSpan :: RealSrcSpan -> RealSrcSpan -> Bool #

Tests whether the first span "contains" the other span, meaning that it covers at least as much source code. True where spans are equal.

isOneLineSpan :: SrcSpan -> Bool #

True if the span is known to straddle only one line. For "bad" SrcSpan, it returns False

isGoodSrcSpan :: SrcSpan -> Bool #

Test if a SrcSpan is "good", i.e. has precise location information

srcSpanFirstCharacter :: SrcSpan -> SrcSpan #

Convert a SrcSpan into one that represents only its first character

combineSrcSpans :: SrcSpan -> SrcSpan -> SrcSpan #

Combines two SrcSpan into one that spans at least all the characters within both spans. Returns UnhelpfulSpan if the files differ.

mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan #

Create a SrcSpan between two points in a file

mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan #

Create a SrcSpan between two points in a file

srcLocSpan :: SrcLoc -> SrcSpan #

Create a SrcSpan corresponding to a single point

mkGeneralSrcSpan :: FastString -> SrcSpan #

Create a "bad" SrcSpan that has not location information

interactiveSrcSpan :: SrcSpan #

Built-in "bad" SrcSpans for common sources of location uncertainty

wiredInSrcSpan :: SrcSpan #

Built-in "bad" SrcSpans for common sources of location uncertainty

noSrcSpan :: SrcSpan #

Built-in "bad" SrcSpans for common sources of location uncertainty

sortLocated :: HasSrcSpan a => [a] -> [a] #

advanceSrcLoc :: RealSrcLoc -> Char -> RealSrcLoc #

Move the SrcLoc down by one line if the character is a newline, to the next 8-char tabstop if it is a tab, and across by one character in any other case

srcLocCol :: RealSrcLoc -> Int #

Raises an error when used on a "bad" SrcLoc

srcLocLine :: RealSrcLoc -> Int #

Raises an error when used on a "bad" SrcLoc

srcLocFile :: RealSrcLoc -> FastString #

Gives the filename of the RealSrcLoc

mkGeneralSrcLoc :: FastString -> SrcLoc #

Creates a "bad" SrcLoc that has no detailed information about its location

interactiveSrcLoc :: SrcLoc #

Built-in "bad" SrcLoc values for particular locations

generatedSrcLoc :: SrcLoc #

Built-in "bad" SrcLoc values for particular locations

noSrcLoc :: SrcLoc #

Built-in "bad" SrcLoc values for particular locations

pattern LL :: HasSrcSpan a => SrcSpan -> SrcSpanLess a -> a #

A Pattern Synonym to Set/Get SrcSpans

data RealSrcLoc #

Real Source Location

Represents a single point within a file

Instances

Instances details
Eq RealSrcLoc 
Instance details

Defined in SrcLoc

Ord RealSrcLoc 
Instance details

Defined in SrcLoc

Show RealSrcLoc 
Instance details

Defined in SrcLoc

Outputable RealSrcLoc 
Instance details

Defined in SrcLoc

data SrcLoc #

Source Location

Instances

Instances details
Eq SrcLoc 
Instance details

Defined in SrcLoc

Methods

(==) :: SrcLoc -> SrcLoc -> Bool #

(/=) :: SrcLoc -> SrcLoc -> Bool #

Ord SrcLoc 
Instance details

Defined in SrcLoc

Show SrcLoc 
Instance details

Defined in SrcLoc

Outputable SrcLoc 
Instance details

Defined in SrcLoc

Methods

ppr :: SrcLoc -> SDoc #

pprPrec :: Rational -> SrcLoc -> SDoc #

data RealSrcSpan #

A RealSrcSpan delimits a portion of a text file. It could be represented by a pair of (line,column) coordinates, but in fact we optimise slightly by using more compact representations for single-line and zero-length spans, both of which are quite common.

The end position is defined to be the column after the end of the span. That is, a span of (1,1)-(1,2) is one character long, and a span of (1,1)-(1,1) is zero characters long.

Real Source Span

Instances

Instances details
Eq RealSrcSpan 
Instance details

Defined in SrcLoc

Data RealSrcSpan 
Instance details

Defined in SrcLoc

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RealSrcSpan -> c RealSrcSpan #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RealSrcSpan #

toConstr :: RealSrcSpan -> Constr #

dataTypeOf :: RealSrcSpan -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RealSrcSpan) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RealSrcSpan) #

gmapT :: (forall b. Data b => b -> b) -> RealSrcSpan -> RealSrcSpan #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RealSrcSpan -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RealSrcSpan -> r #

gmapQ :: (forall d. Data d => d -> u) -> RealSrcSpan -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RealSrcSpan -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RealSrcSpan -> m RealSrcSpan #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RealSrcSpan -> m RealSrcSpan #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RealSrcSpan -> m RealSrcSpan #

Ord RealSrcSpan 
Instance details

Defined in SrcLoc

Show RealSrcSpan 
Instance details

Defined in SrcLoc

ToJson RealSrcSpan 
Instance details

Defined in SrcLoc

Methods

json :: RealSrcSpan -> JsonDoc #

Outputable RealSrcSpan 
Instance details

Defined in SrcLoc

FromJSON RealSrcSpan 
Instance details

Defined in Language.Haskell.Liquid.Types.Errors

Methods

parseJSON :: Value -> Parser RealSrcSpan

parseJSONList :: Value -> Parser [RealSrcSpan]

ToJSON RealSrcSpan 
Instance details

Defined in Language.Haskell.Liquid.Types.Errors

Methods

toJSON :: RealSrcSpan -> Value

toEncoding :: RealSrcSpan -> Encoding

toJSONList :: [RealSrcSpan] -> Value

toEncodingList :: [RealSrcSpan] -> Encoding

data SrcSpan #

Source Span

A SrcSpan identifies either a specific portion of a text file or a human-readable description of a location.

Instances

Instances details
Eq SrcSpan 
Instance details

Defined in SrcLoc

Methods

(==) :: SrcSpan -> SrcSpan -> Bool #

(/=) :: SrcSpan -> SrcSpan -> Bool #

Data SrcSpan 
Instance details

Defined in SrcLoc

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcSpan -> c SrcSpan #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcSpan #

toConstr :: SrcSpan -> Constr #

dataTypeOf :: SrcSpan -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcSpan) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcSpan) #

gmapT :: (forall b. Data b => b -> b) -> SrcSpan -> SrcSpan #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcSpan -> r #

gmapQ :: (forall d. Data d => d -> u) -> SrcSpan -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcSpan -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpan -> m SrcSpan #

Ord SrcSpan 
Instance details

Defined in SrcLoc

Show SrcSpan 
Instance details

Defined in SrcLoc

NFData SrcSpan 
Instance details

Defined in SrcLoc

Methods

rnf :: SrcSpan -> () #

ToJson SrcSpan 
Instance details

Defined in SrcLoc

Methods

json :: SrcSpan -> JsonDoc #

Outputable SrcSpan 
Instance details

Defined in SrcLoc

Methods

ppr :: SrcSpan -> SDoc #

pprPrec :: Rational -> SrcSpan -> SDoc #

PPrint SrcSpan # 
Instance details

Defined in Language.Haskell.Liquid.Types.Errors

Methods

pprintTidy :: Tidy -> SrcSpan -> Doc #

pprintPrec :: Int -> Tidy -> SrcSpan -> Doc #

Hashable SrcSpan 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

hashWithSalt :: Int -> SrcSpan -> Int

hash :: SrcSpan -> Int

FromJSON SrcSpan 
Instance details

Defined in Language.Haskell.Liquid.Types.Errors

Methods

parseJSON :: Value -> Parser SrcSpan

parseJSONList :: Value -> Parser [SrcSpan]

FromJSONKey SrcSpan 
Instance details

Defined in Language.Haskell.Liquid.Types.Errors

Methods

fromJSONKey :: FromJSONKeyFunction SrcSpan

fromJSONKeyList :: FromJSONKeyFunction [SrcSpan]

ToJSON SrcSpan 
Instance details

Defined in Language.Haskell.Liquid.Types.Errors

Methods

toJSON :: SrcSpan -> Value

toEncoding :: SrcSpan -> Encoding

toJSONList :: [SrcSpan] -> Value

toEncodingList :: [SrcSpan] -> Encoding

ToJSONKey SrcSpan 
Instance details

Defined in Language.Haskell.Liquid.Types.Errors

Methods

toJSONKey :: ToJSONKeyFunction SrcSpan

toJSONKeyList :: ToJSONKeyFunction [SrcSpan]

NamedThing e => NamedThing (Located e) 
Instance details

Defined in Name

HasSrcSpan (Located a) 
Instance details

Defined in SrcLoc

data GenLocated l e #

We attach SrcSpans to lots of things, so let's have a datatype for it.

Constructors

L l e 

Instances

Instances details
Functor (GenLocated l) 
Instance details

Defined in SrcLoc

Methods

fmap :: (a -> b) -> GenLocated l a -> GenLocated l b #

(<$) :: a -> GenLocated l b -> GenLocated l a #

Foldable (GenLocated l) 
Instance details

Defined in SrcLoc

Methods

fold :: Monoid m => GenLocated l m -> m #

foldMap :: Monoid m => (a -> m) -> GenLocated l a -> m #

foldMap' :: Monoid m => (a -> m) -> GenLocated l a -> m #

foldr :: (a -> b -> b) -> b -> GenLocated l a -> b #

foldr' :: (a -> b -> b) -> b -> GenLocated l a -> b #

foldl :: (b -> a -> b) -> b -> GenLocated l a -> b #

foldl' :: (b -> a -> b) -> b -> GenLocated l a -> b #

foldr1 :: (a -> a -> a) -> GenLocated l a -> a #

foldl1 :: (a -> a -> a) -> GenLocated l a -> a #

toList :: GenLocated l a -> [a] #

null :: GenLocated l a -> Bool #

length :: GenLocated l a -> Int #

elem :: Eq a => a -> GenLocated l a -> Bool #

maximum :: Ord a => GenLocated l a -> a #

minimum :: Ord a => GenLocated l a -> a #

sum :: Num a => GenLocated l a -> a #

product :: Num a => GenLocated l a -> a #

Traversable (GenLocated l) 
Instance details

Defined in SrcLoc

Methods

traverse :: Applicative f => (a -> f b) -> GenLocated l a -> f (GenLocated l b) #

sequenceA :: Applicative f => GenLocated l (f a) -> f (GenLocated l a) #

mapM :: Monad m => (a -> m b) -> GenLocated l a -> m (GenLocated l b) #

sequence :: Monad m => GenLocated l (m a) -> m (GenLocated l a) #

NamedThing e => NamedThing (Located e) 
Instance details

Defined in Name

HasSrcSpan (Located a) 
Instance details

Defined in SrcLoc

(Eq l, Eq e) => Eq (GenLocated l e) 
Instance details

Defined in SrcLoc

Methods

(==) :: GenLocated l e -> GenLocated l e -> Bool #

(/=) :: GenLocated l e -> GenLocated l e -> Bool #

(Data l, Data e) => Data (GenLocated l e) 
Instance details

Defined in SrcLoc

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenLocated l e -> c (GenLocated l e) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GenLocated l e) #

toConstr :: GenLocated l e -> Constr #

dataTypeOf :: GenLocated l e -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GenLocated l e)) #

dataCast2 :: Typeable t => (forall d e0. (Data d, Data e0) => c (t d e0)) -> Maybe (c (GenLocated l e)) #

gmapT :: (forall b. Data b => b -> b) -> GenLocated l e -> GenLocated l e #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenLocated l e -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenLocated l e -> r #

gmapQ :: (forall d. Data d => d -> u) -> GenLocated l e -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GenLocated l e -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenLocated l e -> m (GenLocated l e) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenLocated l e -> m (GenLocated l e) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenLocated l e -> m (GenLocated l e) #

(Ord l, Ord e) => Ord (GenLocated l e) 
Instance details

Defined in SrcLoc

Methods

compare :: GenLocated l e -> GenLocated l e -> Ordering #

(<) :: GenLocated l e -> GenLocated l e -> Bool #

(<=) :: GenLocated l e -> GenLocated l e -> Bool #

(>) :: GenLocated l e -> GenLocated l e -> Bool #

(>=) :: GenLocated l e -> GenLocated l e -> Bool #

max :: GenLocated l e -> GenLocated l e -> GenLocated l e #

min :: GenLocated l e -> GenLocated l e -> GenLocated l e #

(Outputable l, Outputable e) => Outputable (GenLocated l e) 
Instance details

Defined in SrcLoc

Methods

ppr :: GenLocated l e -> SDoc #

pprPrec :: Rational -> GenLocated l e -> SDoc #

type SrcSpanLess (GenLocated l e) 
Instance details

Defined in SrcLoc

type SrcSpanLess (GenLocated l e) = e

type family SrcSpanLess a #

Determines the type of undecorated syntactic entities For most syntactic entities E, where source location spans are introduced by a wrapper construtor of the same syntactic entity, we have `SrcSpanLess E = E`. However, some syntactic entities have a different type compared to a syntactic entity `e :: E` may have the type `Located E` when decorated by wrapping it with `L sp e` for a source span sp.

Instances

Instances details
type SrcSpanLess Name 
Instance details

Defined in Name

type SrcSpanLess (GenLocated l e) 
Instance details

Defined in SrcLoc

type SrcSpanLess (GenLocated l e) = e

class HasSrcSpan a where #

A typeclass to set/get SrcSpans

Methods

composeSrcSpan :: Located (SrcSpanLess a) -> a #

Composes a SrcSpan decoration with an undecorated syntactic entity to form its decorated variant

decomposeSrcSpan :: a -> Located (SrcSpanLess a) #

Decomposes a decorated syntactic entity into its SrcSpan decoration and its undecorated variant

Instances

Instances details
HasSrcSpan Name 
Instance details

Defined in Name

HasSrcSpan (Located a) 
Instance details

Defined in SrcLoc

data PrintUnqualified #

When printing code that contains original names, we need to map the original names back to something the user understands. This is the purpose of the triple of functions that gets passed around when rendering SDoc.

data Module #

A Module is a pair of a UnitId and a ModuleName.

Module variables (i.e. H) which can be instantiated to a specific module at some later point in time are represented with moduleUnitId set to holeUnitId (this allows us to avoid having to make moduleUnitId a partial operation.)

Constructors

Module 

Instances

Instances details
Eq Module 
Instance details

Defined in Module

Methods

(==) :: Module -> Module -> Bool #

(/=) :: Module -> Module -> Bool #

Data Module 
Instance details

Defined in Module

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Module -> c Module #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Module #

toConstr :: Module -> Constr #

dataTypeOf :: Module -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Module) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Module) #

gmapT :: (forall b. Data b => b -> b) -> Module -> Module #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r #

gmapQ :: (forall d. Data d => d -> u) -> Module -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Module -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Module -> m Module #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Module -> m Module #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Module -> m Module #

Ord Module 
Instance details

Defined in Module

NFData Module 
Instance details

Defined in Module

Methods

rnf :: Module -> () #

Binary Module 
Instance details

Defined in Module

Methods

put_ :: BinHandle -> Module -> IO () #

put :: BinHandle -> Module -> IO (Bin Module) #

get :: BinHandle -> IO Module #

Uniquable Module 
Instance details

Defined in Module

Methods

getUnique :: Module -> Unique #

Outputable Module 
Instance details

Defined in Module

Methods

ppr :: Module -> SDoc #

pprPrec :: Rational -> Module -> SDoc #

DbUnitIdModuleRep InstalledUnitId ComponentId UnitId ModuleName Module 
Instance details

Defined in Module

data ModuleName #

A ModuleName is essentially a simple string, e.g. Data.List.

Instances

Instances details
Eq ModuleName 
Instance details

Defined in Module

Data ModuleName 
Instance details

Defined in Module

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModuleName -> c ModuleName #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModuleName #

toConstr :: ModuleName -> Constr #

dataTypeOf :: ModuleName -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ModuleName) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModuleName) #

gmapT :: (forall b. Data b => b -> b) -> ModuleName -> ModuleName #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModuleName -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModuleName -> r #

gmapQ :: (forall d. Data d => d -> u) -> ModuleName -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ModuleName -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName #

Ord ModuleName 
Instance details

Defined in Module

Show ModuleName # 
Instance details

Defined in Language.Haskell.Liquid.Types.Types

NFData ModuleName 
Instance details

Defined in Module

Methods

rnf :: ModuleName -> () #

Binary ModuleName 
Instance details

Defined in Module

Uniquable ModuleName 
Instance details

Defined in Module

Outputable ModuleName 
Instance details

Defined in Module

BinaryStringRep ModuleName 
Instance details

Defined in Module

Symbolic ModuleName 
Instance details

Defined in Language.Haskell.Liquid.Types.Types

Methods

symbol :: ModuleName -> Symbol

Hashable ModuleName 
Instance details

Defined in Language.Haskell.Liquid.Types.Types

DbUnitIdModuleRep InstalledUnitId ComponentId UnitId ModuleName Module 
Instance details

Defined in Module

data UnitId #

A unit identifier identifies a (possibly partially) instantiated library. It is primarily used as part of Module, which in turn is used in Name, which is used to give names to entities when typechecking.

There are two possible forms for a UnitId. It can be a DefiniteUnitId, in which case we just have a string that uniquely identifies some fully compiled, installed library we have on disk. However, when we are typechecking a library with missing holes, we may need to instantiate a library on the fly (in which case we don't have any on-disk representation.) In that case, you have an IndefiniteUnitId, which explicitly records the instantiation, so that we can substitute over it.

Instances

Instances details
Eq UnitId 
Instance details

Defined in Module

Methods

(==) :: UnitId -> UnitId -> Bool #

(/=) :: UnitId -> UnitId -> Bool #

Data UnitId 
Instance details

Defined in Module

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnitId -> c UnitId #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnitId #

toConstr :: UnitId -> Constr #

dataTypeOf :: UnitId -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UnitId) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnitId) #

gmapT :: (forall b. Data b => b -> b) -> UnitId -> UnitId #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnitId -> r #

gmapQ :: (forall d. Data d => d -> u) -> UnitId -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UnitId -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnitId -> m UnitId #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnitId -> m UnitId #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnitId -> m UnitId #

Ord UnitId 
Instance details

Defined in Module

Show UnitId 
Instance details

Defined in Module

NFData UnitId 
Instance details

Defined in Module

Methods

rnf :: UnitId -> () #

Binary UnitId 
Instance details

Defined in Module

Methods

put_ :: BinHandle -> UnitId -> IO () #

put :: BinHandle -> UnitId -> IO (Bin UnitId) #

get :: BinHandle -> IO UnitId #

Uniquable UnitId 
Instance details

Defined in Module

Methods

getUnique :: UnitId -> Unique #

Outputable UnitId 
Instance details

Defined in Module

Methods

ppr :: UnitId -> SDoc #

pprPrec :: Rational -> UnitId -> SDoc #

DbUnitIdModuleRep InstalledUnitId ComponentId UnitId ModuleName Module 
Instance details

Defined in Module

newtype InstalledUnitId #

An installed unit identifier identifies a library which has been installed to the package database. These strings are provided to us via the -this-unit-id flag. The library in question may be definite or indefinite; if it is indefinite, none of the holes have been filled (we never install partially instantiated libraries.) Put another way, an installed unit id is either fully instantiated, or not instantiated at all.

Installed unit identifiers look something like p+af23SAj2dZ219, or maybe just p if they don't use Backpack.

Constructors

InstalledUnitId 

Fields

Instances

Instances details
Eq InstalledUnitId 
Instance details

Defined in Module

Ord InstalledUnitId 
Instance details

Defined in Module

Binary InstalledUnitId 
Instance details

Defined in Module

Uniquable InstalledUnitId 
Instance details

Defined in Module

Outputable InstalledUnitId 
Instance details

Defined in Module

BinaryStringRep InstalledUnitId 
Instance details

Defined in Module

DbUnitIdModuleRep InstalledUnitId ComponentId UnitId ModuleName Module 
Instance details

Defined in Module

newtype ComponentId #

A ComponentId consists of the package name, package version, component ID, the transitive dependencies of the component, and other information to uniquely identify the source code and build configuration of a component.

This used to be known as an InstalledPackageId, but a package can contain multiple components and a ComponentId uniquely identifies a component within a package. When a package only has one component, the ComponentId coincides with the InstalledPackageId

Constructors

ComponentId FastString 

Instances

Instances details
Eq ComponentId 
Instance details

Defined in Module

Ord ComponentId 
Instance details

Defined in Module

Binary ComponentId 
Instance details

Defined in Module

Uniquable ComponentId 
Instance details

Defined in Module

Outputable ComponentId 
Instance details

Defined in Module

BinaryStringRep ComponentId 
Instance details

Defined in Module

DbUnitIdModuleRep InstalledUnitId ComponentId UnitId ModuleName Module 
Instance details

Defined in Module

lengthPS :: PtrString -> Int #

Return the length of a PtrString

unpackPtrString :: PtrString -> String #

Decode a PtrString back into a String using Latin-1 encoding. This does not free the memory associated with PtrString.

mkPtrString :: String -> PtrString #

Encode a String into a newly allocated PtrString using Latin-1 encoding. The original string must not contain non-Latin-1 characters (above codepoint 0xff).

mkPtrString# :: Addr# -> PtrString #

Wrap an unboxed address into a PtrString.

hPutFS :: Handle -> FastString -> IO () #

Outputs a FastString with no decoding at all, that is, you get the actual bytes in the FastString written to the Handle.

zEncodeFS :: FastString -> FastZString #

Returns a Z-encoded version of a FastString. This might be the original, if it was already Z-encoded. The first time this function is applied to a particular FastString, the results are memoized.

unpackFS :: FastString -> String #

Unpacks and decodes the FastString

nullFS :: FastString -> Bool #

Returns True if the FastString is empty

lengthFS :: FastString -> Int #

Returns the length of the FastString in characters

mkFastStringByteList :: [Word8] -> FastString #

Creates a FastString from a UTF-8 encoded [Word8]

mkFastString :: String -> FastString #

Creates a UTF-8 encoded FastString from a String

mkFastStringByteString :: ByteString -> FastString #

Create a FastString from an existing ForeignPtr; the difference between this and mkFastStringBytes is that we don't have to copy the bytes if the string is new to the table.

mkFastStringForeignPtr :: Ptr Word8 -> ForeignPtr Word8 -> Int -> IO FastString #

Create a FastString from an existing ForeignPtr; the difference between this and mkFastStringBytes is that we don't have to copy the bytes if the string is new to the table.

bytesFS :: FastString -> ByteString #

Gives the UTF-8 encoded bytes corresponding to a FastString

data FastZString #

Instances

Instances details
NFData FastZString 
Instance details

Defined in FastString

Methods

rnf :: FastZString -> () #

data FastString #

A FastString is a UTF-8 encoded string together with a unique ID. All FastStrings are stored in a global hashtable to support fast O(1) comparison.

It is also associated with a lazy reference to the Z-encoding of this string which is used by the compiler internally.

Constructors

FastString 

Fields

Instances

Instances details
Eq FastString 
Instance details

Defined in FastString

Data FastString 
Instance details

Defined in FastString

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FastString -> c FastString #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FastString #

toConstr :: FastString -> Constr #

dataTypeOf :: FastString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FastString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FastString) #

gmapT :: (forall b. Data b => b -> b) -> FastString -> FastString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FastString -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FastString -> r #

gmapQ :: (forall d. Data d => d -> u) -> FastString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FastString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FastString -> m FastString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FastString -> m FastString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FastString -> m FastString #

Ord FastString 
Instance details

Defined in FastString

Show FastString 
Instance details

Defined in FastString

IsString FastString 
Instance details

Defined in FastString

Semigroup FastString 
Instance details

Defined in FastString

Monoid FastString 
Instance details

Defined in FastString

NFData FastString 
Instance details

Defined in FastString

Methods

rnf :: FastString -> () #

Uniquable FastString 
Instance details

Defined in Unique

Outputable FastString 
Instance details

Defined in Outputable

Symbolic FastString 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

symbol :: FastString -> Symbol

data PtrString #

A PtrString is a pointer to some array of Latin-1 encoded chars.

Constructors

PtrString !(Ptr Word8) !Int 

isTupleTyCon :: TyCon -> Bool #

Does this TyCon represent a tuple?

NB: when compiling Data.Tuple, the tycons won't reply True to isTupleTyCon, because they are built as AlgTyCons. However they get spat into the interface file as tuple tycons, so I don't think it matters.

isUnboxedTupleTyCon :: TyCon -> Bool #

Is this the TyCon for an unboxed tuple?

data TyCon #

TyCons represent type constructors. Type constructors are introduced by things such as:

1) Data declarations: data Foo = ... creates the Foo type constructor of kind *

2) Type synonyms: type Foo = ... creates the Foo type constructor

3) Newtypes: newtype Foo a = MkFoo ... creates the Foo type constructor of kind * -> *

4) Class declarations: class Foo where creates the Foo type constructor of kind *

This data type also encodes a number of primitive, built in type constructors such as those for function and tuple types.

Instances

Instances details
Eq TyCon 
Instance details

Defined in TyCon

Methods

(==) :: TyCon -> TyCon -> Bool #

(/=) :: TyCon -> TyCon -> Bool #

Data TyCon 
Instance details

Defined in TyCon

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyCon -> c TyCon #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyCon #

toConstr :: TyCon -> Constr #

dataTypeOf :: TyCon -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyCon) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyCon) #

gmapT :: (forall b. Data b => b -> b) -> TyCon -> TyCon #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyCon -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyCon -> r #

gmapQ :: (forall d. Data d => d -> u) -> TyCon -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TyCon -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyCon -> m TyCon #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCon -> m TyCon #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyCon -> m TyCon #

Ord TyCon # 
Instance details

Defined in Language.Haskell.Liquid.Types.Types

Methods

compare :: TyCon -> TyCon -> Ordering #

(<) :: TyCon -> TyCon -> Bool #

(<=) :: TyCon -> TyCon -> Bool #

(>) :: TyCon -> TyCon -> Bool #

(>=) :: TyCon -> TyCon -> Bool #

max :: TyCon -> TyCon -> TyCon #

min :: TyCon -> TyCon -> TyCon #

Show TyCon # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

showsPrec :: Int -> TyCon -> ShowS #

show :: TyCon -> String #

showList :: [TyCon] -> ShowS #

NFData TyCon # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

rnf :: TyCon -> () #

NamedThing TyCon 
Instance details

Defined in TyCon

Uniquable TyCon 
Instance details

Defined in TyCon

Methods

getUnique :: TyCon -> Unique #

Outputable TyCon 
Instance details

Defined in TyCon

Methods

ppr :: TyCon -> SDoc #

pprPrec :: Rational -> TyCon -> SDoc #

Symbolic TyCon

Symbol Instances

Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

symbol :: TyCon -> Symbol

PPrint TyCon # 
Instance details

Defined in Language.Haskell.Liquid.Types.PrettyPrint

Methods

pprintTidy :: Tidy -> TyCon -> Doc #

pprintPrec :: Int -> Tidy -> TyCon -> Doc #

Hashable TyCon 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

hashWithSalt :: Int -> TyCon -> Int

hash :: TyCon -> Int

TyConable TyCon # 
Instance details

Defined in Language.Haskell.Liquid.Types.Types

ResolveSym TyCon # 
Instance details

Defined in Language.Haskell.Liquid.Bare.Resolve

data PlatformConstants #

Constructors

PlatformConstants 

Fields

withSignalHandlers :: (ExceptionMonad m, MonadIO m) => m a -> m a #

Temporarily install standard signal handlers for catching ^C, which just throw an exception in the current thread.

showGhcException :: GhcException -> ShowS #

Append a description of the given exception to this string.

Note that this uses unsafeGlobalDynFlags, which may have some uninitialized fields if invoked before initGhcMonad has been called. If the error message to be printed includes a pretty-printer document which forces one of these fields this call may bottom.

data GhcException #

GHC's own exception type error messages all take the form:

     location: error
 

If the location is on the command line, or in GHC itself, then location="ghc". All of the error types below correspond to a location of "ghc", except for ProgramError (where the string is assumed to contain a location already, so we don't print one).

Constructors

Signal Int

Some other fatal signal (SIGHUP,SIGTERM)

UsageError String

Prints the short usage msg after the error

CmdLineError String

A problem with the command line arguments, but don't print usage.

Panic String

The impossible happened.

PprPanic String SDoc 
Sorry String

The user tickled something that's known not to work yet, but we're not counting it as a bug.

PprSorry String SDoc 
InstallationError String

An installation problem.

ProgramError String

An error in the user's code, probably.

PprProgramError String SDoc 

Instances

Instances details
Show GhcException 
Instance details

Defined in Panic

Exception GhcException 
Instance details

Defined in Panic

data OccName #

Occurrence Name

In this context that means: "classified (i.e. as a type name, value name, etc) but not qualified and not yet resolved"

Instances

Instances details
Eq OccName 
Instance details

Defined in OccName

Methods

(==) :: OccName -> OccName -> Bool #

(/=) :: OccName -> OccName -> Bool #

Data OccName 
Instance details

Defined in OccName

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OccName -> c OccName #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OccName #

toConstr :: OccName -> Constr #

dataTypeOf :: OccName -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OccName) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OccName) #

gmapT :: (forall b. Data b => b -> b) -> OccName -> OccName #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OccName -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OccName -> r #

gmapQ :: (forall d. Data d => d -> u) -> OccName -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> OccName -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> OccName -> m OccName #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OccName -> m OccName #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OccName -> m OccName #

Ord OccName 
Instance details

Defined in OccName

NFData OccName 
Instance details

Defined in OccName

Methods

rnf :: OccName -> () #

HasOccName OccName 
Instance details

Defined in OccName

Methods

occName :: OccName -> OccName #

Binary OccName 
Instance details

Defined in OccName

Uniquable OccName 
Instance details

Defined in OccName

Methods

getUnique :: OccName -> Unique #

Outputable OccName 
Instance details

Defined in OccName

Methods

ppr :: OccName -> SDoc #

pprPrec :: Rational -> OccName -> SDoc #

OutputableBndr OccName 
Instance details

Defined in OccName

data Name #

A unique, unambiguous name for something, containing information about where that thing originated.

Instances

Instances details
Eq Name

The same comments as for Name's Ord instance apply.

Instance details

Defined in Name

Methods

(==) :: Name -> Name -> Bool #

(/=) :: Name -> Name -> Bool #

Data Name 
Instance details

Defined in Name

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Name -> c Name #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Name #

toConstr :: Name -> Constr #

dataTypeOf :: Name -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Name) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Name) #

gmapT :: (forall b. Data b => b -> b) -> Name -> Name #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r #

gmapQ :: (forall d. Data d => d -> u) -> Name -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Name -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Name -> m Name #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name #

Ord Name

Caution: This instance is implemented via nonDetCmpUnique, which means that the ordering is not stable across deserialization or rebuilds.

See nonDetCmpUnique for further information, and trac #15240 for a bug caused by improper use of this instance.

Instance details

Defined in Name

Methods

compare :: Name -> Name -> Ordering #

(<) :: Name -> Name -> Bool #

(<=) :: Name -> Name -> Bool #

(>) :: Name -> Name -> Bool #

(>=) :: Name -> Name -> Bool #

max :: Name -> Name -> Name #

min :: Name -> Name -> Name #

Show Name # 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

NFData Name 
Instance details

Defined in Name

Methods

rnf :: Name -> () #

NamedThing Name 
Instance details

Defined in Name

HasOccName Name 
Instance details

Defined in Name

Methods

occName :: Name -> OccName #

Binary Name

Assumes that the Name is a non-binding one. See putIfaceTopBndr and getIfaceTopBndr for serializing binding Names. See UserData for the rationale for this distinction.

Instance details

Defined in Name

Methods

put_ :: BinHandle -> Name -> IO () #

put :: BinHandle -> Name -> IO (Bin Name) #

get :: BinHandle -> IO Name #

Uniquable Name 
Instance details

Defined in Name

Methods

getUnique :: Name -> Unique #

HasSrcSpan Name 
Instance details

Defined in Name

Outputable Name 
Instance details

Defined in Name

Methods

ppr :: Name -> SDoc #

pprPrec :: Rational -> Name -> SDoc #

OutputableBndr Name 
Instance details

Defined in Name

Symbolic Name 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

symbol :: Name -> Symbol

Fixpoint Name 
Instance details

Defined in Language.Haskell.Liquid.GHC.Misc

Methods

toFix :: Name -> Doc

simplify :: Name -> Name

PPrint Name # 
Instance details

Defined in Language.Haskell.Liquid.Types.PrettyPrint

Methods

pprintTidy :: Tidy -> Name -> Doc #

pprintPrec :: Int -> Tidy -> Name -> Doc #

type SrcSpanLess Name 
Instance details

Defined in Name

data Option #

When invoking external tools as part of the compilation pipeline, we pass these a sequence of options on the command-line. Rather than just using a list of Strings, we use a type that allows us to distinguish between filepaths and 'other stuff'. The reason for this is that this type gives us a handle on transforming filenames, and filenames only, to whatever format they're expected to be on a particular platform.

Instances

Instances details
Eq Option 
Instance details

Defined in CliOption

Methods

(==) :: Option -> Option -> Bool #

(/=) :: Option -> Option -> Bool #

useUnicodeSyntax :: DynFlags -> Bool #

An internal helper to check whether to use unicode syntax for output.

Note: You should very likely be using unicodeSyntax instead of this function.

data DynFlags #

Contains not only a collection of GeneralFlags but also a plethora of information relating to the compilation of a single file or GHC session

Constructors

DynFlags 

Fields

data DumpFlag #

Constructors

Opt_D_dump_cmm 
Opt_D_dump_cmm_from_stg 
Opt_D_dump_cmm_raw 
Opt_D_dump_cmm_verbose_by_proc 
Opt_D_dump_cmm_verbose 
Opt_D_dump_cmm_cfg 
Opt_D_dump_cmm_cbe 
Opt_D_dump_cmm_switch 
Opt_D_dump_cmm_proc 
Opt_D_dump_cmm_sp 
Opt_D_dump_cmm_sink 
Opt_D_dump_cmm_caf 
Opt_D_dump_cmm_procmap 
Opt_D_dump_cmm_split 
Opt_D_dump_cmm_info 
Opt_D_dump_cmm_cps 
Opt_D_dump_cfg_weights

Dump the cfg used for block layout.

Opt_D_dump_asm 
Opt_D_dump_asm_native 
Opt_D_dump_asm_liveness 
Opt_D_dump_asm_regalloc 
Opt_D_dump_asm_regalloc_stages 
Opt_D_dump_asm_conflicts 
Opt_D_dump_asm_stats 
Opt_D_dump_asm_expanded 
Opt_D_dump_llvm 
Opt_D_dump_core_stats 
Opt_D_dump_deriv 
Opt_D_dump_ds 
Opt_D_dump_ds_preopt 
Opt_D_dump_foreign 
Opt_D_dump_inlinings 
Opt_D_dump_rule_firings 
Opt_D_dump_rule_rewrites 
Opt_D_dump_simpl_trace 
Opt_D_dump_occur_anal 
Opt_D_dump_parsed 
Opt_D_dump_parsed_ast 
Opt_D_dump_rn 
Opt_D_dump_rn_ast 
Opt_D_dump_simpl 
Opt_D_dump_simpl_iterations 
Opt_D_dump_spec 
Opt_D_dump_prep 
Opt_D_dump_stg 
Opt_D_dump_stg_unarised 
Opt_D_dump_stg_final 
Opt_D_dump_call_arity 
Opt_D_dump_exitify 
Opt_D_dump_stranal 
Opt_D_dump_str_signatures 
Opt_D_dump_tc 
Opt_D_dump_tc_ast 
Opt_D_dump_types 
Opt_D_dump_rules 
Opt_D_dump_cse 
Opt_D_dump_worker_wrapper 
Opt_D_dump_rn_trace 
Opt_D_dump_rn_stats 
Opt_D_dump_opt_cmm 
Opt_D_dump_simpl_stats 
Opt_D_dump_cs_trace 
Opt_D_dump_tc_trace 
Opt_D_dump_ec_trace 
Opt_D_dump_if_trace 
Opt_D_dump_vt_trace 
Opt_D_dump_splices 
Opt_D_th_dec_file 
Opt_D_dump_BCOs 
Opt_D_dump_ticked 
Opt_D_dump_rtti 
Opt_D_source_stats 
Opt_D_verbose_stg2stg 
Opt_D_dump_hi 
Opt_D_dump_hi_diffs 
Opt_D_dump_mod_cycles 
Opt_D_dump_mod_map 
Opt_D_dump_timings 
Opt_D_dump_view_pattern_commoning 
Opt_D_verbose_core2core 
Opt_D_dump_debug 
Opt_D_dump_json 
Opt_D_ppr_debug 
Opt_D_no_debug_output 

Instances

Instances details
Enum DumpFlag 
Instance details

Defined in DynFlags

Eq DumpFlag 
Instance details

Defined in DynFlags

Show DumpFlag 
Instance details

Defined in DynFlags

data GeneralFlag #

Enumerates the simple on-or-off dynamic flags

Constructors

Opt_DumpToFile

Append dump output to files instead of stdout.

Opt_D_faststring_stats 
Opt_D_dump_minimal_imports 
Opt_DoCoreLinting 
Opt_DoStgLinting 
Opt_DoCmmLinting 
Opt_DoAsmLinting 
Opt_DoAnnotationLinting 
Opt_NoLlvmMangler 
Opt_FastLlvm 
Opt_NoTypeableBinds 
Opt_WarnIsError 
Opt_ShowWarnGroups 
Opt_HideSourcePaths 
Opt_PrintExplicitForalls 
Opt_PrintExplicitKinds 
Opt_PrintExplicitCoercions 
Opt_PrintExplicitRuntimeReps 
Opt_PrintEqualityRelations 
Opt_PrintAxiomIncomps 
Opt_PrintUnicodeSyntax 
Opt_PrintExpandedSynonyms 
Opt_PrintPotentialInstances 
Opt_PrintTypecheckerElaboration 
Opt_CallArity 
Opt_Exitification 
Opt_Strictness 
Opt_LateDmdAnal 
Opt_KillAbsence 
Opt_KillOneShot 
Opt_FullLaziness 
Opt_FloatIn 
Opt_LateSpecialise 
Opt_Specialise 
Opt_SpecialiseAggressively 
Opt_CrossModuleSpecialise 
Opt_StaticArgumentTransformation 
Opt_CSE 
Opt_StgCSE 
Opt_StgLiftLams 
Opt_LiberateCase 
Opt_SpecConstr 
Opt_SpecConstrKeen 
Opt_DoLambdaEtaExpansion 
Opt_IgnoreAsserts 
Opt_DoEtaReduction 
Opt_CaseMerge 
Opt_CaseFolding 
Opt_UnboxStrictFields 
Opt_UnboxSmallStrictFields 
Opt_DictsCheap 
Opt_EnableRewriteRules 
Opt_EnableThSpliceWarnings 
Opt_RegsGraph 
Opt_RegsIterative 
Opt_PedanticBottoms 
Opt_LlvmTBAA 
Opt_LlvmFillUndefWithGarbage 
Opt_IrrefutableTuples 
Opt_CmmSink 
Opt_CmmElimCommonBlocks 
Opt_AsmShortcutting 
Opt_OmitYields 
Opt_FunToThunk 
Opt_DictsStrict 
Opt_DmdTxDictSel 
Opt_Loopification 
Opt_CfgBlocklayout

Use the cfg based block layout algorithm.

Opt_WeightlessBlocklayout

Layout based on last instruction per block.

Opt_CprAnal 
Opt_WorkerWrapper 
Opt_SolveConstantDicts 
Opt_AlignmentSanitisation 
Opt_CatchBottoms 
Opt_NumConstantFolding 
Opt_SimplPreInlining 
Opt_IgnoreInterfacePragmas 
Opt_OmitInterfacePragmas 
Opt_ExposeAllUnfoldings 
Opt_WriteInterface 
Opt_WriteHie 
Opt_AutoSccsOnIndividualCafs 
Opt_ProfCountEntries 
Opt_Pp 
Opt_ForceRecomp 
Opt_IgnoreOptimChanges 
Opt_IgnoreHpcChanges 
Opt_ExcessPrecision 
Opt_EagerBlackHoling 
Opt_NoHsMain 
Opt_SplitSections 
Opt_StgStats 
Opt_HideAllPackages 
Opt_HideAllPluginPackages 
Opt_PrintBindResult 
Opt_Haddock 
Opt_HaddockOptions 
Opt_BreakOnException 
Opt_BreakOnError 
Opt_PrintEvldWithShow 
Opt_PrintBindContents 
Opt_GenManifest 
Opt_EmbedManifest 
Opt_SharedImplib 
Opt_BuildingCabalPackage 
Opt_IgnoreDotGhci 
Opt_GhciSandbox 
Opt_GhciHistory 
Opt_GhciLeakCheck 
Opt_ValidateHie 
Opt_LocalGhciHistory 
Opt_NoIt 
Opt_HelpfulErrors 
Opt_DeferTypeErrors 
Opt_DeferTypedHoles 
Opt_DeferOutOfScopeVariables 
Opt_PIC
-fPIC
Opt_PIE
-fPIE
Opt_PICExecutable
-pie
Opt_ExternalDynamicRefs 
Opt_SccProfilingOn 
Opt_Ticky 
Opt_Ticky_Allocd 
Opt_Ticky_LNE 
Opt_Ticky_Dyn_Thunk 
Opt_RPath 
Opt_RelativeDynlibPaths 
Opt_Hpc 
Opt_FlatCache 
Opt_ExternalInterpreter 
Opt_OptimalApplicativeDo 
Opt_VersionMacros 
Opt_WholeArchiveHsLibs 
Opt_SingleLibFolder 
Opt_KeepCAFs 
Opt_KeepGoing 
Opt_ByteCode 
Opt_ErrorSpans 
Opt_DeferDiagnostics 
Opt_DiagnosticsShowCaret 
Opt_PprCaseAsLet 
Opt_PprShowTicks 
Opt_ShowHoleConstraints 
Opt_ShowValidHoleFits 
Opt_SortValidHoleFits 
Opt_SortBySizeHoleFits 
Opt_SortBySubsumHoleFits 
Opt_AbstractRefHoleFits 
Opt_UnclutterValidHoleFits 
Opt_ShowTypeAppOfHoleFits 
Opt_ShowTypeAppVarsOfHoleFits 
Opt_ShowDocsOfHoleFits 
Opt_ShowTypeOfHoleFits 
Opt_ShowProvOfHoleFits 
Opt_ShowMatchesOfHoleFits 
Opt_ShowLoadedModules 
Opt_HexWordLiterals 
Opt_SuppressCoercions 
Opt_SuppressVarKinds 
Opt_SuppressModulePrefixes 
Opt_SuppressTypeApplications 
Opt_SuppressIdInfo 
Opt_SuppressUnfoldings 
Opt_SuppressTypeSignatures 
Opt_SuppressUniques 
Opt_SuppressStgExts 
Opt_SuppressTicks 
Opt_SuppressTimestamps

Suppress timestamps in dumps

Opt_AutoLinkPackages 
Opt_ImplicitImportQualified 
Opt_KeepHscppFiles 
Opt_KeepHiDiffs 
Opt_KeepHcFiles 
Opt_KeepSFiles 
Opt_KeepTmpFiles 
Opt_KeepRawTokenStream 
Opt_KeepLlvmFiles 
Opt_KeepHiFiles 
Opt_KeepOFiles 
Opt_BuildDynamicToo 
Opt_DistrustAllPackages 
Opt_PackageTrust 
Opt_PluginTrustworthy 
Opt_G_NoStateHack 
Opt_G_NoOptCoercion 

gfinally :: ExceptionMonad m => m a -> m b -> m a #

Generalised version of finally, allowing an arbitrary exception handling monad instead of just IO.

gcatch :: (ExceptionMonad m, Exception e) => m a -> (e -> m a) -> m a #

Generalised version of catch, allowing an arbitrary exception handling monad instead of just IO.

gbracket :: ExceptionMonad m => m a -> (a -> m b) -> (a -> m c) -> m c #

Generalised version of bracket, allowing an arbitrary exception handling monad instead of just IO.

data FileSettings #

Paths to various files and directories used by GHC, including those that provide more settings.

data GhcNameVersion #

Settings for what GHC this is.

data HValue #

Instances

Instances details
Show HValue 
Instance details

Defined in GHCi.RemoteTypes

data PlatformMisc #

Platform-specific settings formerly hard-coded in Config.hs.

These should probably be all be triaged whether they can be computed from other settings or belong in another another place (like Platform above).

data ForeignSrcLang #

Foreign formats supported by GHC via TH

Constructors

LangC

C

LangCxx

C++

LangObjc

Objective C

LangObjcxx

Objective C++

LangAsm

Assembly language (.s)

RawObject

Object (.o)

Instances

Instances details
Eq ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Show ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Generic ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Associated Types

type Rep ForeignSrcLang :: Type -> Type #

type Rep ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

type Rep ForeignSrcLang = D1 ('MetaData "ForeignSrcLang" "GHC.ForeignSrcLang.Type" "ghc-boot-th-8.10.1" 'False) ((C1 ('MetaCons "LangC" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LangCxx" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LangObjc" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "LangObjcxx" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LangAsm" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RawObject" 'PrefixI 'False) (U1 :: Type -> Type))))

coreModule :: DesugaredMod m => m -> ModGuts #

tyConRealArity :: TyCon -> Int #

NOTE:tyConRealArity

The semantics of tyConArity changed between GHC 8.6.5 and GHC 8.10, mostly due to the Visible Dependent Quantification (VDQ). As a result, given the following:

data family EntityField record :: * -> *

Calling tyConArity on this would yield 2 for 8.6.5 but 1 an 8.10, so we try to backport the old behaviour in 8.10 by "looking" at the Kind of the input TyCon and trying to recursively split the type apart with either splitFunTy_maybe or splitForAllTy_maybe.

NOTE:isEvVarType

For GHC < 8.10.1 isPredTy is effectively the same as the new isEvVarType, which covers the cases for coercion types and "normal" type coercions. The 8.6.5 version of isPredTy had a special case to handle a TyConApp in the case of type equality (i.e. ~ ) which was removed in the implementation for 8.10.1, which essentially calls tcIsConstraintKind straight away.