hs-opentelemetry-instrumentation-auto-0.1.0.1: Plugin for instrumenting an application
Safe HaskellSafe-Inferred
LanguageGHC2021

AutoInstrument.Internal.GhcFacade

Synopsis

Documentation

data Levity #

Constructors

Lifted 
Unlifted 

Instances

Instances details
Outputable Levity 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: Levity -> SDoc #

Eq Levity 
Instance details

Defined in GHC.Types.Basic

Methods

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

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

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.

If you edit this type, you may need to update the GHC formalism See Note [GHC Formalism] in GHC.Core.Lint

Instances

Instances details
Data TyCon 
Instance details

Defined in GHC.Core.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 #

NamedThing TyCon 
Instance details

Defined in GHC.Core.TyCon

Uniquable TyCon 
Instance details

Defined in GHC.Core.TyCon

Methods

getUnique :: TyCon -> Unique #

Outputable TyCon 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: TyCon -> SDoc #

Eq TyCon 
Instance details

Defined in GHC.Core.TyCon

Methods

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

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

type Module = GenModule Unit #

A Module is a pair of a Unit and a ModuleName.

data Type #

Instances

Instances details
Data Type 
Instance details

Defined in GHC.Core.TyCo.Rep

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 #

Outputable Type 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: Type -> SDoc #

Eq (DeBruijn Type) 
Instance details

Defined in GHC.Core.Map.Type

class (Typeable e, Show e) => Exception e where #

Any type that you wish to throw or catch as an exception must be an instance of the Exception class. The simplest case is a new exception type directly below the root:

data MyException = ThisException | ThatException
    deriving Show

instance Exception MyException

The default method definitions in the Exception class do what we need in this case. You can now throw and catch ThisException and ThatException as exceptions:

*Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException))
Caught ThisException

In more complicated examples, you may wish to define a whole hierarchy of exceptions:

---------------------------------------------------------------------
-- Make the root exception type for all the exceptions in a compiler

data SomeCompilerException = forall e . Exception e => SomeCompilerException e

instance Show SomeCompilerException where
    show (SomeCompilerException e) = show e

instance Exception SomeCompilerException

compilerExceptionToException :: Exception e => e -> SomeException
compilerExceptionToException = toException . SomeCompilerException

compilerExceptionFromException :: Exception e => SomeException -> Maybe e
compilerExceptionFromException x = do
    SomeCompilerException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make a subhierarchy for exceptions in the frontend of the compiler

data SomeFrontendException = forall e . Exception e => SomeFrontendException e

instance Show SomeFrontendException where
    show (SomeFrontendException e) = show e

instance Exception SomeFrontendException where
    toException = compilerExceptionToException
    fromException = compilerExceptionFromException

frontendExceptionToException :: Exception e => e -> SomeException
frontendExceptionToException = toException . SomeFrontendException

frontendExceptionFromException :: Exception e => SomeException -> Maybe e
frontendExceptionFromException x = do
    SomeFrontendException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make an exception type for a particular frontend compiler exception

data MismatchedParentheses = MismatchedParentheses
    deriving Show

instance Exception MismatchedParentheses where
    toException   = frontendExceptionToException
    fromException = frontendExceptionFromException

We can now catch a MismatchedParentheses exception as MismatchedParentheses, SomeFrontendException or SomeCompilerException, but not other types, e.g. IOException:

*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: MismatchedParentheses))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeFrontendException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeCompilerException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: IOException))
*** Exception: MismatchedParentheses

Minimal complete definition

Nothing

Methods

toException :: e -> SomeException #

fromException :: SomeException -> Maybe e #

displayException :: e -> String #

Render this exception value in a human-friendly manner.

Default implementation: show.

Since: base-4.8.0.0

Instances

Instances details
Exception AsyncCancelled 
Instance details

Defined in Control.Concurrent.Async.Internal

Exception ExceptionInLinkedThread 
Instance details

Defined in Control.Concurrent.Async.Internal

Exception NestedAtomically

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception NoMatchingContinuationPrompt

Since: base-4.18

Instance details

Defined in Control.Exception.Base

Exception NoMethodError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception NonTermination

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception PatternMatchFail

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecConError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecSelError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecUpdError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception TypeError

Since: base-4.9.0.0

Instance details

Defined in Control.Exception.Base

Exception Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Exception.Type

Exception ArithException

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception.Type

Exception SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Exception AllocationLimitExceeded

Since: base-4.8.0.0

Instance details

Defined in GHC.IO.Exception

Exception ArrayException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception AsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception BlockedIndefinitelyOnMVar

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception BlockedIndefinitelyOnSTM

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Exception Deadlock

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception ExitCode

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Exception IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception SomeAsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception ASCII7_Invalid 
Instance details

Defined in Basement.String.Encoding.ASCII7

Methods

toException :: ASCII7_Invalid -> SomeException #

fromException :: SomeException -> Maybe ASCII7_Invalid #

displayException :: ASCII7_Invalid -> String #

Exception ISO_8859_1_Invalid 
Instance details

Defined in Basement.String.Encoding.ISO_8859_1

Methods

toException :: ISO_8859_1_Invalid -> SomeException #

fromException :: SomeException -> Maybe ISO_8859_1_Invalid #

displayException :: ISO_8859_1_Invalid -> String #

Exception UTF16_Invalid 
Instance details

Defined in Basement.String.Encoding.UTF16

Methods

toException :: UTF16_Invalid -> SomeException #

fromException :: SomeException -> Maybe UTF16_Invalid #

displayException :: UTF16_Invalid -> String #

Exception UTF32_Invalid 
Instance details

Defined in Basement.String.Encoding.UTF32

Methods

toException :: UTF32_Invalid -> SomeException #

fromException :: SomeException -> Maybe UTF32_Invalid #

displayException :: UTF32_Invalid -> String #

Exception IOEnvFailure 
Instance details

Defined in GHC.Data.IOEnv

Exception SourceError 
Instance details

Defined in GHC.Types.SourceError

Exception GhcException 
Instance details

Defined in GHC.Utils.Panic

Exception PlainGhcException 
Instance details

Defined in GHC.Utils.Panic.Plain

Exception AsyncExceptionWrapper 
Instance details

Defined in Control.Exception.Safe

Exception StringException 
Instance details

Defined in Control.Exception.Safe

Exception SyncExceptionWrapper 
Instance details

Defined in Control.Exception.Safe

Exception StringException

Since: unliftio-0.1.0.0

Instance details

Defined in UnliftIO.Exception

Exception ConcException 
Instance details

Defined in UnliftIO.Internals.Async

data Fingerprint #

Constructors

Fingerprint !Word64 !Word64 

Instances

Instances details
Generic Fingerprint 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fingerprint :: Type -> Type #

Show Fingerprint

Since: base-4.7.0.0

Instance details

Defined in GHC.Fingerprint.Type

Outputable Fingerprint 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Fingerprint -> SDoc #

Eq Fingerprint

Since: base-4.4.0.0

Instance details

Defined in GHC.Fingerprint.Type

Ord Fingerprint

Since: base-4.4.0.0

Instance details

Defined in GHC.Fingerprint.Type

Hashable Fingerprint

Since: hashable-1.3.0.0

Instance details

Defined in Data.Hashable.Class

type Rep Fingerprint

Since: base-4.15.0.0

Instance details

Defined in GHC.Generics

type Rep Fingerprint = D1 ('MetaData "Fingerprint" "GHC.Fingerprint.Type" "base" 'False) (C1 ('MetaCons "Fingerprint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64)))

data SrcLoc #

Source Location

Instances

Instances details
Show SrcLoc 
Instance details

Defined in GHC.Types.SrcLoc

Outputable SrcLoc 
Instance details

Defined in GHC.Types.SrcLoc

Methods

ppr :: SrcLoc -> SDoc #

Eq SrcLoc 
Instance details

Defined in GHC.Types.SrcLoc

Methods

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

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

type HasCallStack = ?callStack :: CallStack #

Request a CallStack.

NOTE: The implicit parameter ?callStack :: CallStack is an implementation detail and should not be considered part of the CallStack API, we may decide to change the implementation in the future.

Since: base-4.9.0.0

data Version #

A Version represents the version of a software entity.

An instance of Eq is provided, which implements exact equality modulo reordering of the tags in the versionTags field.

An instance of Ord is also provided, which gives lexicographic ordering on the versionBranch fields (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.). This is expected to be sufficient for many uses, but note that you may need to use a more specific ordering for your versioning scheme. For example, some versioning schemes may include pre-releases which have tags "pre1", "pre2", and so on, and these would need to be taken into account when determining ordering. In some cases, date ordering may be more appropriate, so the application would have to look for date tags in the versionTags field and compare those. The bottom line is, don't always assume that compare and other Ord operations are the right thing for every Version.

Similarly, concrete representations of versions may differ. One possible concrete representation is provided (see showVersion and parseVersion), but depending on the application a different concrete representation may be more appropriate.

Constructors

Version 

Fields

  • versionBranch :: [Int]

    The numeric branch for this version. This reflects the fact that most software versions are tree-structured; there is a main trunk which is tagged with versions at various points (1,2,3...), and the first branch off the trunk after version 3 is 3.1, the second branch off the trunk after version 3 is 3.2, and so on. The tree can be branched arbitrarily, just by adding more digits.

    We represent the branch as a list of Int, so version 3.2.1 becomes [3,2,1]. Lexicographic ordering (i.e. the default instance of Ord for [Int]) gives the natural ordering of branches.

  • versionTags :: [String]

    A version can be tagged with an arbitrary list of strings. The interpretation of the list of tags is entirely dependent on the entity that this version applies to.

Instances

Instances details
Data Version

Since: base-4.7.0.0

Instance details

Defined in Data.Data

Methods

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

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

toConstr :: Version -> Constr #

dataTypeOf :: Version -> DataType #

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

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

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

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

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

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

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

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

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

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

Generic Version 
Instance details

Defined in Data.Version

Associated Types

type Rep Version :: Type -> Type #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

IsList Version

Since: base-4.8.0.0

Instance details

Defined in GHC.IsList

Associated Types

type Item Version #

Read Version

Since: base-2.1

Instance details

Defined in Data.Version

Show Version

Since: base-2.1

Instance details

Defined in Data.Version

Eq Version

Since: base-2.1

Instance details

Defined in Data.Version

Methods

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

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

Ord Version

Since: base-2.1

Instance details

Defined in Data.Version

Hashable Version 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Version -> Int #

hash :: Version -> Int #

type Rep Version

Since: base-4.9.0.0

Instance details

Defined in Data.Version

type Rep Version = D1 ('MetaData "Version" "Data.Version" "base" 'False) (C1 ('MetaCons "Version" 'PrefixI 'True) (S1 ('MetaSel ('Just "versionBranch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int]) :*: S1 ('MetaSel ('Just "versionTags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String])))
type Item Version 
Instance details

Defined in GHC.IsList

data FractionalExponentBase #

Constructors

Base2 
Base10 

Instances

Instances details
Data FractionalExponentBase 
Instance details

Defined in GHC.Types.SourceText

Methods

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

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

toConstr :: FractionalExponentBase -> Constr #

dataTypeOf :: FractionalExponentBase -> DataType #

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

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

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

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

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

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

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

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

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

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

Show FractionalExponentBase 
Instance details

Defined in GHC.Types.SourceText

Eq FractionalExponentBase 
Instance details

Defined in GHC.Types.SourceText

Ord FractionalExponentBase 
Instance details

Defined in GHC.Types.SourceText

data Coercion #

A Coercion is concrete evidence of the equality/convertibility of two types.

Instances

Instances details
Data Coercion 
Instance details

Defined in GHC.Core.TyCo.Rep

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 GHC.Core.TyCo.Rep

Methods

ppr :: Coercion -> SDoc #

Eq (DeBruijn Coercion) 
Instance details

Defined in GHC.Core.Map.Type

data Alt 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)

Constructors

Alt AltCon [b] (Expr b) 

Instances

Instances details
Data b => Data (Alt b) 
Instance details

Defined in GHC.Core

Methods

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

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

toConstr :: Alt b -> Constr #

dataTypeOf :: Alt b -> DataType #

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

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

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

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

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

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

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

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

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

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

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 GHC.Utils.CliOption

Methods

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

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

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
Show Unique 
Instance details

Defined in GHC.Types.Unique

Uniquable Unique 
Instance details

Defined in GHC.Types.Unique

Methods

getUnique :: Unique -> Unique #

Outputable Unique 
Instance details

Defined in GHC.Types.Unique

Methods

ppr :: Unique -> SDoc #

Eq Unique 
Instance details

Defined in GHC.Types.Unique

Methods

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

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

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

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 

data SDoc #

Represents a pretty-printable document.

To display an SDoc, use printSDoc, printSDocLn, bufLeftRenderSDoc, or renderWithContext. Avoid calling runSDoc directly as it breaks the abstraction layer.

Instances

Instances details
IsString SDoc 
Instance details

Defined in GHC.Utils.Outputable

Methods

fromString :: String -> SDoc #

IsDoc SDoc 
Instance details

Defined in GHC.Utils.Outputable

Associated Types

type Line SDoc = (r :: Type) #

Methods

line :: Line SDoc -> SDoc #

($$) :: SDoc -> SDoc -> SDoc #

lines_ :: [Line SDoc] -> SDoc #

vcat :: [SDoc] -> SDoc #

dualDoc :: SDoc -> HDoc -> SDoc #

IsLine SDoc 
Instance details

Defined in GHC.Utils.Outputable

Methods

char :: Char -> SDoc #

text :: String -> SDoc #

ftext :: FastString -> SDoc #

ztext :: FastZString -> SDoc #

(<>) :: SDoc -> SDoc -> SDoc #

(<+>) :: SDoc -> SDoc -> SDoc #

sep :: [SDoc] -> SDoc #

fsep :: [SDoc] -> SDoc #

hcat :: [SDoc] -> SDoc #

hsep :: [SDoc] -> SDoc #

dualLine :: SDoc -> HLine -> SDoc #

IsOutput SDoc 
Instance details

Defined in GHC.Utils.Outputable

Outputable SDoc 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: SDoc -> SDoc #

OutputableP env SDoc 
Instance details

Defined in GHC.Utils.Outputable

Methods

pdoc :: env -> SDoc -> SDoc #

type Line SDoc 
Instance details

Defined in GHC.Utils.Outputable

type Line SDoc = SDoc

data AnnDecl pass #

Annotation Declaration

Instances

Instances details
type Anno (AnnDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

data IE pass #

Imported or exported entity.

Constructors

IEVar (XIEVar pass) (LIEWrappedName pass)

Imported or Exported Variable

IEThingAbs (XIEThingAbs pass) (LIEWrappedName 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 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 pass) IEWildcard [LIEWrappedName 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) (XRec pass ModuleName)

Imported or exported module contents

(Export Only)

IEGroup (XIEGroup pass) Int (LHsDoc pass)

Doc section heading

IEDoc (XIEDoc pass) (LHsDoc pass)

Some documentation

IEDocNamed (XIEDocNamed pass) String

Reference to named doc

XIE !(XXIE pass) 

Instances

Instances details
type Anno (LocatedA (IE (GhcPass p))) 
Instance details

Defined in GHC.Hs.ImpExp

type Anno (IE (GhcPass p)) 
Instance details

Defined in GHC.Hs.ImpExp

type Anno (IE (GhcPass p)) = SrcSpanAnnA
type Anno [LocatedA (IE (GhcPass p))] 
Instance details

Defined in GHC.Hs.ImpExp

data Annotation #

Represents an annotation after it has been sufficiently desugared from it's initial form of AnnDecl

Constructors

Annotation 

Fields

Instances

Instances details
Outputable Annotation 
Instance details

Defined in GHC.Types.Annotations

Methods

ppr :: Annotation -> SDoc #

type Kind = Type #

The key type representing kinds in the compiler.

data HsExpr p #

A Haskell expression.

Constructors

HsVar (XVar p) (LIdP p)

Variable See Note [Located RdrNames]

HsUnboundVar (XUnboundVar p) RdrName

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. The (XUnboundVar p) field becomes an HoleExprRef after typechecking; this is where the erroring expression will be written after solving. See Note [Holes] in GHC.Tc.Types.Constraint.

HsRecSel (XRecSel p) (FieldOcc p)

Variable pointing to record selector See Note [Non-overloaded record field selectors] and Note [Record selectors in the AST]

HsOverLabel (XOverLabel p) SourceText FastString

Overloaded label (Note [Overloaded labels] in GHC.OverloadedLabels) Note [Pragma source text] in GHC.Types.SourceText

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) LamCaseVariant (MatchGroup p (LHsExpr p))

Lambda-case

HsApp (XApp p) (LHsExpr p) (LHsExpr p)

Application

HsAppType (XAppTypeE p) (LHsExpr p) !(LHsToken "@" 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

Fields

SectionL (XSectionL p) (LHsExpr p) (LHsExpr p) 
SectionR (XSectionR p) (LHsExpr p) (LHsExpr p) 
ExplicitTuple (XExplicitTuple p) [HsTupArg p] Boxity

Used for explicit tuples and sections thereof

ExplicitSum (XExplicitSum p) ConTag SumWidth (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) (LHsExpr p) (LHsExpr p) (LHsExpr p)
HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)]

Multi-way if

HsLet (XLet p) !(LHsToken "let" p) (HsLocalBinds p) !(LHsToken "in" p) (LHsExpr p)

let(rec)

HsDo (XDo p) HsDoFlavour (XRec p [ExprLStmt p])
ExplicitList (XExplicitList p) [LHsExpr p]

Syntactic list: [a,b,c,...]

RecordCon

Record construction

RecordUpd

Record update

HsGetField

Record field selection e.g z.x.

Fields

HsProjection

Record field selector. e.g. (.x) or (.x.y)

This case only arises when the OverloadedRecordDot langauge extensions is enabled. See Note [Record selectors in the AST].

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

HsTypedBracket (XTypedBracket p) (LHsExpr p)
HsUntypedBracket (XUntypedBracket p) (HsQuote p) 
HsTypedSplice (XTypedSplice p) (LHsExpr p)
HsUntypedSplice (XUntypedSplice p) (HsUntypedSplice p) 
HsProc (XProc p) (LPat p) (LHsCmdTop p)

proc notation for Arrows

HsStatic (XStatic p) (LHsExpr p)
HsPragE (XPragE p) (HsPragE p) (LHsExpr p) 
XExpr !(XXExpr p) 

Instances

Instances details
DisambECP (HsExpr GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

Associated Types

type Body (HsExpr GhcPs) :: Type -> Type #

type InfixOp (HsExpr GhcPs) #

type FunArg (HsExpr GhcPs) #

Methods

ecpFromCmd' :: LHsCmd GhcPs -> PV (LocatedA (HsExpr GhcPs)) #

ecpFromExp' :: LHsExpr GhcPs -> PV (LocatedA (HsExpr GhcPs)) #

mkHsProjUpdatePV :: SrcSpan -> Located [LocatedAn NoEpAnns (DotFieldOcc GhcPs)] -> LocatedA (HsExpr GhcPs) -> Bool -> [AddEpAnn] -> PV (LHsRecProj GhcPs (LocatedA (HsExpr GhcPs))) #

mkHsLamPV :: SrcSpan -> (EpAnnComments -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs))) -> PV (LocatedA (HsExpr GhcPs)) #

mkHsLetPV :: SrcSpan -> LHsToken "let" GhcPs -> HsLocalBinds GhcPs -> LHsToken "in" GhcPs -> LocatedA (HsExpr GhcPs) -> PV (LocatedA (HsExpr GhcPs)) #

superInfixOp :: (DisambInfixOp (InfixOp (HsExpr GhcPs)) => PV (LocatedA (HsExpr GhcPs))) -> PV (LocatedA (HsExpr GhcPs)) #

mkHsOpAppPV :: SrcSpan -> LocatedA (HsExpr GhcPs) -> LocatedN (InfixOp (HsExpr GhcPs)) -> LocatedA (HsExpr GhcPs) -> PV (LocatedA (HsExpr GhcPs)) #

mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> LocatedL [LMatch GhcPs (LocatedA (HsExpr GhcPs))] -> EpAnnHsCase -> PV (LocatedA (HsExpr GhcPs)) #

mkHsLamCasePV :: SrcSpan -> LamCaseVariant -> LocatedL [LMatch GhcPs (LocatedA (HsExpr GhcPs))] -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

superFunArg :: (DisambECP (FunArg (HsExpr GhcPs)) => PV (LocatedA (HsExpr GhcPs))) -> PV (LocatedA (HsExpr GhcPs)) #

mkHsAppPV :: SrcSpanAnnA -> LocatedA (HsExpr GhcPs) -> LocatedA (FunArg (HsExpr GhcPs)) -> PV (LocatedA (HsExpr GhcPs)) #

mkHsAppTypePV :: SrcSpanAnnA -> LocatedA (HsExpr GhcPs) -> LHsToken "@" GhcPs -> LHsType GhcPs -> PV (LocatedA (HsExpr GhcPs)) #

mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> LocatedA (HsExpr GhcPs) -> Bool -> LocatedA (HsExpr GhcPs) -> AnnsIf -> PV (LocatedA (HsExpr GhcPs)) #

mkHsDoPV :: SrcSpan -> Maybe ModuleName -> LocatedL [LStmt GhcPs (LocatedA (HsExpr GhcPs))] -> AnnList -> PV (LocatedA (HsExpr GhcPs)) #

mkHsParPV :: SrcSpan -> LHsToken "(" GhcPs -> LocatedA (HsExpr GhcPs) -> LHsToken ")" GhcPs -> PV (LocatedA (HsExpr GhcPs)) #

mkHsVarPV :: LocatedN RdrName -> PV (LocatedA (HsExpr GhcPs)) #

mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located (HsExpr GhcPs)) #

mkHsOverLitPV :: LocatedAn a (HsOverLit GhcPs) -> PV (LocatedAn a (HsExpr GhcPs)) #

mkHsWildCardPV :: SrcSpan -> PV (Located (HsExpr GhcPs)) #

mkHsTySigPV :: SrcSpanAnnA -> LocatedA (HsExpr GhcPs) -> LHsType GhcPs -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

mkHsExplicitListPV :: SrcSpan -> [LocatedA (HsExpr GhcPs)] -> AnnList -> PV (LocatedA (HsExpr GhcPs)) #

mkHsSplicePV :: Located (HsUntypedSplice GhcPs) -> PV (Located (HsExpr GhcPs)) #

mkHsRecordPV :: Bool -> SrcSpan -> SrcSpan -> LocatedA (HsExpr GhcPs) -> ([Fbind (HsExpr GhcPs)], Maybe SrcSpan) -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

mkHsNegAppPV :: SrcSpan -> LocatedA (HsExpr GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

mkHsSectionR_PV :: SrcSpan -> LocatedA (InfixOp (HsExpr GhcPs)) -> LocatedA (HsExpr GhcPs) -> PV (Located (HsExpr GhcPs)) #

mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> LocatedA (HsExpr GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

mkHsAsPatPV :: SrcSpan -> LocatedN RdrName -> LHsToken "@" GhcPs -> LocatedA (HsExpr GhcPs) -> PV (LocatedA (HsExpr GhcPs)) #

mkHsLazyPatPV :: SrcSpan -> LocatedA (HsExpr GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

mkHsBangPatPV :: SrcSpan -> LocatedA (HsExpr GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

mkSumOrTuplePV :: SrcSpanAnnA -> Boxity -> SumOrTuple (HsExpr GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

rejectPragmaPV :: LocatedA (HsExpr GhcPs) -> PV () #

DisambInfixOp (HsExpr GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type Body (HsExpr GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type FunArg (HsExpr GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type InfixOp (HsExpr GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (HsExpr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsExpr (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno (GRHS (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

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
Data RdrName 
Instance details

Defined in GHC.Types.Name.Reader

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 #

DisambInfixOp RdrName 
Instance details

Defined in GHC.Parser.PostProcess

HasOccName RdrName 
Instance details

Defined in GHC.Types.Name.Reader

Methods

occName :: RdrName -> OccName #

Outputable RdrName 
Instance details

Defined in GHC.Types.Name.Reader

Methods

ppr :: RdrName -> SDoc #

OutputableBndr RdrName 
Instance details

Defined in GHC.Types.Name.Reader

Eq RdrName 
Instance details

Defined in GHC.Types.Name.Reader

Methods

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

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

Ord RdrName 
Instance details

Defined in GHC.Types.Name.Reader

type Anno RdrName 
Instance details

Defined in GHC.Hs.Extension

type Anno (LocatedN RdrName) 
Instance details

Defined in GHC.Hs.Binds

type Anno [LocatedN RdrName] 
Instance details

Defined in GHC.Hs.Binds

type Id = Var #

Identifier

data Subst #

Type & coercion & id substitution

The Subst data type defined in this module contains substitution for tyvar, covar and id. However, operations on IdSubstEnv (mapping from Id to CoreExpr) that require the definition of the Expr data type are defined in GHC.Core.Subst to avoid circular module dependency.

Instances

Instances details
Outputable Subst 
Instance details

Defined in GHC.Core.TyCo.Subst

Methods

ppr :: Subst -> SDoc #

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 DataConCantHappen, 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
Data NoExtField 
Instance details

Defined in Language.Haskell.Syntax.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 #

Eq NoExtField 
Instance details

Defined in Language.Haskell.Syntax.Extension

Ord NoExtField 
Instance details

Defined in Language.Haskell.Syntax.Extension

data FloatOutSwitches #

Constructors

FloatOutSwitches 

Fields

  • floatOutLambdas :: Maybe Int

    Just n = float lambdas to top level, if doing so will abstract over n or fewer value variables Nothing = float all lambdas to top level, regardless of how many free variables Just 0 is the vanilla case: float a lambda iff it has no free vars

  • floatOutConstants :: Bool

    True = float constants to top level, even if they do not escape a lambda

  • floatOutOverSatApps :: Bool

    True = float out over-saturated applications based on arity information. See Note [Floating over-saturated applications] in GHC.Core.Opt.SetLevels

  • floatToTopLevelOnly :: Bool

    Allow floating to the top level only.

Instances

Instances details
Outputable FloatOutSwitches 
Instance details

Defined in GHC.Core.Opt.Monad

Methods

ppr :: FloatOutSwitches -> SDoc #

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

newtype 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.

data Plugin #

Plugin is the compiler plugin data type. Try to avoid constructing one of these directly, and just modify some fields of defaultPlugin instead: this is to try and preserve source-code compatibility when we add fields to this.

Nonetheless, this API is preliminary and highly likely to change in the future.

Constructors

Plugin 

Fields

data GenericUnitInfo srcpkgid srcpkgname uid modulename mod #

Information about an unit (a unit is an installed module library).

This is a subset of Cabal's InstalledPackageInfo, with just the bits that GHC is interested in.

Some types are left as parameters to be instantiated differently in ghc-pkg and in ghc itself.

Constructors

GenericUnitInfo 

Fields

  • unitId :: uid

    Unique unit identifier that is used during compilation (e.g. to generate symbols).

  • unitInstanceOf :: uid

    Identifier of an indefinite unit (i.e. with module holes) that this unit is an instance of.

    For non instantiated units, unitInstanceOf=unitId

  • unitInstantiations :: [(modulename, mod)]

    How this unit instantiates some of its module holes. Map hole module names to actual module

  • unitPackageId :: srcpkgid

    Source package identifier.

    Cabal instantiates this with Distribution.Types.PackageId.PackageId type which only contains the source package name and version. Notice that it doesn't contain the Hackage revision, nor any kind of hash.

  • unitPackageName :: srcpkgname

    Source package name

  • unitPackageVersion :: Version

    Source package version

  • unitComponentName :: Maybe srcpkgname

    Name of the component.

    Cabal supports more than one components (libraries, executables, testsuites) in the same package. Each component has a name except the default one (that can only be a library component) for which we use Nothing.

    GHC only deals with "library" components as they are the only kind of components that can be registered in a database and used by other modules.

  • unitAbiHash :: ShortText

    ABI hash used to avoid mixing up units compiled with different dependencies, compiler, options, etc.

  • unitDepends :: [uid]

    Identifiers of the units this one depends on

  • unitAbiDepends :: [(uid, ShortText)]

    Like unitDepends, but each dependency is annotated with the ABI hash we expect the dependency to respect.

  • unitImportDirs :: [FilePathST]

    Directories containing module interfaces

  • unitLibraries :: [ShortText]

    Names of the Haskell libraries provided by this unit

  • unitExtDepLibsSys :: [ShortText]

    Names of the external system libraries that this unit depends on. See also unitExtDepLibsGhc field.

  • unitExtDepLibsGhc :: [ShortText]

    Because of slight differences between the GHC dynamic linker (in GHC.Runtime.Linker) and the native system linker, some packages have to link with a different list of libraries when using GHC's. Examples include: libs that are actually gnu ld scripts, and the possibility that the .a libs do not exactly match the .so/.dll equivalents.

    If this field is set, then we use that instead of the unitExtDepLibsSys field.

  • unitLibraryDirs :: [FilePathST]

    Directories containing libraries provided by this unit. See also unitLibraryDynDirs.

    It seems to be used to store paths to external library dependencies too.

  • unitLibraryDynDirs :: [FilePathST]

    Directories containing the dynamic libraries provided by this unit. See also unitLibraryDirs.

    It seems to be used to store paths to external dynamic library dependencies too.

  • unitExtDepFrameworks :: [ShortText]

    Names of the external MacOS frameworks that this unit depends on.

  • unitExtDepFrameworkDirs :: [FilePathST]

    Directories containing MacOS frameworks that this unit depends on.

  • unitLinkerOptions :: [ShortText]

    Linker (e.g. ld) command line options

  • unitCcOptions :: [ShortText]

    C compiler options that needs to be passed to the C compiler when we compile some C code against this unit.

  • unitIncludes :: [ShortText]

    C header files that are required by this unit (provided by this unit or external)

  • unitIncludeDirs :: [FilePathST]

    Directories containing C header files that this unit depends on.

  • unitHaddockInterfaces :: [FilePathST]

    Paths to Haddock interface files for this unit

  • unitHaddockHTMLs :: [FilePathST]

    Paths to Haddock directories containing HTML files

  • unitExposedModules :: [(modulename, Maybe mod)]

    Modules exposed by the unit.

    A module can be re-exported from another package. In this case, we indicate the module origin in the second parameter.

  • unitHiddenModules :: [modulename]

    Hidden modules.

    These are useful for error reporting (e.g. if a hidden module is imported)

  • unitIsIndefinite :: Bool

    True if this unit has some module holes that need to be instantiated with real modules to make the unit usable (a.k.a. Backpack).

  • unitIsExposed :: Bool

    True if the unit is exposed. A unit could be installed in a database by "disabled" by not being exposed.

  • unitIsTrusted :: Bool

    True if the unit is trusted (cf Safe Haskell)

Instances

Instances details
Binary DbUnitInfo 
Instance details

Defined in GHC.Unit.Database

(Show uid, Show modulename, Show mod, Show srcpkgid, Show srcpkgname) => Show (GenericUnitInfo srcpkgid srcpkgname uid modulename mod) 
Instance details

Defined in GHC.Unit.Database

Methods

showsPrec :: Int -> GenericUnitInfo srcpkgid srcpkgname uid modulename mod -> ShowS #

show :: GenericUnitInfo srcpkgid srcpkgname uid modulename mod -> String #

showList :: [GenericUnitInfo srcpkgid srcpkgname uid modulename mod] -> ShowS #

(Eq uid, Eq modulename, Eq mod, Eq srcpkgid, Eq srcpkgname) => Eq (GenericUnitInfo srcpkgid srcpkgname uid modulename mod) 
Instance details

Defined in GHC.Unit.Database

Methods

(==) :: GenericUnitInfo srcpkgid srcpkgname uid modulename mod -> GenericUnitInfo srcpkgid srcpkgname uid modulename mod -> Bool #

(/=) :: GenericUnitInfo srcpkgid srcpkgname uid modulename mod -> GenericUnitInfo srcpkgid srcpkgname uid modulename mod -> Bool #

data ForeignSrcLang #

Foreign formats supported by GHC via TH

Constructors

LangC

C

LangCxx

C++

LangObjc

Objective C

LangObjcxx

Objective C++

LangAsm

Assembly language (.s)

LangJs

JavaScript

RawObject

Object (.o)

Instances

Instances details
Generic ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Associated Types

type Rep ForeignSrcLang :: Type -> Type #

Show ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Eq ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

type Rep ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

type Rep ForeignSrcLang = D1 ('MetaData "ForeignSrcLang" "GHC.ForeignSrcLang.Type" "ghc-boot-th-9.6.3" '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 "LangJs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RawObject" 'PrefixI 'False) (U1 :: Type -> Type))))

type HasDebugCallStack = () #

A call stack constraint, but only when isDebugOn.

data Direction #

Constructors

Forwards 
Backwards 

type Suffix = String #

data PtrString #

A PtrString is a pointer to some array of Latin-1 encoded chars.

Constructors

PtrString !(Ptr Word8) !Int 

newtype LexicalFastString #

Lexical FastString

This is a simple FastString wrapper with an Ord instance using lexicalCompareFS (i.e. which compares FastStrings on their String representation). Hence it is deterministic from one run to the other.

Instances

Instances details
Data LexicalFastString 
Instance details

Defined in GHC.Data.FastString

Methods

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

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

toConstr :: LexicalFastString -> Constr #

dataTypeOf :: LexicalFastString -> DataType #

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

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

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

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

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

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

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

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

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

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

Show LexicalFastString 
Instance details

Defined in GHC.Data.FastString

Outputable LexicalFastString 
Instance details

Defined in GHC.Utils.Outputable

Eq LexicalFastString 
Instance details

Defined in GHC.Data.FastString

Ord LexicalFastString 
Instance details

Defined in GHC.Data.FastString

newtype NonDetFastString #

Non-deterministic FastString

This is a simple FastString wrapper with an Ord instance using uniqCompareFS (i.e. which compares FastStrings on their Uniques). Hence it is not deterministic from one run to the other.

Instances

Instances details
Data NonDetFastString 
Instance details

Defined in GHC.Data.FastString

Methods

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

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

toConstr :: NonDetFastString -> Constr #

dataTypeOf :: NonDetFastString -> DataType #

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

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

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

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

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

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

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

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

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

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

Show NonDetFastString 
Instance details

Defined in GHC.Data.FastString

Outputable NonDetFastString 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: NonDetFastString -> SDoc #

Eq NonDetFastString 
Instance details

Defined in GHC.Data.FastString

Ord NonDetFastString 
Instance details

Defined in GHC.Data.FastString

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
Data FastString 
Instance details

Defined in GHC.Data.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 #

IsString FastString 
Instance details

Defined in GHC.Data.FastString

Monoid FastString 
Instance details

Defined in GHC.Data.FastString

Semigroup FastString 
Instance details

Defined in GHC.Data.FastString

Show FastString 
Instance details

Defined in GHC.Data.FastString

NFData FastString 
Instance details

Defined in GHC.Data.FastString

Methods

rnf :: FastString -> () #

ToJExpr FastString 
Instance details

Defined in GHC.JS.Make

Uniquable FastString 
Instance details

Defined in GHC.Types.Unique

Outputable FastString 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: FastString -> SDoc #

Eq FastString 
Instance details

Defined in GHC.Data.FastString

ToJExpr a => ToJExpr (UniqMap FastString a) 
Instance details

Defined in GHC.JS.Make

type Anno FastString 
Instance details

Defined in GHC.Hs.Expr

type Anno (SourceText, RuleName) 
Instance details

Defined in GHC.Hs.Decls

data FastZString #

Instances

Instances details
NFData FastZString 
Instance details

Defined in GHC.Data.FastString

Methods

rnf :: FastZString -> () #

data SrcUnpackedness #

Source Unpackedness

What unpackedness the user requested

Constructors

SrcUnpack

{-# UNPACK #-} specified

SrcNoUnpack

{-# NOUNPACK #-} specified

NoSrcUnpack

no unpack pragma

Instances

Instances details
Data SrcUnpackedness 
Instance details

Defined in Language.Haskell.Syntax.Basic

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 #

Eq SrcUnpackedness 
Instance details

Defined in Language.Haskell.Syntax.Basic

data SrcStrictness #

Source Strictness

What strictness annotation the user wrote

Constructors

SrcLazy

Lazy, ie ~

SrcStrict

Strict, ie !

NoSrcStrict

no strictness annotation

Instances

Instances details
Data SrcStrictness 
Instance details

Defined in Language.Haskell.Syntax.Basic

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 #

Eq SrcStrictness 
Instance details

Defined in Language.Haskell.Syntax.Basic

data Role #

See Note [Roles] in GHC.Core.Coercion

Order of constructors matters: the Ord instance coincides with the *super*typing relation on roles.

Instances

Instances details
Data Role 
Instance details

Defined in Language.Haskell.Syntax.Basic

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 #

Eq Role 
Instance details

Defined in Language.Haskell.Syntax.Basic

Methods

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

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

Ord Role 
Instance details

Defined in Language.Haskell.Syntax.Basic

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 #

type Anno (Maybe Role) 
Instance details

Defined in GHC.Hs.Decls

type Anno (Maybe Role) 
Instance details

Defined in GHC.Hs.Decls

data FieldLabelString #

Field labels are just represented as strings; they are not necessarily unique (even within a module)

Instances

Instances details
Data FieldLabelString 
Instance details

Defined in Language.Haskell.Syntax.Basic

Methods

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

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

toConstr :: FieldLabelString -> Constr #

dataTypeOf :: FieldLabelString -> DataType #

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

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

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

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

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

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

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

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

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

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

NFData FieldLabelString 
Instance details

Defined in Language.Haskell.Syntax.Basic

Methods

rnf :: FieldLabelString -> () #

Eq FieldLabelString 
Instance details

Defined in Language.Haskell.Syntax.Basic

type Anno FieldLabelString 
Instance details

Defined in GHC.Hs.Expr

type ConTag = Int #

A *one-index* constructor tag

Type of the tags associated with each constructor possibility or superclass selector

data Boxity #

Constructors

Boxed 
Unboxed 

Instances

Instances details
Data Boxity 
Instance details

Defined in Language.Haskell.Syntax.Basic

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 #

Eq Boxity 
Instance details

Defined in Language.Haskell.Syntax.Basic

Methods

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

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

type family NoGhcTc p #

See Note [NoGhcTc] in GHC.Hs.Extension. It has to be in this module because it is used like an extension point (in the data definitions of types that should be parameter-agnostic.

Instances

Instances details
type NoGhcTc (GhcPass pass)

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. See Note [NoGhcTc]

Instance details

Defined in GHC.Hs.Extension

type NoGhcTc (GhcPass pass) = GhcPass (NoGhcTcPass pass)

type family XXIEWrappedName p #

Instances

Instances details
type XXIEWrappedName (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XIEType p #

Instances

Instances details
type XIEType (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XIEPattern p #

Instances

Instances details
type XIEPattern (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XIEName p #

Instances

Instances details
type XIEName (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 family XIEDocNamed x #

Instances

Instances details
type XIEDocNamed (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 XIEGroup x #

Instances

Instances details
type XIEGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XIEModuleContents x #

Instances

Instances details
type XIEModuleContents GhcPs 
Instance details

Defined in GHC.Hs.ImpExp

type XIEModuleContents GhcRn 
Instance details

Defined in GHC.Hs.ImpExp

type XIEModuleContents GhcTc 
Instance details

Defined in GHC.Hs.ImpExp

type family XIEThingWith x #

Instances

Instances details
type XIEThingWith (GhcPass 'Parsed) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEThingWith (GhcPass 'Renamed) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEThingWith (GhcPass 'Typechecked) 
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 XIEThingAbs x #

Instances

Instances details
type XIEThingAbs (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type family XIEVar x #

Instances

Instances details
type XIEVar GhcPs 
Instance details

Defined in GHC.Hs.ImpExp

type XIEVar GhcRn 
Instance details

Defined in GHC.Hs.ImpExp

type XIEVar GhcTc 
Instance details

Defined in GHC.Hs.ImpExp

type family ImportDeclPkgQual x #

Instances

Instances details
type ImportDeclPkgQual GhcPs 
Instance details

Defined in GHC.Hs.ImpExp

type ImportDeclPkgQual GhcRn 
Instance details

Defined in GHC.Hs.ImpExp

type ImportDeclPkgQual GhcTc 
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 family XCImportDecl x #

Instances

Instances details
type XCImportDecl GhcPs 
Instance details

Defined in GHC.Hs.ImpExp

type XCImportDecl GhcRn 
Instance details

Defined in GHC.Hs.ImpExp

type XCImportDecl GhcTc 
Instance details

Defined in GHC.Hs.ImpExp

type family XXFieldOcc x #

Instances

Instances details
type XXFieldOcc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XCFieldOcc x #

Instances

Instances details
type XCFieldOcc GhcPs 
Instance details

Defined in GHC.Hs.Type

type XCFieldOcc GhcRn 
Instance details

Defined in GHC.Hs.Type

type XCFieldOcc GhcTc 
Instance details

Defined in GHC.Hs.Type

type family XXConDeclField x #

Instances

Instances details
type XXConDeclField (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XConDeclField x #

Instances

Instances details
type XConDeclField (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XXTyVarBndr x #

Instances

Instances details
type XXTyVarBndr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XKindedTyVar x #

Instances

Instances details
type XKindedTyVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XUserTyVar x #

Instances

Instances details
type XUserTyVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XXHsForAllTelescope x #

Instances

Instances details
type XXHsForAllTelescope (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XHsForAllInvis x #

Instances

Instances details
type XHsForAllInvis (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XHsForAllVis x #

Instances

Instances details
type XHsForAllVis (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XXTyLit x #

Instances

Instances details
type XXTyLit (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XCharTy x #

Instances

Instances details
type XCharTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XStrTy x #

Instances

Instances details
type XStrTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XNumTy x #

Instances

Instances details
type XNumTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XXType x #

Instances

Instances details
type XXType (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XXType (GhcPass _1) = HsCoreTy

type family XWildCardTy x #

Instances

Instances details
type XWildCardTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XTyLit x #

Instances

Instances details
type XTyLit (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XExplicitTupleTy x #

Instances

Instances details
type XExplicitTupleTy GhcPs 
Instance details

Defined in GHC.Hs.Type

type XExplicitTupleTy GhcRn 
Instance details

Defined in GHC.Hs.Type

type XExplicitTupleTy GhcTc 
Instance details

Defined in GHC.Hs.Type

type family XExplicitListTy x #

Instances

Instances details
type XExplicitListTy GhcPs 
Instance details

Defined in GHC.Hs.Type

type XExplicitListTy GhcRn 
Instance details

Defined in GHC.Hs.Type

type XExplicitListTy GhcTc 
Instance details

Defined in GHC.Hs.Type

type family XRecTy x #

Instances

Instances details
type XRecTy GhcPs 
Instance details

Defined in GHC.Hs.Type

type XRecTy GhcRn 
Instance details

Defined in GHC.Hs.Type

type XRecTy GhcTc 
Instance details

Defined in GHC.Hs.Type

type family XBangTy x #

Instances

Instances details
type XBangTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XDocTy x #

Instances

Instances details
type XDocTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XSpliceTy x #

Instances

Instances details
type XSpliceTy GhcPs 
Instance details

Defined in GHC.Hs.Type

type XSpliceTy GhcRn 
Instance details

Defined in GHC.Hs.Type

type XSpliceTy GhcTc 
Instance details

Defined in GHC.Hs.Type

type family XKindSig x #

Instances

Instances details
type XKindSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XStarTy x #

Instances

Instances details
type XStarTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XIParamTy x #

Instances

Instances details
type XIParamTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XParTy x #

Instances

Instances details
type XParTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XOpTy x #

Instances

Instances details
type XOpTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XOpTy (GhcPass _1) = EpAnn [AddEpAnn]

type family XSumTy x #

Instances

Instances details
type XSumTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XTupleTy x #

Instances

Instances details
type XTupleTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XListTy x #

Instances

Instances details
type XListTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XFunTy x #

Instances

Instances details
type XFunTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XFunTy (GhcPass _1) = EpAnnCO

type family XAppKindTy x #

Instances

Instances details
type XAppKindTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XAppTy x #

Instances

Instances details
type XAppTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XTyVar x #

Instances

Instances details
type XTyVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XQualTy x #

Instances

Instances details
type XQualTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XForAllTy x #

Instances

Instances details
type XForAllTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XXHsPatSigType x #

Instances

Instances details
type XXHsPatSigType (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XHsPS x #

Instances

Instances details
type XHsPS GhcPs 
Instance details

Defined in GHC.Hs.Type

type XHsPS GhcRn 
Instance details

Defined in GHC.Hs.Type

type XHsPS GhcTc 
Instance details

Defined in GHC.Hs.Type

type family XXHsWildCardBndrs x b #

Instances

Instances details
type XXHsWildCardBndrs (GhcPass _1) _2 
Instance details

Defined in GHC.Hs.Type

type family XHsWC x b #

Instances

Instances details
type XHsWC GhcPs b 
Instance details

Defined in GHC.Hs.Type

type XHsWC GhcRn b 
Instance details

Defined in GHC.Hs.Type

type XHsWC GhcRn b = [Name]
type XHsWC GhcTc b 
Instance details

Defined in GHC.Hs.Type

type XHsWC GhcTc b = [Name]

type family XXHsSigType x #

Instances

Instances details
type XXHsSigType (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XHsSig x #

Instances

Instances details
type XHsSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XXHsOuterTyVarBndrs x #

Instances

Instances details
type XXHsOuterTyVarBndrs (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XHsOuterExplicit x flag #

Instances

Instances details
type XHsOuterExplicit GhcPs _1 
Instance details

Defined in GHC.Hs.Type

type XHsOuterExplicit GhcRn _1 
Instance details

Defined in GHC.Hs.Type

type XHsOuterExplicit GhcTc flag 
Instance details

Defined in GHC.Hs.Type

type XHsOuterExplicit GhcTc flag = [VarBndr TyVar flag]

type family XHsOuterImplicit x #

Instances

Instances details
type XHsOuterImplicit GhcPs 
Instance details

Defined in GHC.Hs.Type

type XHsOuterImplicit GhcRn 
Instance details

Defined in GHC.Hs.Type

type XHsOuterImplicit GhcTc 
Instance details

Defined in GHC.Hs.Type

type family XXLHsQTyVars x #

Instances

Instances details
type XXLHsQTyVars (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XHsQTvs x #

Instances

Instances details
type XHsQTvs GhcPs 
Instance details

Defined in GHC.Hs.Type

type XHsQTvs GhcRn 
Instance details

Defined in GHC.Hs.Type

type XHsQTvs GhcRn = HsQTvsRn
type XHsQTvs GhcTc 
Instance details

Defined in GHC.Hs.Type

type XHsQTvs GhcTc = HsQTvsRn

type family XHsFieldBind x #

Instances

Instances details
type XHsFieldBind _1 
Instance details

Defined in GHC.Hs.Pat

type family XXPat x #

Instances

Instances details
type XXPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XXPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XXPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type family XCoPat x #

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 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 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 XLitPat x #

Instances

Instances details
type XLitPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type family XSplicePat x #

Instances

Instances details
type XSplicePat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XSplicePat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XSplicePat GhcTc 
Instance details

Defined in GHC.Hs.Pat

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 XConPat x #

Instances

Instances details
type XConPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XConPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XConPat 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 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 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 XBangPat x #

Instances

Instances details
type XBangPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XBangPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XBangPat GhcTc 
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 XParPat (GhcPass _1) = EpAnnCO

type family XAsPat x #

Instances

Instances details
type XAsPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XAsPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XAsPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type family XLazyPat x #

Instances

Instances details
type XLazyPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XLazyPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XLazyPat 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 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 XXOverLit x #

Instances

Instances details
type XXOverLit (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

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 XXLit x #

Instances

Instances details
type XXLit (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 XHsFloatPrim x #

Instances

Instances details
type XHsFloatPrim (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 XHsInteger x #

Instances

Instances details
type XHsInteger (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 XHsInt64Prim x #

Instances

Instances details
type XHsInt64Prim (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 XHsIntPrim x #

Instances

Instances details
type XHsIntPrim (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 XHsStringPrim x #

Instances

Instances details
type XHsStringPrim (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 XHsCharPrim x #

Instances

Instances details
type XHsCharPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XHsChar x #

Instances

Instances details
type XHsChar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type family XXApplicativeArg x #

Instances

Instances details
type XXApplicativeArg (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 XApplicativeArgOne x #

Instances

Instances details
type XApplicativeArgOne GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XApplicativeArgOne GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XApplicativeArgOne GhcTc 
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 family XParStmtBlock x x' #

Instances

Instances details
type XParStmtBlock (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Expr

type family XXCmd x #

Instances

Instances details
type XXCmd GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XXCmd GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XXCmd 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 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 XCmdLet x #

Instances

Instances details
type XCmdLet GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdLet GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdLet GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XCmdIf x #

Instances

Instances details
type XCmdIf GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdIf GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdIf GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XCmdLamCase x #

Instances

Instances details
type XCmdLamCase (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XCmdCase x #

Instances

Instances details
type XCmdCase GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdCase GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdCase GhcTc 
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 XCmdPar (GhcPass _1) = EpAnnCO

type family XCmdLam x #

Instances

Instances details
type XCmdLam (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 XCmdApp (GhcPass _1) = EpAnnCO

type family XCmdArrForm x #

Instances

Instances details
type XCmdArrForm GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdArrForm GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdArrForm GhcTc 
Instance details

Defined in GHC.Hs.Expr

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 XXStmtLR x x' b #

Instances

Instances details
type XXStmtLR (GhcPass _1) (GhcPass _2) b 
Instance details

Defined in GHC.Hs.Expr

type family XRecStmt x x' b #

Instances

Instances details
type XRecStmt (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) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type family XTransStmt x x' b #

Instances

Instances details
type XTransStmt (GhcPass _1) GhcPs 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) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type family XParStmt x x' b #

Instances

Instances details
type XParStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XParStmt (GhcPass _1) GhcRn 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 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 = EpAnn [AddEpAnn]

type family XBodyStmt x x' b #

Instances

Instances details
type XBodyStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XBodyStmt (GhcPass _1) GhcRn 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 family XApplicativeStmt x x' b #

Instances

Instances details
type XApplicativeStmt (GhcPass _1) GhcPs 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) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type family XBindStmt x x' b #

Instances

Instances details
type XBindStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XBindStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XBindStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

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 XXGRHS x b #

Instances

Instances details
type XXGRHS (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type family XCGRHS x b #

Instances

Instances details
type XCGRHS (GhcPass _1) _2 
Instance details

Defined in GHC.Hs.Expr

type XCGRHS (GhcPass _1) _2 = EpAnn GrhsAnn

type family XXGRHSs x b #

Instances

Instances details
type XXGRHSs (GhcPass _1) _2 
Instance details

Defined in GHC.Hs.Expr

type family XCGRHSs x b #

Instances

Instances details
type XCGRHSs (GhcPass _1) _2 
Instance details

Defined in GHC.Hs.Expr

type family XXMatch x b #

Instances

Instances details
type XXMatch (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

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 = EpAnn [AddEpAnn]

type family XXMatchGroup x b #

Instances

Instances details
type XXMatchGroup (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type family XMG x b #

Instances

Instances details
type XMG GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XMG GhcPs b = Origin
type XMG GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XMG GhcRn b = Origin
type XMG GhcTc b 
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 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 XXQuote x #

Instances

Instances details
type XXQuote GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XXQuote GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XXQuote GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XVarBr x #

Instances

Instances details
type XVarBr GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XVarBr GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XVarBr GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XTypBr x #

Instances

Instances details
type XTypBr GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XTypBr GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XTypBr GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XDecBrG x #

Instances

Instances details
type XDecBrG GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XDecBrG GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XDecBrG GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XDecBrL x #

Instances

Instances details
type XDecBrL GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XDecBrL GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XDecBrL GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XPatBr x #

Instances

Instances details
type XPatBr GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XPatBr GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XPatBr GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XExpBr x #

Instances

Instances details
type XExpBr GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XExpBr GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XExpBr GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XXUntypedSplice x #

Instances

Instances details
type XXUntypedSplice p 
Instance details

Defined in GHC.Hs.Expr

type family XQuasiQuote x #

Instances

Instances details
type XQuasiQuote p 
Instance details

Defined in GHC.Hs.Expr

type family XUntypedSpliceExpr x #

Instances

Instances details
type XUntypedSpliceExpr GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XUntypedSpliceExpr GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XUntypedSpliceExpr 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 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 XPresent x #

Instances

Instances details
type XPresent (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XXAmbiguousFieldOcc x #

Instances

Instances details
type XXAmbiguousFieldOcc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type family XAmbiguous x #

Instances

Instances details
type XAmbiguous GhcPs 
Instance details

Defined in GHC.Hs.Type

type XAmbiguous GhcRn 
Instance details

Defined in GHC.Hs.Type

type XAmbiguous GhcTc 
Instance details

Defined in GHC.Hs.Type

type family XUnambiguous x #

Instances

Instances details
type XUnambiguous GhcPs 
Instance details

Defined in GHC.Hs.Type

type XUnambiguous GhcRn 
Instance details

Defined in GHC.Hs.Type

type XUnambiguous GhcTc 
Instance details

Defined in GHC.Hs.Type

type family XXPragE x #

Instances

Instances details
type XXPragE (GhcPass _1) 
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 family XXDotFieldOcc x #

Instances

Instances details
type XXDotFieldOcc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XCDotFieldOcc x #

Instances

Instances details
type XCDotFieldOcc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XXExpr x #

Instances

Instances details
type XXExpr GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XXExpr GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XXExpr GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XPragE x #

Instances

Instances details
type XPragE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XBinTick x #

type family XTick x #

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 XProc x #

Instances

Instances details
type XProc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XProc (GhcPass _1) = EpAnn [AddEpAnn]

type family XUntypedSplice x #

Instances

Instances details
type XUntypedSplice GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XUntypedSplice GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XUntypedSplice GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XTypedSplice x #

Instances

Instances details
type XTypedSplice GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XTypedSplice GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XTypedSplice GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XUntypedBracket x #

Instances

Instances details
type XUntypedBracket GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XUntypedBracket GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XUntypedBracket GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XTypedBracket x #

Instances

Instances details
type XTypedBracket GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XTypedBracket GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XTypedBracket GhcTc 
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 XExprWithTySig x #

Instances

Instances details
type XExprWithTySig GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XExprWithTySig GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XExprWithTySig GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XProjection x #

Instances

Instances details
type XProjection GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XProjection GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XProjection GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XGetField x #

Instances

Instances details
type XGetField GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XGetField GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XGetField 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 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 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 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 XLet x #

Instances

Instances details
type XLet GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XLet GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XLet GhcTc 
Instance details

Defined in GHC.Hs.Expr

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 XIf x #

Instances

Instances details
type XIf GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XIf GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XIf GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XCase x #

Instances

Instances details
type XCase GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCase GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCase GhcTc 
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 XExplicitTuple x #

Instances

Instances details
type XExplicitTuple GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XExplicitTuple GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XExplicitTuple GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XSectionR x #

Instances

Instances details
type XSectionR GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XSectionR GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XSectionR GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XSectionL x #

Instances

Instances details
type XSectionL GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XSectionL GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XSectionL GhcTc 
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) = EpAnnCO

type family XNegApp x #

Instances

Instances details
type XNegApp GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XNegApp GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XNegApp GhcTc 
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 XAppTypeE x #

Instances

Instances details
type XAppTypeE GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XAppTypeE GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XAppTypeE GhcTc 
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) = EpAnnCO

type family XLamCase x #

Instances

Instances details
type XLamCase (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 XLam (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XLam (GhcPass _1) = NoExtField

type family XLitE x #

Instances

Instances details
type XLitE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XLitE (GhcPass _1) = EpAnnCO

type family XOverLitE x #

Instances

Instances details
type XOverLitE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type family XIPVar x #

Instances

Instances details
type XIPVar GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XIPVar GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XIPVar GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XOverLabel x #

Instances

Instances details
type XOverLabel GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XOverLabel GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XOverLabel GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XRecSel x #

Instances

Instances details
type XRecSel GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XRecSel GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XRecSel GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XUnboundVar x #

Instances

Instances details
type XUnboundVar GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XUnboundVar GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XUnboundVar GhcTc 
Instance details

Defined in GHC.Hs.Expr

type family XVar x #

Instances

Instances details
type XVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XVar (GhcPass _1) = NoExtField
type XVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XVar (GhcPass _1) = NoExtField

type family XXModule x #

Instances

Instances details
type XXModule p 
Instance details

Defined in GHC.Hs

type family XCModule x #

Instances

Instances details
type XCModule GhcPs 
Instance details

Defined in GHC.Hs

type XCModule GhcRn 
Instance details

Defined in GHC.Hs

type XCModule GhcTc 
Instance details

Defined in GHC.Hs

type family XXInjectivityAnn x #

Instances

Instances details
type XXInjectivityAnn (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XCInjectivityAnn x #

Instances

Instances details
type XCInjectivityAnn (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 XCRoleAnnotDecl x #

Instances

Instances details
type XCRoleAnnotDecl GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XCRoleAnnotDecl GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XCRoleAnnotDecl GhcTc 
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 family XHsAnnotation x #

Instances

Instances details
type XHsAnnotation (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 family XWarning x #

Instances

Instances details
type XWarning (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 family XWarnings x #

Instances

Instances details
type XWarnings GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XWarnings GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XWarnings GhcTc 
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 family XRuleBndrSig x #

Instances

Instances details
type XRuleBndrSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XCRuleBndr x #

Instances

Instances details
type XCRuleBndr (GhcPass _1) 
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 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 XXRuleDecls x #

Instances

Instances details
type XXRuleDecls (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XCRuleDecls x #

Instances

Instances details
type XCRuleDecls GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XCRuleDecls GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XCRuleDecls GhcTc 
Instance details

Defined in GHC.Hs.Decls

type family XXForeignExport x #

Instances

Instances details
type XXForeignExport (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XCExport x #

Instances

Instances details
type XCExport (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXForeignImport x #

Instances

Instances details
type XXForeignImport (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XCImport x #

Instances

Instances details
type XCImport (GhcPass _1) 
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 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 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 XXDefaultDecl x #

Instances

Instances details
type XXDefaultDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XCDefaultDecl x #

Instances

Instances details
type XCDefaultDecl GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XCDefaultDecl GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XCDefaultDecl GhcTc 
Instance details

Defined in GHC.Hs.Decls

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 XNewtypeStrategy x #

Instances

Instances details
type XNewtypeStrategy GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XNewtypeStrategy GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XNewtypeStrategy GhcTc 
Instance details

Defined in GHC.Hs.Decls

type family XAnyClassStrategy x #

Instances

Instances details
type XAnyClassStrategy GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XAnyClassStrategy GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XAnyClassStrategy GhcTc 
Instance details

Defined in GHC.Hs.Decls

type family XStockStrategy x #

Instances

Instances details
type XStockStrategy GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XStockStrategy GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XStockStrategy GhcTc 
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 family XCDerivDecl x #

Instances

Instances details
type XCDerivDecl (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 family XTyFamInstD x #

Instances

Instances details
type XTyFamInstD GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XTyFamInstD GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XTyFamInstD GhcTc 
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 XClsInstD x #

Instances

Instances details
type XClsInstD (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 XCClsInstDecl x #

Instances

Instances details
type XCClsInstDecl GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XCClsInstDecl GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XCClsInstDecl GhcTc 
Instance details

Defined in GHC.Hs.Decls

type family XXTyFamInstDecl x #

Instances

Instances details
type XXTyFamInstDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XCTyFamInstDecl x #

Instances

Instances details
type XCTyFamInstDecl (GhcPass _1) 
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 family XCFamEqn x r #

Instances

Instances details
type XCFamEqn (GhcPass _1) r 
Instance details

Defined in GHC.Hs.Decls

type XCFamEqn (GhcPass _1) r = EpAnn [AddEpAnn]

type family XXConDecl x #

Instances

Instances details
type XXConDecl (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 XConDeclGADT x #

Instances

Instances details
type XConDeclGADT (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXDerivClauseTys x #

Instances

Instances details
type XXDerivClauseTys (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XDctMulti x #

Instances

Instances details
type XDctMulti (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XDctSingle x #

Instances

Instances details
type XDctSingle (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 XCHsDerivingClause x #

Instances

Instances details
type XCHsDerivingClause (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 family XCHsDataDefn x #

Instances

Instances details
type XCHsDataDefn (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 family XCFamilyDecl x #

Instances

Instances details
type XCFamilyDecl (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 family XTyVarSig x #

Instances

Instances details
type XTyVarSig (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 XNoSig x #

Instances

Instances details
type XNoSig (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 family XCTyClGroup x #

Instances

Instances details
type XCTyClGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XXFunDep x #

Instances

Instances details
type XXFunDep (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type family XCFunDep x #

Instances

Instances details
type XCFunDep (GhcPass _1) 
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 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 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 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 XFamDecl x #

Instances

Instances details
type XFamDecl (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 family XSpliceDecl x #

Instances

Instances details
type XSpliceDecl (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 family XCHsGroup x #

Instances

Instances details
type XCHsGroup (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 family XRoleAnnotD x #

Instances

Instances details
type XRoleAnnotD (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 XSpliceD x #

Instances

Instances details
type XSpliceD (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 XAnnD x #

Instances

Instances details
type XAnnD (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 XForD x #

Instances

Instances details
type XForD (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 XKindSigD x #

Instances

Instances details
type XKindSigD (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 XValD x #

Instances

Instances details
type XValD (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 XInstD x #

Instances

Instances details
type XInstD (GhcPass _1) 
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 XXStandaloneKindSig x #

Instances

Instances details
type XXStandaloneKindSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Decls

type family XStandaloneKindSig x #

Instances

Instances details
type XStandaloneKindSig GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XStandaloneKindSig GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XStandaloneKindSig GhcTc 
Instance details

Defined in GHC.Hs.Decls

type family XXFixitySig x #

Instances

Instances details
type XXFixitySig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XFixitySig x #

Instances

Instances details
type XFixitySig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type family XXSig x #

Instances

Instances details
type XXSig GhcPs 
Instance details

Defined in GHC.Hs.Binds

type XXSig GhcRn 
Instance details

Defined in GHC.Hs.Binds

type XXSig GhcTc 
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 XSCCFunSig x #

Instances

Instances details
type XSCCFunSig (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 XSpecInstSig x #

Instances

Instances details
type XSpecInstSig (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 XInlineSig x #

Instances

Instances details
type XInlineSig (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 XIdSig x #

type family XClassOpSig x #

Instances

Instances details
type XClassOpSig (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 XTypeSig x #

Instances

Instances details
type XTypeSig (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 family XCIPBind x #

Instances

Instances details
type XCIPBind GhcPs 
Instance details

Defined in GHC.Hs.Binds

type XCIPBind GhcRn 
Instance details

Defined in GHC.Hs.Binds

type XCIPBind 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 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 XXPatSynBind x x' #

Instances

Instances details
type XXPatSynBind (GhcPass idL) (GhcPass idR) 
Instance details

Defined in GHC.Hs.Binds

type family XPSB x x' #

Instances

Instances details
type XPSB (GhcPass idL) GhcPs 
Instance details

Defined in GHC.Hs.Binds

type XPSB (GhcPass idL) GhcRn 
Instance details

Defined in GHC.Hs.Binds

type XPSB (GhcPass idL) GhcRn = NameSet
type XPSB (GhcPass idL) GhcTc 
Instance details

Defined in GHC.Hs.Binds

type XPSB (GhcPass idL) GhcTc = NameSet

type family XXHsBindsLR x x' #

Instances

Instances details
type XXHsBindsLR GhcPs pR 
Instance details

Defined in GHC.Hs.Binds

type XXHsBindsLR GhcRn pR 
Instance details

Defined in GHC.Hs.Binds

type XXHsBindsLR GhcTc 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 XVarBind x x' #

Instances

Instances details
type XVarBind (GhcPass pL) (GhcPass pR) 
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 XFunBind x x' #

Instances

Instances details
type XFunBind (GhcPass pL) GhcPs 
Instance details

Defined in GHC.Hs.Binds

type XFunBind (GhcPass pL) GhcRn

After the renamer (but before the type-checker), the FunBind extension field contains the locally-bound free variables of this defn. See Note [Bind free vars]

Instance details

Defined in GHC.Hs.Binds

type XFunBind (GhcPass pL) GhcTc

After the type-checker, the FunBind extension field contains the ticks to put on the rhs, if any, and a 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'.

Instance details

Defined in GHC.Hs.Binds

type family XXValBindsLR x x' #

Instances

Instances details
type XXValBindsLR (GhcPass pL) pR 
Instance details

Defined in GHC.Hs.Binds

type family XValBinds x x' #

Instances

Instances details
type XValBinds (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 family XEmptyLocalBinds x x' #

Instances

Instances details
type XEmptyLocalBinds (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 XHsValBinds x x' #

Instances

Instances details
type XHsValBinds (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type LIdP p = XRec p (IdP p) #

type family IdP p #

Maps the "normal" id type for a given pass

Instances

Instances details
type IdP (GhcPass p) 
Instance details

Defined in GHC.Hs.Extension

type IdP (GhcPass p) = IdGhcP p

class WrapXRec p a where #

The trivial wrapper that carries no additional information See Note [XRec and SrcSpans in the AST]

Methods

wrapXRec :: a -> XRec p a #

class MapXRec p where #

We can map over the underlying type contained in an XRec while preserving the annotation as is.

Methods

mapXRec :: Anno a ~ Anno b => (a -> b) -> XRec p a -> XRec p b #

Instances

Instances details
MapXRec (GhcPass p) 
Instance details

Defined in GHC.Hs.Extension

Methods

mapXRec :: Anno a ~ Anno b => (a -> b) -> XRec (GhcPass p) a -> XRec (GhcPass p) b #

class UnXRec p where #

We can strip off the XRec to access the underlying data. See Note [XRec and SrcSpans in the AST]

Methods

unXRec :: XRec p a -> a #

Instances

Instances details
UnXRec (GhcPass p) 
Instance details

Defined in GHC.Hs.Extension

Methods

unXRec :: XRec (GhcPass p) a -> a #

type family Anno a = (b :: Type) #

Instances

Instances details
type Anno ConLike 
Instance details

Defined in GHC.Hs.Pat

type Anno FastString 
Instance details

Defined in GHC.Hs.Expr

type Anno OverlapMode 
Instance details

Defined in GHC.Hs.Decls

type Anno OverlapMode 
Instance details

Defined in GHC.Hs.Decls

type Anno CCallConv 
Instance details

Defined in GHC.Hs.Decls

type Anno CExportSpec 
Instance details

Defined in GHC.Hs.Decls

type Anno CType 
Instance details

Defined in GHC.Hs.Decls

type Anno Safety 
Instance details

Defined in GHC.Hs.Decls

type Anno Name 
Instance details

Defined in GHC.Hs.Extension

type Anno RdrName 
Instance details

Defined in GHC.Hs.Extension

type Anno StringLiteral 
Instance details

Defined in GHC.Hs.Binds

type Anno Id 
Instance details

Defined in GHC.Hs.Extension

type Anno FieldLabelString 
Instance details

Defined in GHC.Hs.Expr

type Anno ModuleName 
Instance details

Defined in GHC.Hs

type Anno ModuleName 
Instance details

Defined in GHC.Hs.ImpExp

type Anno RecFieldsDotDot 
Instance details

Defined in GHC.Hs.Pat

type Anno HsIPName 
Instance details

Defined in GHC.Hs.Type

type Anno Bool 
Instance details

Defined in GHC.Hs.Decls

type Anno (LocatedA (IE (GhcPass p))) 
Instance details

Defined in GHC.Hs.ImpExp

type Anno (LocatedN Name) 
Instance details

Defined in GHC.Hs.Binds

type Anno (LocatedN RdrName) 
Instance details

Defined in GHC.Hs.Binds

type Anno (LocatedN Id) 
Instance details

Defined in GHC.Hs.Binds

type Anno (FixitySig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

type Anno (IPBind (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

type Anno (Sig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

type Anno (HsToken tok) 
Instance details

Defined in GHC.Hs.Extension

type Anno (AnnDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (ClsInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (ConDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DataFamInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DefaultDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DerivClauseTys (GhcPass _1)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DerivDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DerivStrategy (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DocDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (FamilyDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (FamilyResultSig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (ForeignDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (FunDep (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (HsDecl (GhcPass _1)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (HsDerivingClause (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (InjectivityAnn (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (InstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (RoleAnnotDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (RuleBndr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (RuleDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (RuleDecls (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (SpliceDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (StandaloneKindSig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (TyClDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (TyFamInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (WarnDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (WarnDecls (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DotFieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno (FieldLabelStrings (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno (HsCmd (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno (HsCmdTop (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno (HsExpr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno (HsUntypedSplice (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno (IE (GhcPass p)) 
Instance details

Defined in GHC.Hs.ImpExp

type Anno (IE (GhcPass p)) = SrcSpanAnnA
type Anno (IEWrappedName (GhcPass _1)) 
Instance details

Defined in GHC.Hs.ImpExp

type Anno (ImportDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.ImpExp

type Anno (HsOverLit (GhcPass p)) 
Instance details

Defined in GHC.Hs.Pat

type Anno (Pat (GhcPass p)) 
Instance details

Defined in GHC.Hs.Pat

type Anno (AmbiguousFieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (BangType (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (ConDeclField (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (FieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsKind (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsSigType (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsType (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (Maybe Role) 
Instance details

Defined in GHC.Hs.Decls

type Anno (Maybe Role) 
Instance details

Defined in GHC.Hs.Decls

type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (Match GhcPs (LocatedA (PatBuilder GhcPs)))] 
Instance details

Defined in GHC.Parser.PostProcess

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsExpr (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs)))] 
Instance details

Defined in GHC.Parser.Types

type Anno [LocatedA (IE (GhcPass p))] 
Instance details

Defined in GHC.Hs.ImpExp

type Anno [LocatedA (ConDeclField (GhcPass _1))] 
Instance details

Defined in GHC.Hs.Decls

type Anno [LocatedA (HsType (GhcPass p))] 
Instance details

Defined in GHC.Hs.Type

type Anno [LocatedN Name] 
Instance details

Defined in GHC.Hs.Binds

type Anno [LocatedN RdrName] 
Instance details

Defined in GHC.Hs.Binds

type Anno [LocatedN Id] 
Instance details

Defined in GHC.Hs.Binds

type Anno (HsBindLR (GhcPass idL) (GhcPass idR)) 
Instance details

Defined in GHC.Hs.Binds

type Anno (HsBindLR (GhcPass idL) (GhcPass idR)) = SrcSpanAnnA
type Anno (HsUniToken tok utok) 
Instance details

Defined in GHC.Hs.Extension

type Anno (HsUniToken tok utok) = TokenLocation
type Anno (FamEqn (GhcPass p) _1) 
Instance details

Defined in GHC.Hs.Decls

type Anno (FamEqn (GhcPass p) _1) = SrcSpanAnnA
type Anno (FamEqn (GhcPass p) _1) 
Instance details

Defined in GHC.Hs.Decls

type Anno (FamEqn (GhcPass p) _1) = SrcSpanAnnA
type Anno (FamEqn p (LocatedA (HsType p))) 
Instance details

Defined in GHC.Hs.Decls

type Anno (GRHS (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (GRHS (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (GRHS GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (Match GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (HsFieldBind lhs rhs) 
Instance details

Defined in GHC.Hs.Pat

type Anno (HsFieldBind lhs rhs) = SrcSpanAnnA
type Anno (HsOuterTyVarBndrs _1 (GhcPass _2)) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsTyVarBndr _flag (GhcPass _1)) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsTyVarBndr _flag (GhcPass _1)) = SrcSpanAnnA
type Anno (HsTyVarBndr _flag GhcPs) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsTyVarBndr _flag GhcRn) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsTyVarBndr _flag GhcTc) 
Instance details

Defined in GHC.Hs.Type

type Anno (SourceText, RuleName) 
Instance details

Defined in GHC.Hs.Decls

type Anno (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr)))) = SrcSpanAnnA
type Anno (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (StmtLR GhcRn GhcRn (LocatedA (body GhcRn))) 
Instance details

Defined in GHC.Hs.Expr

type family XRec p a = (r :: Type) | r -> a #

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 as type instance XRec NoLocated a = a. See Note [XRec and SrcSpans in the AST]

Instances

Instances details
type XRec (GhcPass p) a 
Instance details

Defined in GHC.Hs.Extension

type XRec (GhcPass p) a = GenLocated (Anno a) a

data DataConCantHappen #

Instances

Instances details
Data DataConCantHappen 
Instance details

Defined in Language.Haskell.Syntax.Extension

Methods

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

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

toConstr :: DataConCantHappen -> Constr #

dataTypeOf :: DataConCantHappen -> DataType #

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

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

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

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

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

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

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

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

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

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

Eq DataConCantHappen 
Instance details

Defined in Language.Haskell.Syntax.Extension

Ord DataConCantHappen 
Instance details

Defined in Language.Haskell.Syntax.Extension

newtype ModuleName #

A ModuleName is essentially a simple string, e.g. Data.List.

Constructors

ModuleName FastString 

Instances

Instances details
Data ModuleName 
Instance details

Defined in Language.Haskell.Syntax.Module.Name

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 #

Show ModuleName 
Instance details

Defined in Language.Haskell.Syntax.Module.Name

NFData ModuleName 
Instance details

Defined in Language.Haskell.Syntax.Module.Name

Methods

rnf :: ModuleName -> () #

Uniquable ModuleName 
Instance details

Defined in GHC.Types.Unique

Outputable ModuleName 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: ModuleName -> SDoc #

Eq ModuleName 
Instance details

Defined in Language.Haskell.Syntax.Module.Name

Ord ModuleName 
Instance details

Defined in Language.Haskell.Syntax.Module.Name

type Anno ModuleName 
Instance details

Defined in GHC.Hs

type Anno ModuleName 
Instance details

Defined in GHC.Hs.ImpExp

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 IfaceClassOp 
Instance details

Defined in GHC.Iface.Syntax

HasOccName IfaceConDecl 
Instance details

Defined in GHC.Iface.Syntax

HasOccName IfaceDecl 
Instance details

Defined in GHC.Iface.Syntax

Methods

occName :: IfaceDecl -> OccName #

HasOccName HoleFitCandidate 
Instance details

Defined in GHC.Tc.Errors.Hole.FitTypes

HasOccName TcBinder 
Instance details

Defined in GHC.Tc.Types

Methods

occName :: TcBinder -> OccName #

HasOccName GreName 
Instance details

Defined in GHC.Types.Avail

Methods

occName :: GreName -> OccName #

HasOccName FieldLabel 
Instance details

Defined in GHC.Types.FieldLabel

HasOccName Name 
Instance details

Defined in GHC.Types.Name

Methods

occName :: Name -> OccName #

HasOccName OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

Methods

occName :: OccName -> OccName #

HasOccName GlobalRdrElt 
Instance details

Defined in GHC.Types.Name.Reader

HasOccName RdrName 
Instance details

Defined in GHC.Types.Name.Reader

Methods

occName :: RdrName -> OccName #

HasOccName Var 
Instance details

Defined in GHC.Types.Var

Methods

occName :: Var -> OccName #

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
Data OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

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 #

NFData OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

Methods

rnf :: OccName -> () #

HasOccName OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

Methods

occName :: OccName -> OccName #

Uniquable OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

Methods

getUnique :: OccName -> Unique #

Binary OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

Outputable OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

Methods

ppr :: OccName -> SDoc #

OutputableBndr OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

Eq OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

Methods

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

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

Ord OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

data IsBootInterface #

Indicates whether a module name is referring to a boot interface (hs-boot file) or regular module (hs file). We need to treat boot modules specially when building compilation graphs, since they break cycles. Regular source files and signature files are treated equivalently.

Constructors

NotBoot 
IsBoot 

Instances

Instances details
Data IsBootInterface 
Instance details

Defined in Language.Haskell.Syntax.ImpExp

Methods

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

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

toConstr :: IsBootInterface -> Constr #

dataTypeOf :: IsBootInterface -> DataType #

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

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

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

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

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

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

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

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

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

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

Show IsBootInterface 
Instance details

Defined in Language.Haskell.Syntax.ImpExp

Eq IsBootInterface 
Instance details

Defined in Language.Haskell.Syntax.ImpExp

Ord IsBootInterface 
Instance details

Defined in Language.Haskell.Syntax.ImpExp

data GenUnit uid #

A unit identifier identifies a (possibly partially) instantiated library. It is primarily used as part of GenModule, which in turn is used in Name, which is used to give names to entities when typechecking.

There are two possible forms for a Unit:

1) It can be a RealUnit, in which case we just have a DefUnitId that uniquely identifies some fully compiled, installed library we have on disk.

2) It can be an VirtUnit. 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 GenInstantiatedUnit, which explicitly records the instantiation, so that we can substitute over it.

Constructors

RealUnit !(Definite uid)

Installed definite unit (either a fully instantiated unit or a closed unit)

VirtUnit !(GenInstantiatedUnit uid)

Virtual unit instantiated on-the-fly. It may be definite if all the holes are instantiated but we don't have code objects for it.

HoleUnit

Fake hole unit

Instances

Instances details
Data Unit 
Instance details

Defined in GHC.Unit.Types

Methods

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

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

toConstr :: Unit -> Constr #

dataTypeOf :: Unit -> DataType #

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

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

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

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

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

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

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

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

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

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

Show Unit 
Instance details

Defined in GHC.Unit.Types

Methods

showsPrec :: Int -> Unit -> ShowS #

show :: Unit -> String #

showList :: [Unit] -> ShowS #

NFData Unit 
Instance details

Defined in GHC.Unit.Types

Methods

rnf :: Unit -> () #

Uniquable Module 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: Module -> Unique #

Binary Unit 
Instance details

Defined in GHC.Unit.Types

Methods

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

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

get :: BinHandle -> IO Unit #

Outputable Module 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: Module -> SDoc #

Outputable Unit 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: Unit -> SDoc #

Ord Unit 
Instance details

Defined in GHC.Unit.Types

Methods

compare :: Unit -> Unit -> Ordering #

(<) :: Unit -> Unit -> Bool #

(<=) :: Unit -> Unit -> Bool #

(>) :: Unit -> Unit -> Bool #

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

max :: Unit -> Unit -> Unit #

min :: Unit -> Unit -> Unit #

IsUnitId u => Uniquable (GenUnit u) 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: GenUnit u -> Unique #

IsUnitId u => IsUnitId (GenUnit u) 
Instance details

Defined in GHC.Unit.Types

Methods

unitFS :: GenUnit u -> FastString #

IsUnitId u => Eq (GenUnit u) 
Instance details

Defined in GHC.Unit.Types

Methods

(==) :: GenUnit u -> GenUnit u -> Bool #

(/=) :: GenUnit u -> GenUnit u -> Bool #

data GenModule unit #

A generic module is a pair of a unit identifier and a ModuleName.

Constructors

Module 

Fields

Instances

Instances details
Functor GenModule 
Instance details

Defined in GHC.Unit.Types

Methods

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

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

Uniquable Module 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: Module -> Unique #

Outputable InstalledModule 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: InstalledModule -> SDoc #

Outputable InstantiatedModule 
Instance details

Defined in GHC.Unit.Types

Outputable Module 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: Module -> SDoc #

Data unit => Data (GenModule unit) 
Instance details

Defined in GHC.Unit.Types

Methods

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

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

toConstr :: GenModule unit -> Constr #

dataTypeOf :: GenModule unit -> DataType #

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

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

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

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

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

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

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

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

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

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

NFData (GenModule a) 
Instance details

Defined in GHC.Unit.Types

Methods

rnf :: GenModule a -> () #

Binary a => Binary (GenModule a) 
Instance details

Defined in GHC.Unit.Types

Methods

put_ :: BinHandle -> GenModule a -> IO () #

put :: BinHandle -> GenModule a -> IO (Bin (GenModule a)) #

get :: BinHandle -> IO (GenModule a) #

Eq unit => Eq (GenModule unit) 
Instance details

Defined in GHC.Unit.Types

Methods

(==) :: GenModule unit -> GenModule unit -> Bool #

(/=) :: GenModule unit -> GenModule unit -> Bool #

Ord unit => Ord (GenModule unit) 
Instance details

Defined in GHC.Unit.Types

Methods

compare :: GenModule unit -> GenModule unit -> Ordering #

(<) :: GenModule unit -> GenModule unit -> Bool #

(<=) :: GenModule unit -> GenModule unit -> Bool #

(>) :: GenModule unit -> GenModule unit -> Bool #

(>=) :: GenModule unit -> GenModule unit -> Bool #

max :: GenModule unit -> GenModule unit -> GenModule unit #

min :: GenModule unit -> GenModule unit -> GenModule unit #

newtype UnitId #

A UnitId identifies a built library in a database and is used to generate unique symbols, etc. It's usually of the form:

pkgname-1.2:libname+hash

These UnitId 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 as we can cheaply instantiate them on-the-fly, cf VirtUnit). Put another way, an installed unit id is either fully instantiated, or not instantiated at all.

Constructors

UnitId 

Fields

  • unitIdFS :: FastString

    The full hashed unit identifier, including the component id and the hash.

Instances

Instances details
Data Unit 
Instance details

Defined in GHC.Unit.Types

Methods

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

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

toConstr :: Unit -> Constr #

dataTypeOf :: Unit -> DataType #

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

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

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

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

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

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

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

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

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

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

Data UnitId 
Instance details

Defined in GHC.Unit.Types

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 #

Show Unit 
Instance details

Defined in GHC.Unit.Types

Methods

showsPrec :: Int -> Unit -> ShowS #

show :: Unit -> String #

showList :: [Unit] -> ShowS #

NFData Unit 
Instance details

Defined in GHC.Unit.Types

Methods

rnf :: Unit -> () #

Uniquable Module 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: Module -> Unique #

Uniquable UnitId 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: UnitId -> Unique #

IsUnitId UnitId 
Instance details

Defined in GHC.Unit.Types

Methods

unitFS :: UnitId -> FastString #

Binary InstantiatedUnit 
Instance details

Defined in GHC.Unit.Types

Binary Unit 
Instance details

Defined in GHC.Unit.Types

Methods

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

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

get :: BinHandle -> IO Unit #

Binary UnitId 
Instance details

Defined in GHC.Unit.Types

Methods

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

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

get :: BinHandle -> IO UnitId #

Outputable InstalledModule 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: InstalledModule -> SDoc #

Outputable InstantiatedModule 
Instance details

Defined in GHC.Unit.Types

Outputable InstantiatedUnit 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: InstantiatedUnit -> SDoc #

Outputable Module 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: Module -> SDoc #

Outputable Unit 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: Unit -> SDoc #

Outputable UnitId 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: UnitId -> SDoc #

Eq UnitId 
Instance details

Defined in GHC.Unit.Types

Methods

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

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

Ord Unit 
Instance details

Defined in GHC.Unit.Types

Methods

compare :: Unit -> Unit -> Ordering #

(<) :: Unit -> Unit -> Bool #

(<=) :: Unit -> Unit -> Bool #

(>) :: Unit -> Unit -> Bool #

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

max :: Unit -> Unit -> Unit #

min :: Unit -> Unit -> Unit #

Ord UnitId 
Instance details

Defined in GHC.Unit.Types

class (IsOutput doc, IsLine (Line doc)) => IsDoc doc where #

A class of types that represent a multiline document, with support for vertical composition.

See Note [HLine versus HDoc] and Note [The outputable class hierarchy] for more details.

Minimal complete definition

line, ($$), dualDoc

Associated Types

type Line doc = (r :: Type) | r -> doc #

Methods

line :: Line doc -> doc #

($$) :: doc -> doc -> doc #

Join two docs together vertically. If there is no vertical overlap it "dovetails" the two onto one line.

lines_ :: [Line doc] -> doc #

vcat :: [doc] -> doc #

Concatenate docs vertically with dovetailing.

dualDoc :: SDoc -> HDoc -> doc #

Prints as either the given SDoc or the given HDoc, depending on which type the result is instantiated to. This should generally be avoided; see Note [dualLine and dualDoc] for details.

Instances

Instances details
IsDoc HDoc 
Instance details

Defined in GHC.Utils.Outputable

Associated Types

type Line HDoc = (r :: Type) #

Methods

line :: Line HDoc -> HDoc #

($$) :: HDoc -> HDoc -> HDoc #

lines_ :: [Line HDoc] -> HDoc #

vcat :: [HDoc] -> HDoc #

dualDoc :: SDoc -> HDoc -> HDoc #

IsDoc SDoc 
Instance details

Defined in GHC.Utils.Outputable

Associated Types

type Line SDoc = (r :: Type) #

Methods

line :: Line SDoc -> SDoc #

($$) :: SDoc -> SDoc -> SDoc #

lines_ :: [Line SDoc] -> SDoc #

vcat :: [SDoc] -> SDoc #

dualDoc :: SDoc -> HDoc -> SDoc #

type family Line doc = (r :: Type) | r -> doc #

Instances

Instances details
type Line HDoc 
Instance details

Defined in GHC.Utils.Outputable

type Line HDoc = HLine
type Line SDoc 
Instance details

Defined in GHC.Utils.Outputable

type Line SDoc = SDoc

class IsOutput doc => IsLine doc where #

A class of types that represent a single logical line of text, with support for horizontal composition.

See Note [HLine versus HDoc] and Note [The outputable class hierarchy] for more details.

Minimal complete definition

char, text, ftext, ztext, (<>), (<+>), sep, fsep, dualLine

Methods

char :: Char -> doc #

text :: String -> doc #

ftext :: FastString -> doc #

ztext :: FastZString -> doc #

(<>) :: doc -> doc -> doc #

Join two docs together horizontally without a gap.

(<+>) :: doc -> doc -> doc #

Join two docs together horizontally with a gap between them.

sep :: [doc] -> doc #

Separate: is either like hsep or like vcat, depending on what fits.

fsep :: [doc] -> doc #

A paragraph-fill combinator. It's much like sep, only it keeps fitting things on one line until it can't fit any more.

hcat :: [doc] -> doc #

Concatenate docs horizontally without gaps.

hsep :: [doc] -> doc #

Concatenate docs horizontally with a space between each one.

dualLine :: SDoc -> HLine -> doc #

Prints as either the given SDoc or the given HLine, depending on which type the result is instantiated to. This should generally be avoided; see Note [dualLine and dualDoc] for details.

Instances

Instances details
IsLine HLine 
Instance details

Defined in GHC.Utils.Outputable

IsLine SDoc 
Instance details

Defined in GHC.Utils.Outputable

Methods

char :: Char -> SDoc #

text :: String -> SDoc #

ftext :: FastString -> SDoc #

ztext :: FastZString -> SDoc #

(<>) :: SDoc -> SDoc -> SDoc #

(<+>) :: SDoc -> SDoc -> SDoc #

sep :: [SDoc] -> SDoc #

fsep :: [SDoc] -> SDoc #

hcat :: [SDoc] -> SDoc #

hsep :: [SDoc] -> SDoc #

dualLine :: SDoc -> HLine -> SDoc #

class IsOutput doc where #

A superclass for IsLine and IsDoc that provides an identity, empty, as well as access to the shared SDocContext.

See Note [The outputable class hierarchy] for more details.

Methods

empty :: doc #

docWithContext :: (SDocContext -> doc) -> doc #

Instances

Instances details
IsOutput HDoc 
Instance details

Defined in GHC.Utils.Outputable

IsOutput HLine 
Instance details

Defined in GHC.Utils.Outputable

IsOutput SDoc 
Instance details

Defined in GHC.Utils.Outputable

data HDoc #

Represents a (possibly empty) sequence of lines that can be efficiently printed directly to a Handle (actually a BufHandle). See Note [SDoc versus HDoc] and Note [HLine versus HDoc] for more details.

Instances

Instances details
IsDoc HDoc 
Instance details

Defined in GHC.Utils.Outputable

Associated Types

type Line HDoc = (r :: Type) #

Methods

line :: Line HDoc -> HDoc #

($$) :: HDoc -> HDoc -> HDoc #

lines_ :: [Line HDoc] -> HDoc #

vcat :: [HDoc] -> HDoc #

dualDoc :: SDoc -> HDoc -> HDoc #

IsOutput HDoc 
Instance details

Defined in GHC.Utils.Outputable

type Line HDoc 
Instance details

Defined in GHC.Utils.Outputable

type Line HDoc = HLine

data HLine #

Represents a single line of output that can be efficiently printed directly to a Handle (actually a BufHandle). See Note [SDoc versus HDoc] and Note [HLine versus HDoc] for more details.

Instances

Instances details
IsLine HLine 
Instance details

Defined in GHC.Utils.Outputable

IsOutput HLine 
Instance details

Defined in GHC.Utils.Outputable

class Outputable a => OutputableBndr a where #

When we print a binder, we often want to print its type too. The OutputableBndr class encapsulates this idea.

Minimal complete definition

pprPrefixOcc, pprInfixOcc

Instances

Instances details
OutputableBndr DataCon 
Instance details

Defined in GHC.Core.DataCon

OutputableBndr PatSyn 
Instance details

Defined in GHC.Core.PatSyn

OutputableBndr BinderInfo 
Instance details

Defined in GHC.Stg.Lift.Analysis

OutputableBndr Name 
Instance details

Defined in GHC.Types.Name

OutputableBndr OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

OutputableBndr RdrName 
Instance details

Defined in GHC.Types.Name.Reader

(Outputable a, OutputableBndr e) => OutputableBndr (GenLocated (SrcSpanAnn' a) e) 
Instance details

Defined in GHC.Parser.Annotation

OutputableBndr (Id, TagSig) 
Instance details

Defined in GHC.Stg.InferTags.TagSig

data BindingSite #

BindingSite is used to tell the thing that prints binder what language construct is binding the identifier. This can be used to decide how much info to print. Also see Note [Binding-site specific printing] in GHC.Core.Ppr

Constructors

LambdaBind

The x in (x. e)

CaseBind

The x in case scrut of x { (y,z) -> ... }

CasePatBind

The y,z in case scrut of x { (y,z) -> ... }

LetBind

The x in (let x = rhs in e)

Instances

Instances details
Eq BindingSite 
Instance details

Defined in GHC.Utils.Outputable

newtype PDoc a #

Wrapper for types having a Outputable instance when an OutputableP instance is required.

Constructors

PDoc a 

Instances

Instances details
Outputable a => OutputableP env (PDoc a) 
Instance details

Defined in GHC.Utils.Outputable

Methods

pdoc :: env -> PDoc a -> SDoc #

class OutputableP env a where #

Outputable class with an additional environment value

See Note [The OutputableP class]

Methods

pdoc :: env -> a -> SDoc #

Instances

Instances details
OutputableP Platform CmmGraph 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: Platform -> CmmGraph -> SDoc #

OutputableP Platform CmmInfoTable 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: Platform -> CmmInfoTable -> SDoc #

OutputableP Platform CmmStatic 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: Platform -> CmmStatic -> SDoc #

OutputableP Platform CmmTopInfo 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: Platform -> CmmTopInfo -> SDoc #

OutputableP env Void 
Instance details

Defined in GHC.Utils.Outputable

Methods

pdoc :: env -> Void -> SDoc #

OutputableP env Label 
Instance details

Defined in GHC.Cmm.Dataflow.Label

Methods

pdoc :: env -> Label -> SDoc #

OutputableP env Alignment 
Instance details

Defined in GHC.Types.Basic

Methods

pdoc :: env -> Alignment -> SDoc #

OutputableP env SDoc 
Instance details

Defined in GHC.Utils.Outputable

Methods

pdoc :: env -> SDoc -> SDoc #

OutputableP Platform (GenCmmStatics a) 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: Platform -> GenCmmStatics a -> SDoc #

OutputableP env a => OutputableP env (SCC a) 
Instance details

Defined in GHC.Utils.Outputable

Methods

pdoc :: env -> SCC a -> SDoc #

OutputableP env a => OutputableP env (Set a) 
Instance details

Defined in GHC.Utils.Outputable

Methods

pdoc :: env -> Set a -> SDoc #

OutputableP env instr => OutputableP env (GenBasicBlock instr) 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: env -> GenBasicBlock instr -> SDoc #

OutputableP env instr => OutputableP env (ListGraph instr) 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: env -> ListGraph instr -> SDoc #

OutputableP env a => OutputableP env (LabelMap a) 
Instance details

Defined in GHC.Cmm.Dataflow.Label

Methods

pdoc :: env -> LabelMap a -> SDoc #

Outputable a => OutputableP env (PDoc a) 
Instance details

Defined in GHC.Utils.Outputable

Methods

pdoc :: env -> PDoc a -> SDoc #

OutputableP env a => OutputableP env (Maybe a) 
Instance details

Defined in GHC.Utils.Outputable

Methods

pdoc :: env -> Maybe a -> SDoc #

OutputableP env a => OutputableP env [a] 
Instance details

Defined in GHC.Utils.Outputable

Methods

pdoc :: env -> [a] -> SDoc #

(OutputableP env key, OutputableP env elt) => OutputableP env (Map key elt) 
Instance details

Defined in GHC.Utils.Outputable

Methods

pdoc :: env -> Map key elt -> SDoc #

(OutputableP env a, OutputableP env b) => OutputableP env (a, b) 
Instance details

Defined in GHC.Utils.Outputable

Methods

pdoc :: env -> (a, b) -> SDoc #

(OutputableP Platform d, OutputableP Platform info, OutputableP Platform i) => OutputableP Platform (GenCmmDecl d info i) 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: Platform -> GenCmmDecl d info i -> SDoc #

(OutputableP env a, OutputableP env b, OutputableP env c) => OutputableP env (a, b, c) 
Instance details

Defined in GHC.Utils.Outputable

Methods

pdoc :: env -> (a, b, c) -> SDoc #

class Outputable a where #

Class designating that some type has an SDoc representation

Methods

ppr :: a -> SDoc #

Instances

Instances details
Outputable Fingerprint 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Fingerprint -> SDoc #

Outputable Int16 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Int16 -> SDoc #

Outputable Int32 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Int32 -> SDoc #

Outputable Int64 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Int64 -> SDoc #

Outputable Int8 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Int8 -> SDoc #

Outputable Word16 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Word16 -> SDoc #

Outputable Word32 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Word32 -> SDoc #

Outputable Word64 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Word64 -> SDoc #

Outputable Word8 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Word8 -> SDoc #

Outputable IntSet 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: IntSet -> SDoc #

Outputable PrimCall 
Instance details

Defined in GHC.Builtin.PrimOps

Methods

ppr :: PrimCall -> SDoc #

Outputable PrimOp 
Instance details

Defined in GHC.Builtin.PrimOps

Methods

ppr :: PrimOp -> SDoc #

Outputable ByteOff 
Instance details

Defined in GHC.ByteCode.Types

Methods

ppr :: ByteOff -> SDoc #

Outputable CgBreakInfo 
Instance details

Defined in GHC.ByteCode.Types

Methods

ppr :: CgBreakInfo -> SDoc #

Outputable CompiledByteCode 
Instance details

Defined in GHC.ByteCode.Types

Methods

ppr :: CompiledByteCode -> SDoc #

Outputable NativeCallInfo 
Instance details

Defined in GHC.ByteCode.Types

Methods

ppr :: NativeCallInfo -> SDoc #

Outputable RegBitmap 
Instance details

Defined in GHC.ByteCode.Types

Methods

ppr :: RegBitmap -> SDoc #

Outputable UnlinkedBCO 
Instance details

Defined in GHC.ByteCode.Types

Methods

ppr :: UnlinkedBCO -> SDoc #

Outputable WordOff 
Instance details

Defined in GHC.ByteCode.Types

Methods

ppr :: WordOff -> SDoc #

Outputable CmmStackInfo 
Instance details

Defined in GHC.Cmm

Methods

ppr :: CmmStackInfo -> SDoc #

Outputable CmmStatic 
Instance details

Defined in GHC.Cmm

Methods

ppr :: CmmStatic -> SDoc #

Outputable Label 
Instance details

Defined in GHC.Cmm.Dataflow.Label

Methods

ppr :: Label -> SDoc #

Outputable LabelSet 
Instance details

Defined in GHC.Cmm.Dataflow.Label

Methods

ppr :: LabelSet -> SDoc #

Outputable AltCon 
Instance details

Defined in GHC.Core

Methods

ppr :: AltCon -> SDoc #

Outputable Class 
Instance details

Defined in GHC.Core.Class

Methods

ppr :: Class -> SDoc #

Outputable LiftingContext 
Instance details

Defined in GHC.Core.Coercion

Methods

ppr :: LiftingContext -> SDoc #

Outputable CoAxBranch 
Instance details

Defined in GHC.Core.Coercion.Axiom

Methods

ppr :: CoAxBranch -> SDoc #

Outputable CoAxiomRule 
Instance details

Defined in GHC.Core.Coercion.Axiom

Methods

ppr :: CoAxiomRule -> SDoc #

Outputable DataCon 
Instance details

Defined in GHC.Core.DataCon

Methods

ppr :: DataCon -> SDoc #

Outputable EqSpec 
Instance details

Defined in GHC.Core.DataCon

Methods

ppr :: EqSpec -> SDoc #

Outputable HsImplBang 
Instance details

Defined in GHC.Core.DataCon

Methods

ppr :: HsImplBang -> SDoc #

Outputable HsSrcBang 
Instance details

Defined in GHC.Core.DataCon

Methods

ppr :: HsSrcBang -> SDoc #

Outputable StrictnessMark 
Instance details

Defined in GHC.Core.DataCon

Methods

ppr :: StrictnessMark -> SDoc #

Outputable FamInst 
Instance details

Defined in GHC.Core.FamInstEnv

Methods

ppr :: FamInst -> SDoc #

Outputable FamInstEnv 
Instance details

Defined in GHC.Core.FamInstEnv

Methods

ppr :: FamInstEnv -> SDoc #

Outputable FamInstMatch 
Instance details

Defined in GHC.Core.FamInstEnv

Methods

ppr :: FamInstMatch -> SDoc #

Outputable ClsInst 
Instance details

Defined in GHC.Core.InstEnv

Methods

ppr :: ClsInst -> SDoc #

Outputable InstEnv 
Instance details

Defined in GHC.Core.InstEnv

Methods

ppr :: InstEnv -> SDoc #

Outputable InstMatches 
Instance details

Defined in GHC.Core.InstEnv

Methods

ppr :: InstMatches -> SDoc #

Outputable PotentialUnifiers 
Instance details

Defined in GHC.Core.InstEnv

Outputable FloatBind 
Instance details

Defined in GHC.Core.Make

Methods

ppr :: FloatBind -> SDoc #

Outputable CallerCcFilter 
Instance details

Defined in GHC.Core.Opt.CallerCC

Methods

ppr :: CallerCcFilter -> SDoc #

Outputable NamePattern 
Instance details

Defined in GHC.Core.Opt.CallerCC

Methods

ppr :: NamePattern -> SDoc #

Outputable FloatOutSwitches 
Instance details

Defined in GHC.Core.Opt.Monad

Methods

ppr :: FloatOutSwitches -> SDoc #

Outputable CoreToDo 
Instance details

Defined in GHC.Core.Opt.Pipeline.Types

Methods

ppr :: CoreToDo -> SDoc #

Outputable Tick 
Instance details

Defined in GHC.Core.Opt.Stats

Methods

ppr :: Tick -> SDoc #

Outputable PatSyn 
Instance details

Defined in GHC.Core.PatSyn

Methods

ppr :: PatSyn -> SDoc #

Outputable CoSel 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: CoSel -> SDoc #

Outputable Coercion 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: Coercion -> SDoc #

Outputable CoercionHole 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: CoercionHole -> SDoc #

Outputable FunSel 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: FunSel -> SDoc #

Outputable MCoercion 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: MCoercion -> SDoc #

Outputable TyLit 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: TyLit -> SDoc #

Outputable Type 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: Type -> SDoc #

Outputable UnivCoProvenance 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: UnivCoProvenance -> SDoc #

Outputable Subst 
Instance details

Defined in GHC.Core.TyCo.Subst

Methods

ppr :: Subst -> SDoc #

Outputable AlgTyConFlav 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: AlgTyConFlav -> SDoc #

Outputable FamTyConFlav 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: FamTyConFlav -> SDoc #

Outputable PrimElemRep 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: PrimElemRep -> SDoc #

Outputable PrimRep 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: PrimRep -> SDoc #

Outputable TyCon 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: TyCon -> SDoc #

Outputable TyConBndrVis 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: TyConBndrVis -> SDoc #

Outputable TyConFlavour 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: TyConFlavour -> SDoc #

Outputable ArgSummary 
Instance details

Defined in GHC.Core.Unfold

Methods

ppr :: ArgSummary -> SDoc #

Outputable CallCtxt 
Instance details

Defined in GHC.Core.Unfold

Methods

ppr :: CallCtxt -> SDoc #

Outputable ExprSize 
Instance details

Defined in GHC.Core.Unfold

Methods

ppr :: ExprSize -> SDoc #

Outputable FastString 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: FastString -> SDoc #

Outputable LexicalFastString 
Instance details

Defined in GHC.Utils.Outputable

Outputable NonDetFastString 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: NonDetFastString -> SDoc #

Outputable UnVarGraph 
Instance details

Defined in GHC.Data.Graph.UnVar

Methods

ppr :: UnVarGraph -> SDoc #

Outputable UnVarSet 
Instance details

Defined in GHC.Data.Graph.UnVar

Methods

ppr :: UnVarSet -> SDoc #

Outputable WarnReason 
Instance details

Defined in GHC.Driver.CmdLine

Methods

ppr :: WarnReason -> SDoc #

Outputable Language 
Instance details

Defined in GHC.Driver.Flags

Methods

ppr :: Language -> SDoc #

Outputable PluginRecompile 
Instance details

Defined in GHC.Driver.Plugins

Methods

ppr :: PluginRecompile -> SDoc #

Outputable GhcMode 
Instance details

Defined in GHC.Driver.Session

Methods

ppr :: GhcMode -> SDoc #

Outputable ModRenaming 
Instance details

Defined in GHC.Driver.Session

Methods

ppr :: ModRenaming -> SDoc #

Outputable PackageArg 
Instance details

Defined in GHC.Driver.Session

Methods

ppr :: PackageArg -> SDoc #

Outputable PackageFlag 
Instance details

Defined in GHC.Driver.Session

Methods

ppr :: PackageFlag -> SDoc #

Outputable ABExport 
Instance details

Defined in GHC.Hs.Binds

Methods

ppr :: ABExport -> SDoc #

Outputable TcSpecPrag 
Instance details

Defined in GHC.Hs.Binds

Methods

ppr :: TcSpecPrag -> SDoc #

Outputable XViaStrategyPs 
Instance details

Defined in GHC.Hs.Decls

Methods

ppr :: XViaStrategyPs -> SDoc #

Outputable DocStructureItem 
Instance details

Defined in GHC.Hs.Doc

Methods

ppr :: DocStructureItem -> SDoc #

Outputable Docs 
Instance details

Defined in GHC.Hs.Doc

Methods

ppr :: Docs -> SDoc #

Outputable HsDocString 
Instance details

Defined in GHC.Hs.DocString

Methods

ppr :: HsDocString -> SDoc #

Outputable HsDocStringChunk 
Instance details

Defined in GHC.Hs.DocString

Methods

ppr :: HsDocStringChunk -> SDoc #

Outputable HsDocStringDecorator 
Instance details

Defined in GHC.Hs.DocString

Outputable GrhsAnn 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: GrhsAnn -> SDoc #

Outputable PendingRnSplice 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: PendingRnSplice -> SDoc #

Outputable PendingTcSplice 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: PendingTcSplice -> SDoc #

Outputable SyntaxExprRn 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: SyntaxExprRn -> SDoc #

Outputable SyntaxExprTc 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: SyntaxExprTc -> SDoc #

Outputable XXExprGhcTc 
Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: XXExprGhcTc -> SDoc #

Outputable DsMatchContext 
Instance details

Defined in GHC.HsToCore.Monad

Methods

ppr :: DsMatchContext -> SDoc #

Outputable EquationInfo 
Instance details

Defined in GHC.HsToCore.Monad

Methods

ppr :: EquationInfo -> SDoc #

Outputable BotInfo 
Instance details

Defined in GHC.HsToCore.Pmc.Solver.Types

Methods

ppr :: BotInfo -> SDoc #

Outputable Nabla 
Instance details

Defined in GHC.HsToCore.Pmc.Solver.Types

Methods

ppr :: Nabla -> SDoc #

Outputable Nablas 
Instance details

Defined in GHC.HsToCore.Pmc.Solver.Types

Methods

ppr :: Nablas -> SDoc #

Outputable PmAltCon 
Instance details

Defined in GHC.HsToCore.Pmc.Solver.Types

Methods

ppr :: PmAltCon -> SDoc #

Outputable PmAltConApp 
Instance details

Defined in GHC.HsToCore.Pmc.Solver.Types

Methods

ppr :: PmAltConApp -> SDoc #

Outputable PmAltConSet 
Instance details

Defined in GHC.HsToCore.Pmc.Solver.Types

Methods

ppr :: PmAltConSet -> SDoc #

Outputable PmEquality 
Instance details

Defined in GHC.HsToCore.Pmc.Solver.Types

Methods

ppr :: PmEquality -> SDoc #

Outputable PmLit 
Instance details

Defined in GHC.HsToCore.Pmc.Solver.Types

Methods

ppr :: PmLit -> SDoc #

Outputable PmLitValue 
Instance details

Defined in GHC.HsToCore.Pmc.Solver.Types

Methods

ppr :: PmLitValue -> SDoc #

Outputable ResidualCompleteMatches 
Instance details

Defined in GHC.HsToCore.Pmc.Solver.Types

Outputable TmState

Not user-facing.

Instance details

Defined in GHC.HsToCore.Pmc.Solver.Types

Methods

ppr :: TmState -> SDoc #

Outputable TyState

Not user-facing.

Instance details

Defined in GHC.HsToCore.Pmc.Solver.Types

Methods

ppr :: TyState -> SDoc #

Outputable VarInfo

Not user-facing.

Instance details

Defined in GHC.HsToCore.Pmc.Solver.Types

Methods

ppr :: VarInfo -> SDoc #

Outputable CompileReason 
Instance details

Defined in GHC.Iface.Recomp

Methods

ppr :: CompileReason -> SDoc #

Outputable IfaceDeclExtras 
Instance details

Defined in GHC.Iface.Recomp

Methods

ppr :: IfaceDeclExtras -> SDoc #

Outputable RecompReason 
Instance details

Defined in GHC.Iface.Recomp

Methods

ppr :: RecompReason -> SDoc #

Outputable RecompileRequired 
Instance details

Defined in GHC.Iface.Recomp

Outputable IfGuidance 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfGuidance -> SDoc #

Outputable IfaceAT 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceAT -> SDoc #

Outputable IfaceAnnotation 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceAnnotation -> SDoc #

Outputable IfaceClassOp 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceClassOp -> SDoc #

Outputable IfaceClsInst 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceClsInst -> SDoc #

Outputable IfaceCompleteMatch 
Instance details

Defined in GHC.Iface.Syntax

Outputable IfaceConAlt 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceConAlt -> SDoc #

Outputable IfaceDecl 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceDecl -> SDoc #

Outputable IfaceExpr 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceExpr -> SDoc #

Outputable IfaceFamInst 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceFamInst -> SDoc #

Outputable IfaceIdDetails 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceIdDetails -> SDoc #

Outputable IfaceInfoItem 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceInfoItem -> SDoc #

Outputable IfaceJoinInfo 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceJoinInfo -> SDoc #

Outputable IfaceLFInfo 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceLFInfo -> SDoc #

Outputable IfaceMaybeRhs 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceMaybeRhs -> SDoc #

Outputable IfaceRule 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceRule -> SDoc #

Outputable IfaceTopBndrInfo 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceTopBndrInfo -> SDoc #

Outputable IfaceTyConParent 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceTyConParent -> SDoc #

Outputable IfaceUnfolding 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceUnfolding -> SDoc #

Outputable ShowHowMuch 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: ShowHowMuch -> SDoc #

Outputable IfaceAppArgs 
Instance details

Defined in GHC.Iface.Type

Methods

ppr :: IfaceAppArgs -> SDoc #

Outputable IfaceBndr 
Instance details

Defined in GHC.Iface.Type

Methods

ppr :: IfaceBndr -> SDoc #

Outputable IfaceCoercion 
Instance details

Defined in GHC.Iface.Type

Methods

ppr :: IfaceCoercion -> SDoc #

Outputable IfaceOneShot 
Instance details

Defined in GHC.Iface.Type

Methods

ppr :: IfaceOneShot -> SDoc #

Outputable IfaceTyCon 
Instance details

Defined in GHC.Iface.Type

Methods

ppr :: IfaceTyCon -> SDoc #

Outputable IfaceTyConInfo 
Instance details

Defined in GHC.Iface.Type

Methods

ppr :: IfaceTyConInfo -> SDoc #

Outputable IfaceTyConSort 
Instance details

Defined in GHC.Iface.Type

Methods

ppr :: IfaceTyConSort -> SDoc #

Outputable IfaceTyLit 
Instance details

Defined in GHC.Iface.Type

Methods

ppr :: IfaceTyLit -> SDoc #

Outputable IfaceType 
Instance details

Defined in GHC.Iface.Type

Methods

ppr :: IfaceType -> SDoc #

Outputable LibrarySpec 
Instance details

Defined in GHC.Linker.Types

Methods

ppr :: LibrarySpec -> SDoc #

Outputable Linkable 
Instance details

Defined in GHC.Linker.Types

Methods

ppr :: Linkable -> SDoc #

Outputable LoadedPkgInfo 
Instance details

Defined in GHC.Linker.Types

Methods

ppr :: LoadedPkgInfo -> SDoc #

Outputable SptEntry 
Instance details

Defined in GHC.Linker.Types

Methods

ppr :: SptEntry -> SDoc #

Outputable Unlinked 
Instance details

Defined in GHC.Linker.Types

Methods

ppr :: Unlinked -> SDoc #

Outputable AddEpAnn 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: AddEpAnn -> SDoc #

Outputable Anchor 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: Anchor -> SDoc #

Outputable AnchorOperation 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: AnchorOperation -> SDoc #

Outputable AnnContext 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: AnnContext -> SDoc #

Outputable AnnKeywordId 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: AnnKeywordId -> SDoc #

Outputable AnnList 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: AnnList -> SDoc #

Outputable AnnListItem 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: AnnListItem -> SDoc #

Outputable AnnPragma 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: AnnPragma -> SDoc #

Outputable AnnSortKey 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: AnnSortKey -> SDoc #

Outputable DeltaPos 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: DeltaPos -> SDoc #

Outputable EpAnnComments 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: EpAnnComments -> SDoc #

Outputable EpaComment 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: EpaComment -> SDoc #

Outputable EpaLocation 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: EpaLocation -> SDoc #

Outputable IsUnicodeSyntax 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: IsUnicodeSyntax -> SDoc #

Outputable NameAdornment 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: NameAdornment -> SDoc #

Outputable NameAnn 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: NameAnn -> SDoc #

Outputable NoEpAnns 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: NoEpAnns -> SDoc #

Outputable TrailingAnn 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: TrailingAnn -> SDoc #

Outputable DataConBuilder 
Instance details

Defined in GHC.Parser.Types

Methods

ppr :: DataConBuilder -> SDoc #

Outputable InteractiveImport 
Instance details

Defined in GHC.Runtime.Context

Outputable TagInfo 
Instance details

Defined in GHC.Stg.InferTags.TagSig

Methods

ppr :: TagInfo -> SDoc #

Outputable TagSig 
Instance details

Defined in GHC.Stg.InferTags.TagSig

Methods

ppr :: TagSig -> SDoc #

Outputable BinderInfo 
Instance details

Defined in GHC.Stg.Lift.Analysis

Methods

ppr :: BinderInfo -> SDoc #

Outputable Skeleton 
Instance details

Defined in GHC.Stg.Lift.Analysis

Methods

ppr :: Skeleton -> SDoc #

Outputable AltType 
Instance details

Defined in GHC.Stg.Syntax

Methods

ppr :: AltType -> SDoc #

Outputable ConstructorNumber 
Instance details

Defined in GHC.Stg.Syntax

Outputable NoExtFieldSilent 
Instance details

Defined in GHC.Stg.Syntax

Methods

ppr :: NoExtFieldSilent -> SDoc #

Outputable StgArg 
Instance details

Defined in GHC.Stg.Syntax

Methods

ppr :: StgArg -> SDoc #

Outputable StgOp 
Instance details

Defined in GHC.Stg.Syntax

Methods

ppr :: StgOp -> SDoc #

Outputable UpdateFlag 
Instance details

Defined in GHC.Stg.Syntax

Methods

ppr :: UpdateFlag -> SDoc #

Outputable LambdaFormInfo 
Instance details

Defined in GHC.StgToCmm.Types

Methods

ppr :: LambdaFormInfo -> SDoc #

Outputable StandardFormInfo 
Instance details

Defined in GHC.StgToCmm.Types

Methods

ppr :: StandardFormInfo -> SDoc #

Outputable Deps 
Instance details

Defined in GHC.StgToJS.Object

Methods

ppr :: Deps -> SDoc #

Outputable DepsLocation 
Instance details

Defined in GHC.StgToJS.Object

Methods

ppr :: DepsLocation -> SDoc #

Outputable ExportedFun 
Instance details

Defined in GHC.StgToJS.Object

Methods

ppr :: ExportedFun -> SDoc #

Outputable StaticArg 
Instance details

Defined in GHC.StgToJS.Types

Methods

ppr :: StaticArg -> SDoc #

Outputable StaticLit 
Instance details

Defined in GHC.StgToJS.Types

Methods

ppr :: StaticLit -> SDoc #

Outputable TypedExpr 
Instance details

Defined in GHC.StgToJS.Types

Methods

ppr :: TypedExpr -> SDoc #

Outputable HoleFit 
Instance details

Defined in GHC.Tc.Errors.Hole.FitTypes

Methods

ppr :: HoleFit -> SDoc #

Outputable HoleFitCandidate 
Instance details

Defined in GHC.Tc.Errors.Hole.FitTypes

Methods

ppr :: HoleFitCandidate -> SDoc #

Outputable TypedHole 
Instance details

Defined in GHC.Tc.Errors.Hole.FitTypes

Methods

ppr :: TypedHole -> SDoc #

Outputable ErrorItem 
Instance details

Defined in GHC.Tc.Errors.Types

Methods

ppr :: ErrorItem -> SDoc #

Outputable Exported 
Instance details

Defined in GHC.Tc.Errors.Types

Methods

ppr :: Exported -> SDoc #

Outputable PromotionErr 
Instance details

Defined in GHC.Tc.Errors.Types

Methods

ppr :: PromotionErr -> SDoc #

Outputable TypeDataForbids 
Instance details

Defined in GHC.Tc.Errors.Types

Methods

ppr :: TypeDataForbids -> SDoc #

Outputable TouchabilityTestResult 
Instance details

Defined in GHC.Tc.Solver.Monad

Outputable DefaultingProposal 
Instance details

Defined in GHC.Tc.Types

Outputable IdBindingInfo 
Instance details

Defined in GHC.Tc.Types

Methods

ppr :: IdBindingInfo -> SDoc #

Outputable TcBinder 
Instance details

Defined in GHC.Tc.Types

Methods

ppr :: TcBinder -> SDoc #

Outputable TcIdSigInfo 
Instance details

Defined in GHC.Tc.Types

Methods

ppr :: TcIdSigInfo -> SDoc #

Outputable TcIdSigInst 
Instance details

Defined in GHC.Tc.Types

Methods

ppr :: TcIdSigInst -> SDoc #

Outputable TcPatSynInfo 
Instance details

Defined in GHC.Tc.Types

Methods

ppr :: TcPatSynInfo -> SDoc #

Outputable TcSigInfo 
Instance details

Defined in GHC.Tc.Types

Methods

ppr :: TcSigInfo -> SDoc #

Outputable TcTyThing 
Instance details

Defined in GHC.Tc.Types

Methods

ppr :: TcTyThing -> SDoc #

Outputable ThStage 
Instance details

Defined in GHC.Tc.Types

Methods

ppr :: ThStage -> SDoc #

Outputable WhereFrom 
Instance details

Defined in GHC.Tc.Types

Methods

ppr :: WhereFrom -> SDoc #

Outputable CanEqLHS 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: CanEqLHS -> SDoc #

Outputable CheckTyEqResult 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: CheckTyEqResult -> SDoc #

Outputable Ct 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: Ct -> SDoc #

Outputable CtEvidence 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: CtEvidence -> SDoc #

Outputable CtFlavour 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: CtFlavour -> SDoc #

Outputable CtIrredReason 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: CtIrredReason -> SDoc #

Outputable DelayedError 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: DelayedError -> SDoc #

Outputable HasGivenEqs 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: HasGivenEqs -> SDoc #

Outputable Hole 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: Hole -> SDoc #

Outputable HoleSort 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: HoleSort -> SDoc #

Outputable ImplicStatus 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: ImplicStatus -> SDoc #

Outputable Implication 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: Implication -> SDoc #

Outputable NotConcreteError 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: NotConcreteError -> SDoc #

Outputable QCInst 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: QCInst -> SDoc #

Outputable RewriterSet 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: RewriterSet -> SDoc #

Outputable SubGoalDepth 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: SubGoalDepth -> SDoc #

Outputable TcEvDest 
Instance details

Defined in GHC.Tc.Types.Constraint

Methods

ppr :: TcEvDest -> SDoc #

Outputable WantedConstraints 
Instance details

Defined in GHC.Tc.Types.Constraint

Outputable IsExtraConstraint 
Instance details

Defined in GHC.Tc.Utils.Monad

Outputable ExpType 
Instance details

Defined in GHC.Tc.Utils.TcType

Methods

ppr :: ExpType -> SDoc #

Outputable InferResult 
Instance details

Defined in GHC.Tc.Utils.TcType

Methods

ppr :: InferResult -> SDoc #

Outputable MetaDetails 
Instance details

Defined in GHC.Tc.Utils.TcType

Methods

ppr :: MetaDetails -> SDoc #

Outputable MetaInfo 
Instance details

Defined in GHC.Tc.Utils.TcType

Methods

ppr :: MetaInfo -> SDoc #

Outputable PatersonSize 
Instance details

Defined in GHC.Tc.Utils.TcType

Methods

ppr :: PatersonSize -> SDoc #

Outputable TcLevel 
Instance details

Defined in GHC.Tc.Utils.TcType

Methods

ppr :: TcLevel -> SDoc #

Outputable TcTyVarDetails 
Instance details

Defined in GHC.Tc.Utils.TcType

Methods

ppr :: TcTyVarDetails -> SDoc #

Outputable Annotation 
Instance details

Defined in GHC.Types.Annotations

Methods

ppr :: Annotation -> SDoc #

Outputable AvailInfo 
Instance details

Defined in GHC.Types.Avail

Methods

ppr :: AvailInfo -> SDoc #

Outputable GreName 
Instance details

Defined in GHC.Types.Avail

Methods

ppr :: GreName -> SDoc #

Outputable Activation 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: Activation -> SDoc #

Outputable Alignment 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: Alignment -> SDoc #

Outputable CbvMark 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: CbvMark -> SDoc #

Outputable CompilerPhase 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: CompilerPhase -> SDoc #

Outputable DefaultingStrategy 
Instance details

Defined in GHC.Types.Basic

Outputable FunctionOrData 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: FunctionOrData -> SDoc #

Outputable InlinePragma 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: InlinePragma -> SDoc #

Outputable InlineSpec 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: InlineSpec -> SDoc #

Outputable IntWithInf 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: IntWithInf -> SDoc #

Outputable LeftOrRight 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: LeftOrRight -> SDoc #

Outputable Levity 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: Levity -> SDoc #

Outputable NonStandardDefaultingStrategy 
Instance details

Defined in GHC.Types.Basic

Outputable OccInfo 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: OccInfo -> SDoc #

Outputable OneShotInfo 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: OneShotInfo -> SDoc #

Outputable Origin 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: Origin -> SDoc #

Outputable OverlapFlag 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: OverlapFlag -> SDoc #

Outputable OverlapMode 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: OverlapMode -> SDoc #

Outputable RecFlag 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: RecFlag -> SDoc #

Outputable RuleMatchInfo 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: RuleMatchInfo -> SDoc #

Outputable SuccessFlag 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: SuccessFlag -> SDoc #

Outputable SwapFlag 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: SwapFlag -> SDoc #

Outputable TailCallInfo 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: TailCallInfo -> SDoc #

Outputable TopLevelFlag 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: TopLevelFlag -> SDoc #

Outputable TupleSort 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: TupleSort -> SDoc #

Outputable TypeOrKind 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: TypeOrKind -> SDoc #

Outputable UnboxedTupleOrSum 
Instance details

Defined in GHC.Types.Basic

Outputable UnfoldingSource 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: UnfoldingSource -> SDoc #

Outputable CompleteMatch 
Instance details

Defined in GHC.Types.CompleteMatch

Methods

ppr :: CompleteMatch -> SDoc #

Outputable CostCentre 
Instance details

Defined in GHC.Types.CostCentre

Methods

ppr :: CostCentre -> SDoc #

Outputable CostCentreStack 
Instance details

Defined in GHC.Types.CostCentre

Methods

ppr :: CostCentreStack -> SDoc #

Outputable Cpr

BNF:

cpr ::= ''                               -- TopCpr
     |  n                                -- FlatConCpr n
     |  n '(' cpr1 ',' cpr2 ',' ... ')'  -- ConCpr n [cpr1,cpr2,...]
     |  'b'                              -- BotCpr

Examples: * `f x = f x` has result CPR b * `1(1,)` is a valid (nested) Cpr denotation for `(I# 42#, f 42)`.

Instance details

Defined in GHC.Types.Cpr

Methods

ppr :: Cpr -> SDoc #

Outputable CprSig

Only print the CPR result

Instance details

Defined in GHC.Types.Cpr

Methods

ppr :: CprSig -> SDoc #

Outputable CprType

BNF:

cpr_ty ::= cpr               -- short form if arty == 0
        |  '\' arty '.' cpr  -- if arty > 0

Examples: * `f x y z = f x y z` has denotation `3.b` * `g !x = (x+1, x+2)` has denotation `1.1(1,1)`.

Instance details

Defined in GHC.Types.Cpr

Methods

ppr :: CprType -> SDoc #

Outputable Card

See Note [Demand notation] Current syntax was discussed in #19016.

Instance details

Defined in GHC.Types.Demand

Methods

ppr :: Card -> SDoc #

Outputable Demand

See Note [Demand notation]

Instance details

Defined in GHC.Types.Demand

Methods

ppr :: Demand -> SDoc #

Outputable Divergence 
Instance details

Defined in GHC.Types.Demand

Methods

ppr :: Divergence -> SDoc #

Outputable DmdEnv 
Instance details

Defined in GHC.Types.Demand

Methods

ppr :: DmdEnv -> SDoc #

Outputable DmdSig 
Instance details

Defined in GHC.Types.Demand

Methods

ppr :: DmdSig -> SDoc #

Outputable DmdType 
Instance details

Defined in GHC.Types.Demand

Methods

ppr :: DmdType -> SDoc #

Outputable SubDemand

See Note [Demand notation]

Instance details

Defined in GHC.Types.Demand

Methods

ppr :: SubDemand -> SDoc #

Outputable TypeShape 
Instance details

Defined in GHC.Types.Demand

Methods

ppr :: TypeShape -> SDoc #

Outputable DiagnosticCode 
Instance details

Defined in GHC.Types.Error

Methods

ppr :: DiagnosticCode -> SDoc #

Outputable DiagnosticHint 
Instance details

Defined in GHC.Types.Error

Methods

ppr :: DiagnosticHint -> SDoc #

Outputable DiagnosticReason 
Instance details

Defined in GHC.Types.Error

Methods

ppr :: DiagnosticReason -> SDoc #

Outputable Severity 
Instance details

Defined in GHC.Types.Error

Methods

ppr :: Severity -> SDoc #

Outputable DuplicateRecordFields 
Instance details

Defined in GHC.Types.FieldLabel

Outputable FieldLabel 
Instance details

Defined in GHC.Types.FieldLabel

Methods

ppr :: FieldLabel -> SDoc #

Outputable FieldSelectors 
Instance details

Defined in GHC.Types.FieldLabel

Methods

ppr :: FieldSelectors -> SDoc #

Outputable Fixity 
Instance details

Defined in GHC.Types.Fixity

Methods

ppr :: Fixity -> SDoc #

Outputable FixityDirection 
Instance details

Defined in GHC.Types.Fixity

Methods

ppr :: FixityDirection -> SDoc #

Outputable LexicalFixity 
Instance details

Defined in GHC.Types.Fixity

Methods

ppr :: LexicalFixity -> SDoc #

Outputable FixItem 
Instance details

Defined in GHC.Types.Fixity.Env

Methods

ppr :: FixItem -> SDoc #

Outputable CCallConv 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: CCallConv -> SDoc #

Outputable CCallSpec 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: CCallSpec -> SDoc #

Outputable CExportSpec 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: CExportSpec -> SDoc #

Outputable CType 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: CType -> SDoc #

Outputable ForeignCall 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: ForeignCall -> SDoc #

Outputable Header 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: Header -> SDoc #

Outputable Safety 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: Safety -> SDoc #

Outputable CafInfo 
Instance details

Defined in GHC.Types.Id.Info

Methods

ppr :: CafInfo -> SDoc #

Outputable IdDetails 
Instance details

Defined in GHC.Types.Id.Info

Methods

ppr :: IdDetails -> SDoc #

Outputable RecSelParent 
Instance details

Defined in GHC.Types.Id.Info

Methods

ppr :: RecSelParent -> SDoc #

Outputable TickBoxOp 
Instance details

Defined in GHC.Types.Id.Info

Methods

ppr :: TickBoxOp -> SDoc #

Outputable Literal 
Instance details

Defined in GHC.Types.Literal

Methods

ppr :: Literal -> SDoc #

Outputable Name 
Instance details

Defined in GHC.Types.Name

Methods

ppr :: Name -> SDoc #

Outputable NameSort 
Instance details

Defined in GHC.Types.Name

Methods

ppr :: NameSort -> SDoc #

Outputable OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

Methods

ppr :: OccName -> SDoc #

Outputable GlobalRdrElt 
Instance details

Defined in GHC.Types.Name.Reader

Methods

ppr :: GlobalRdrElt -> SDoc #

Outputable ImportSpec 
Instance details

Defined in GHC.Types.Name.Reader

Methods

ppr :: ImportSpec -> SDoc #

Outputable LocalRdrEnv 
Instance details

Defined in GHC.Types.Name.Reader

Methods

ppr :: LocalRdrEnv -> SDoc #

Outputable Parent 
Instance details

Defined in GHC.Types.Name.Reader

Methods

ppr :: Parent -> SDoc #

Outputable RdrName 
Instance details

Defined in GHC.Types.Name.Reader

Methods

ppr :: RdrName -> SDoc #

Outputable PkgQual 
Instance details

Defined in GHC.Types.PkgQual

Methods

ppr :: PkgQual -> SDoc #

Outputable RawPkgQual 
Instance details

Defined in GHC.Types.PkgQual

Methods

ppr :: RawPkgQual -> SDoc #

Outputable IfaceTrustInfo 
Instance details

Defined in GHC.Types.SafeHaskell

Methods

ppr :: IfaceTrustInfo -> SDoc #

Outputable SafeHaskellMode 
Instance details

Defined in GHC.Types.SafeHaskell

Methods

ppr :: SafeHaskellMode -> SDoc #

Outputable FractionalLit 
Instance details

Defined in GHC.Types.SourceText

Methods

ppr :: FractionalLit -> SDoc #

Outputable IntegralLit 
Instance details

Defined in GHC.Types.SourceText

Methods

ppr :: IntegralLit -> SDoc #

Outputable SourceText 
Instance details

Defined in GHC.Types.SourceText

Methods

ppr :: SourceText -> SDoc #

Outputable StringLiteral 
Instance details

Defined in GHC.Types.SourceText

Methods

ppr :: StringLiteral -> SDoc #

Outputable RealSrcLoc 
Instance details

Defined in GHC.Types.SrcLoc

Methods

ppr :: RealSrcLoc -> SDoc #

Outputable RealSrcSpan 
Instance details

Defined in GHC.Types.SrcLoc

Methods

ppr :: RealSrcSpan -> SDoc #

Outputable SrcLoc 
Instance details

Defined in GHC.Types.SrcLoc

Methods

ppr :: SrcLoc -> SDoc #

Outputable SrcSpan 
Instance details

Defined in GHC.Types.SrcLoc

Methods

ppr :: SrcSpan -> SDoc #

Outputable UnhelpfulSpanReason 
Instance details

Defined in GHC.Types.SrcLoc

Outputable Target 
Instance details

Defined in GHC.Types.Target

Methods

ppr :: Target -> SDoc #

Outputable TargetId 
Instance details

Defined in GHC.Types.Target

Methods

ppr :: TargetId -> SDoc #

Outputable TickishPlacement 
Instance details

Defined in GHC.Types.Tickish

Methods

ppr :: TickishPlacement -> SDoc #

Outputable TyThing 
Instance details

Defined in GHC.Types.TyThing

Methods

ppr :: TyThing -> SDoc #

Outputable Unique 
Instance details

Defined in GHC.Types.Unique

Methods

ppr :: Unique -> SDoc #

Outputable ForAllTyFlag 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: ForAllTyFlag -> SDoc #

Outputable FunTyFlag 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: FunTyFlag -> SDoc #

Outputable PiTyBinder 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: PiTyBinder -> SDoc #

Outputable Var 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: Var -> SDoc #

Outputable InScopeSet 
Instance details

Defined in GHC.Types.Var.Env

Methods

ppr :: InScopeSet -> SDoc #

Outputable HomeUnitEnv 
Instance details

Defined in GHC.Unit.Env

Methods

ppr :: HomeUnitEnv -> SDoc #

Outputable HomeModLinkable 
Instance details

Defined in GHC.Unit.Home.ModInfo

Methods

ppr :: HomeModLinkable -> SDoc #

Outputable PackageId 
Instance details

Defined in GHC.Unit.Info

Methods

ppr :: PackageId -> SDoc #

Outputable PackageName 
Instance details

Defined in GHC.Unit.Info

Methods

ppr :: PackageName -> SDoc #

Outputable NDModule 
Instance details

Defined in GHC.Unit.Module.Env

Methods

ppr :: NDModule -> SDoc #

Outputable ModNodeKeyWithUid 
Instance details

Defined in GHC.Unit.Module.Graph

Outputable ModuleGraphNode 
Instance details

Defined in GHC.Unit.Module.Graph

Methods

ppr :: ModuleGraphNode -> SDoc #

Outputable NodeKey 
Instance details

Defined in GHC.Unit.Module.Graph

Methods

ppr :: NodeKey -> SDoc #

Outputable ModLocation 
Instance details

Defined in GHC.Unit.Module.Location

Methods

ppr :: ModLocation -> SDoc #

Outputable ModSummary 
Instance details

Defined in GHC.Unit.Module.ModSummary

Methods

ppr :: ModSummary -> SDoc #

Outputable HscBackendAction 
Instance details

Defined in GHC.Unit.Module.Status

Methods

ppr :: HscBackendAction -> SDoc #

Outputable UnitPprInfo 
Instance details

Defined in GHC.Unit.Ppr

Methods

ppr :: UnitPprInfo -> SDoc #

Outputable ModuleOrigin 
Instance details

Defined in GHC.Unit.State

Methods

ppr :: ModuleOrigin -> SDoc #

Outputable UnitErr 
Instance details

Defined in GHC.Unit.State

Methods

ppr :: UnitErr -> SDoc #

Outputable UnitVisibility 
Instance details

Defined in GHC.Unit.State

Methods

ppr :: UnitVisibility -> SDoc #

Outputable UnusableUnitReason 
Instance details

Defined in GHC.Unit.State

Outputable InstalledModule 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: InstalledModule -> SDoc #

Outputable InstantiatedModule 
Instance details

Defined in GHC.Unit.Types

Outputable InstantiatedUnit 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: InstantiatedUnit -> SDoc #

Outputable Module 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: Module -> SDoc #

Outputable Unit 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: Unit -> SDoc #

Outputable UnitId 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: UnitId -> SDoc #

Outputable PprStyle 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: PprStyle -> SDoc #

Outputable QualifyName 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: QualifyName -> SDoc #

Outputable SDoc 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: SDoc -> SDoc #

Outputable ModuleName 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: ModuleName -> SDoc #

Outputable Serialized 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Serialized -> SDoc #

Outputable Extension 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Extension -> SDoc #

Outputable Ordering 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Ordering -> SDoc #

Outputable UTCTime 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: UTCTime -> SDoc #

Outputable Integer 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Integer -> SDoc #

Outputable () 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: () -> SDoc #

Outputable Bool 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Bool -> SDoc #

Outputable Double 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Double -> SDoc #

Outputable Float 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Float -> SDoc #

Outputable Int 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Int -> SDoc #

Outputable Word 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Word -> SDoc #

Outputable a => Outputable (NonEmpty a) 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: NonEmpty a -> SDoc #

Outputable a => Outputable (SCC a) 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: SCC a -> SDoc #

Outputable elt => Outputable (IntMap elt) 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: IntMap elt -> SDoc #

Outputable a => Outputable (Set a) 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Set a -> SDoc #

Outputable instr => Outputable (GenBasicBlock instr) 
Instance details

Defined in GHC.Cmm

Methods

ppr :: GenBasicBlock instr -> SDoc #

Outputable instr => Outputable (ListGraph instr) 
Instance details

Defined in GHC.Cmm

Methods

ppr :: ListGraph instr -> SDoc #

Outputable a => Outputable (LabelMap a) 
Instance details

Defined in GHC.Cmm.Dataflow.Label

Methods

ppr :: LabelMap a -> SDoc #

Outputable b => Outputable (TaggedBndr b) 
Instance details

Defined in GHC.Core

Methods

ppr :: TaggedBndr b -> SDoc #

Outputable ev => Outputable (NormaliseStepResult ev) 
Instance details

Defined in GHC.Core.Coercion

Methods

ppr :: NormaliseStepResult ev -> SDoc #

Outputable (CoAxiom br) 
Instance details

Defined in GHC.Core.Coercion.Axiom

Methods

ppr :: CoAxiom br -> SDoc #

Outputable a => Outputable (CoreMap a) 
Instance details

Defined in GHC.Core.Map.Expr

Methods

ppr :: CoreMap a -> SDoc #

Outputable a => Outputable (TypeMapG a) 
Instance details

Defined in GHC.Core.Map.Type

Methods

ppr :: TypeMapG a -> SDoc #

Outputable a => Outputable (Scaled a) 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: Scaled a -> SDoc #

Outputable a => Outputable (Bag a) 
Instance details

Defined in GHC.Data.Bag

Methods

ppr :: Bag a -> SDoc #

Outputable a => Outputable (Pair a) 
Instance details

Defined in GHC.Data.Pair

Methods

ppr :: Pair a -> SDoc #

Outputable (KnotVars a) 
Instance details

Defined in GHC.Driver.Env.KnotVars

Methods

ppr :: KnotVars a -> SDoc #

Outputable a => Outputable (OnOff a) 
Instance details

Defined in GHC.Driver.Session

Methods

ppr :: OnOff a -> SDoc #

Outputable a => Outputable (MaybeValidated a) 
Instance details

Defined in GHC.Iface.Recomp

Methods

ppr :: MaybeValidated a -> SDoc #

Outputable a => Outputable (EpAnn a) 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: EpAnn a -> SDoc #

Outputable a => Outputable (SrcSpanAnn' a) 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: SrcSpanAnn' a -> SDoc #

Outputable (PatBuilder GhcPs) 
Instance details

Defined in GHC.Parser.Types

Methods

ppr :: PatBuilder GhcPs -> SDoc #

Outputable (TagEnv p) 
Instance details

Defined in GHC.Stg.InferTags.Types

Methods

ppr :: TagEnv p -> SDoc #

OutputablePass pass => Outputable (GenStgBinding pass) 
Instance details

Defined in GHC.Stg.Syntax

Methods

ppr :: GenStgBinding pass -> SDoc #

OutputablePass pass => Outputable (GenStgExpr pass) 
Instance details

Defined in GHC.Stg.Syntax

Methods

ppr :: GenStgExpr pass -> SDoc #

OutputablePass pass => Outputable (GenStgRhs pass) 
Instance details

Defined in GHC.Stg.Syntax

Methods

ppr :: GenStgRhs pass -> SDoc #

OutputableBndrId a => Outputable (InstInfo (GhcPass a)) 
Instance details

Defined in GHC.Tc.Utils.Env

Methods

ppr :: InstInfo (GhcPass a) -> SDoc #

Outputable name => Outputable (AnnTarget name) 
Instance details

Defined in GHC.Types.Annotations

Methods

ppr :: AnnTarget name -> SDoc #

Outputable (DefMethSpec ty) 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: DefMethSpec ty -> SDoc #

Diagnostic e => Outputable (Messages e) 
Instance details

Defined in GHC.Types.Error

Methods

ppr :: Messages e -> SDoc #

Outputable a => Outputable (OccEnv a) 
Instance details

Defined in GHC.Types.Name.Occurrence

Methods

ppr :: OccEnv a -> SDoc #

Outputable e => Outputable (Located e) 
Instance details

Defined in GHC.Types.SrcLoc

Methods

ppr :: Located e -> SDoc #

Outputable a => Outputable (UniqDSet a) 
Instance details

Defined in GHC.Types.Unique.DSet

Methods

ppr :: UniqDSet a -> SDoc #

Outputable a => Outputable (UniqSet a) 
Instance details

Defined in GHC.Types.Unique.Set

Methods

ppr :: UniqSet a -> SDoc #

Outputable (UnitEnvGraph HomeUnitEnv) 
Instance details

Defined in GHC.Unit.Env

Outputable elt => Outputable (InstalledModuleEnv elt) 
Instance details

Defined in GHC.Unit.Module.Env

Methods

ppr :: InstalledModuleEnv elt -> SDoc #

Outputable a => Outputable (ModuleEnv a) 
Instance details

Defined in GHC.Unit.Module.Env

Methods

ppr :: ModuleEnv a -> SDoc #

Outputable (WarningTxt pass) 
Instance details

Defined in GHC.Unit.Module.Warnings

Methods

ppr :: WarningTxt pass -> SDoc #

Outputable u => Outputable (UnitDatabase u) 
Instance details

Defined in GHC.Unit.State

Methods

ppr :: UnitDatabase u -> SDoc #

Outputable unit => Outputable (Definite unit) 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: Definite unit -> SDoc #

Outputable a => Outputable (GenWithIsBoot a) 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: GenWithIsBoot a -> SDoc #

Outputable a => Outputable (Maybe a) 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Maybe a -> SDoc #

Outputable a => Outputable [a] 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: [a] -> SDoc #

(Outputable a, Outputable b) => Outputable (Either a b) 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Either a b -> SDoc #

(Outputable key, Outputable elt) => Outputable (Map key elt) 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Map key elt -> SDoc #

(Outputable a, Outputable (m a)) => Outputable (GenMap m a) 
Instance details

Defined in GHC.Data.TrieMap

Methods

ppr :: GenMap m a -> SDoc #

(TrieMap m, Outputable a) => Outputable (ListMap m a) 
Instance details

Defined in GHC.Data.TrieMap

Methods

ppr :: ListMap m a -> SDoc #

Outputable a => Outputable (WithHsDocIdentifiers a pass)

For compatibility with the existing @-ddump-parsed' output, we only show the docstring.

Use pprHsDoc to show HsDoc's internals.

Instance details

Defined in GHC.Hs.Doc

Methods

ppr :: WithHsDocIdentifiers a pass -> SDoc #

(Outputable a, Outputable b) => Outputable (HsExpansion a b)

Just print the original expression (the a).

Instance details

Defined in GHC.Hs.Expr

Methods

ppr :: HsExpansion a b -> SDoc #

(Outputable a, Outputable b) => Outputable (HsPatExpansion a b) 
Instance details

Defined in GHC.Hs.Pat

Methods

ppr :: HsPatExpansion a b -> SDoc #

(Outputable r, Outputable b) => Outputable (IfaceBindingX r b) 
Instance details

Defined in GHC.Iface.Syntax

Methods

ppr :: IfaceBindingX r b -> SDoc #

Outputable (GenLocated Anchor EpaComment) 
Instance details

Defined in GHC.Parser.Annotation

(Outputable a, Outputable e) => Outputable (GenLocated (SrcSpanAnn' a) e) 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: GenLocated (SrcSpanAnn' a) e -> SDoc #

Outputable a => Outputable (GenLocated TokenLocation a) 
Instance details

Defined in GHC.Parser.Annotation

Outputable e => Outputable (GenLocated RealSrcSpan e) 
Instance details

Defined in GHC.Types.SrcLoc

Outputable a => Outputable (UniqDFM key a) 
Instance details

Defined in GHC.Types.Unique.DFM

Methods

ppr :: UniqDFM key a -> SDoc #

Outputable a => Outputable (UniqFM key a) 
Instance details

Defined in GHC.Types.Unique.FM

Methods

ppr :: UniqFM key a -> SDoc #

OutputableBndr tv => Outputable (VarBndr tv TyConBndrVis) 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: VarBndr tv TyConBndrVis -> SDoc #

Outputable tv => Outputable (VarBndr tv ForAllTyFlag) 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: VarBndr tv ForAllTyFlag -> SDoc #

Outputable tv => Outputable (VarBndr tv Specificity) 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: VarBndr tv Specificity -> SDoc #

(Outputable a, Outputable b) => Outputable (a, b) 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: (a, b) -> SDoc #

(Outputable a, Outputable b, Outputable c) => Outputable (a, b, c) 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: (a, b, c) -> SDoc #

(Outputable a, Outputable b, Outputable c, Outputable d) => Outputable (a, b, c, d) 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: (a, b, c, d) -> SDoc #

(Outputable a, Outputable b, Outputable c, Outputable d, Outputable e) => Outputable (a, b, c, d, e) 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: (a, b, c, d, e) -> SDoc #

(Outputable a, Outputable b, Outputable c, Outputable d, Outputable e, Outputable f) => Outputable (a, b, c, d, e, f) 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: (a, b, c, d, e, f) -> SDoc #

(Outputable a, Outputable b, Outputable c, Outputable d, Outputable e, Outputable f, Outputable g) => Outputable (a, b, c, d, e, f, g) 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: (a, b, c, d, e, f, g) -> SDoc #

data SDocContext #

Constructors

SDC 

Fields

data QualifyName #

Instances

Instances details
Outputable QualifyName 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: QualifyName -> SDoc #

data PromotionTickContext #

Flags that affect whether a promotion tick is printed.

type QueryPromotionTick = PromotedItem -> Bool #

Given a promoted data constructor, decide whether to print a tick to disambiguate the namespace.

type QueryQualifyPackage = Unit -> Bool #

For a given package, we need to know whether to print it with the component id to disambiguate it.

type QueryQualifyModule = Module -> Bool #

For a given module, we need to know whether to print it with a package name to disambiguate it.

type QueryQualifyName = Module -> OccName -> QualifyName #

Given a Name's Module and OccName, decide whether and how to qualify it.

data NamePprCtx #

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 Depth #

Constructors

AllTheWay 
PartWay Int

0 => stop

DefaultDepth

Use sdocDefaultDepth field as depth

data PprStyle #

Constructors

PprUser NamePprCtx Depth Coloured 
PprDump NamePprCtx 
PprCode

Print code; either C or assembler

Instances

Instances details
Outputable PprStyle 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: PprStyle -> SDoc #

data IdDetails #

Identifier Details

The IdDetails of an Id give stable, and necessary, information about the Id.

Constructors

VanillaId 
RecSelId

The Id for a record selector

DataConWorkId DataCon

The Id is for a data constructor worker

DataConWrapId DataCon

The Id is for a data constructor wrapper

ClassOpId Class

The Id is a superclass selector, or class operation of a class

PrimOpId PrimOp Bool

The Id is for a primitive operator True = is representation-polymorphic, and hence has no binding This lev-poly flag is used only in GHC.Types.Id.hasNoBinding

FCallId ForeignCall

The Id is for a foreign call. Type will be simple: no type families, newtypes, etc

TickBoxOpId TickBoxOp

The Id is for a HPC tick box (both traditional and binary)

DFunId Bool

A dictionary function. Bool = True = the class has only one method, so may be implemented with a newtype, so it might be bad to be strict on this dictionary

CoVarId

A coercion variable This only covers un-lifted coercions, of type (t1 ~# t2) or (t1 ~R# t2), not their lifted variants

JoinId JoinArity (Maybe [CbvMark])

An Id for a join point taking n arguments Note [Join points] in GHC.Core Can also work as a WorkerLikeId if given CbvMarks. See Note [CBV Function Ids] The [CbvMark] is always empty (and ignored) until after Tidy.

WorkerLikeId [CbvMark]

An Id for a worker like function, which might expect some arguments to be passed both evaluated and tagged. Worker like functions are create by W/W and SpecConstr and we can expect that they aren't used unapplied. See Note [CBV Function Ids] See Note [Tag Inference] The [CbvMark] is always empty (and ignored) until after Tidy for ids from the current module.

Instances

Instances details
Outputable IdDetails 
Instance details

Defined in GHC.Types.Id.Info

Methods

ppr :: IdDetails -> SDoc #

data IdInfo #

Identifier Information

An IdInfo gives optional information about an Id. If present it never lies, but it may not be present, in which case there is always a conservative assumption which can be made.

Two Ids may have different info even though they have the same Unique (and are hence the same Id); for example, one might lack the properties attached to the other.

Most of the IdInfo gives information about the value, or definition, of the Id, independent of its usage. Exceptions to this are demandInfo, occInfo, oneShotInfo and callArityInfo.

Performance note: when we update IdInfo, we have to reallocate this entire record, so it is a good idea not to let this data structure get too big.

data StaticPlugin #

A static plugin with its arguments. For registering compiled-in plugins through the GHC API.

Constructors

StaticPlugin 

Fields

data LoadedPlugin #

A plugin with its arguments. The result of loading the plugin.

Constructors

LoadedPlugin 

Fields

data Plugins #

Constructors

Plugins 

Fields

  • staticPlugins :: ![StaticPlugin]

    Static plugins which do not need dynamic loading. These plugins are intended to be added by GHC API users directly to this list.

    To add dynamically loaded plugins through the GHC API see addPluginModuleName instead.

  • externalPlugins :: ![ExternalPlugin]

    External plugins loaded directly from libraries without loading module interfaces.

  • loadedPlugins :: ![LoadedPlugin]

    Plugins dynamically loaded after processing arguments. What will be loaded here is directed by DynFlags.pluginModNames. Arguments are loaded from DynFlags.pluginModNameOpts.

    The purpose of this field is to cache the plugins so they don't have to be loaded each time they are needed. See initializePlugins.

  • loadedPluginDeps :: !([Linkable], PkgsLoaded)

    The object files required by the loaded plugins See Note [Plugin dependencies]

class Uniquable a where #

Class of things that we can obtain a Unique from

Methods

getUnique :: a -> Unique #

Instances

Instances details
Uniquable Label 
Instance details

Defined in GHC.Cmm.Dataflow.Label

Methods

getUnique :: Label -> Unique #

Uniquable Class 
Instance details

Defined in GHC.Core.Class

Methods

getUnique :: Class -> Unique #

Uniquable CoAxiomRule 
Instance details

Defined in GHC.Core.Coercion.Axiom

Uniquable DataCon 
Instance details

Defined in GHC.Core.DataCon

Methods

getUnique :: DataCon -> Unique #

Uniquable PatSyn 
Instance details

Defined in GHC.Core.PatSyn

Methods

getUnique :: PatSyn -> Unique #

Uniquable CoercionHole 
Instance details

Defined in GHC.Core.TyCo.Rep

Uniquable TyCon 
Instance details

Defined in GHC.Core.TyCon

Methods

getUnique :: TyCon -> Unique #

Uniquable FastString 
Instance details

Defined in GHC.Types.Unique

Uniquable Ident 
Instance details

Defined in GHC.JS.Syntax

Methods

getUnique :: Ident -> Unique #

Uniquable Name 
Instance details

Defined in GHC.Types.Name

Methods

getUnique :: Name -> Unique #

Uniquable OccName 
Instance details

Defined in GHC.Types.Name.Occurrence

Methods

getUnique :: OccName -> Unique #

Uniquable Unique 
Instance details

Defined in GHC.Types.Unique

Methods

getUnique :: Unique -> Unique #

Uniquable Var 
Instance details

Defined in GHC.Types.Var

Methods

getUnique :: Var -> Unique #

Uniquable PackageId 
Instance details

Defined in GHC.Unit.Info

Uniquable PackageName 
Instance details

Defined in GHC.Unit.Info

Uniquable Module 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: Module -> Unique #

Uniquable UnitId 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: UnitId -> Unique #

Uniquable ModuleName 
Instance details

Defined in GHC.Types.Unique

Uniquable Int 
Instance details

Defined in GHC.Types.Unique

Methods

getUnique :: Int -> Unique #

Uniquable (CoAxiom br) 
Instance details

Defined in GHC.Core.Coercion.Axiom

Methods

getUnique :: CoAxiom br -> Unique #

Uniquable unit => Uniquable (Definite unit) 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: Definite unit -> Unique #

IsUnitId u => Uniquable (GenUnit u) 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: GenUnit u -> Unique #

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 Class 
Instance details

Defined in GHC.Core.Class

NamedThing DataCon 
Instance details

Defined in GHC.Core.DataCon

NamedThing FamInst 
Instance details

Defined in GHC.Core.FamInstEnv

NamedThing ClsInst 
Instance details

Defined in GHC.Core.InstEnv

NamedThing PatSyn 
Instance details

Defined in GHC.Core.PatSyn

NamedThing TyCon 
Instance details

Defined in GHC.Core.TyCon

NamedThing IfaceClassOp 
Instance details

Defined in GHC.Iface.Syntax

NamedThing IfaceConDecl 
Instance details

Defined in GHC.Iface.Syntax

NamedThing IfaceDecl 
Instance details

Defined in GHC.Iface.Syntax

NamedThing HoleFitCandidate 
Instance details

Defined in GHC.Tc.Errors.Hole.FitTypes

NamedThing Name 
Instance details

Defined in GHC.Types.Name

NamedThing TyThing 
Instance details

Defined in GHC.Types.TyThing

NamedThing Var 
Instance details

Defined in GHC.Types.Var

Methods

getOccName :: Var -> OccName #

getName :: Var -> Name #

NamedThing (CoAxiom br) 
Instance details

Defined in GHC.Core.Coercion.Axiom

Methods

getOccName :: CoAxiom br -> OccName #

getName :: CoAxiom br -> Name #

NamedThing e => NamedThing (Located e) 
Instance details

Defined in GHC.Types.Name

NamedThing (Located a) => NamedThing (LocatedAn an a) 
Instance details

Defined in GHC.Parser.Annotation

Methods

getOccName :: LocatedAn an a -> OccName #

getName :: LocatedAn an a -> Name #

NamedThing tv => NamedThing (VarBndr tv flag) 
Instance details

Defined in GHC.Types.Var

Methods

getOccName :: VarBndr tv flag -> OccName #

getName :: VarBndr tv flag -> Name #

data Name #

A unique, unambiguous name for something, containing information about where that thing originated.

Instances

Instances details
Data Name 
Instance details

Defined in GHC.Types.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 #

NFData Name 
Instance details

Defined in GHC.Types.Name

Methods

rnf :: Name -> () #

NamedThing Name 
Instance details

Defined in GHC.Types.Name

HasOccName Name 
Instance details

Defined in GHC.Types.Name

Methods

occName :: Name -> OccName #

Uniquable Name 
Instance details

Defined in GHC.Types.Name

Methods

getUnique :: Name -> Unique #

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 GHC.Types.Name

Methods

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

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

get :: BinHandle -> IO Name #

Outputable Name 
Instance details

Defined in GHC.Types.Name

Methods

ppr :: Name -> SDoc #

OutputableBndr Name 
Instance details

Defined in GHC.Types.Name

Eq Name

The same comments as for Name's Ord instance apply.

Instance details

Defined in GHC.Types.Name

Methods

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

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

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 GHC.Types.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 #

type Anno Name 
Instance details

Defined in GHC.Hs.Extension

type Anno (LocatedN Name) 
Instance details

Defined in GHC.Hs.Binds

type Anno [LocatedN Name] 
Instance details

Defined in GHC.Hs.Binds

type TcTyVar = Var #

Type variable that might be a metavariable

type TyCoVar = Id #

Type or Coercion Variable

type TyVar = Var #

Type or kind Variable

data Specificity #

Whether an Invisible argument may appear in source Haskell.

Constructors

InferredSpec

the argument may not appear in source Haskell, it is only inferred.

SpecifiedSpec

the argument may appear in source Haskell, but isn't required.

Instances

Instances details
Data Specificity 
Instance details

Defined in GHC.Types.Var

Methods

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

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

toConstr :: Specificity -> Constr #

dataTypeOf :: Specificity -> DataType #

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

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

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

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

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

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

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

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

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

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

Binary Specificity 
Instance details

Defined in GHC.Types.Var

Eq Specificity 
Instance details

Defined in GHC.Types.Var

Ord Specificity 
Instance details

Defined in GHC.Types.Var

OutputableBndrFlag Specificity p 
Instance details

Defined in GHC.Hs.Type

Outputable tv => Outputable (VarBndr tv Specificity) 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: VarBndr tv Specificity -> SDoc #

data VarBndr var argf #

Constructors

Bndr var argf 

Instances

Instances details
(Data var, Data argf) => Data (VarBndr var argf) 
Instance details

Defined in GHC.Types.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 GHC.Types.Var

Methods

getOccName :: VarBndr tv flag -> OccName #

getName :: VarBndr tv flag -> Name #

(Binary tv, Binary vis) => Binary (VarBndr tv vis) 
Instance details

Defined in GHC.Types.Var

Methods

put_ :: BinHandle -> VarBndr tv vis -> IO () #

put :: BinHandle -> VarBndr tv vis -> IO (Bin (VarBndr tv vis)) #

get :: BinHandle -> IO (VarBndr tv vis) #

OutputableBndr tv => Outputable (VarBndr tv TyConBndrVis) 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: VarBndr tv TyConBndrVis -> SDoc #

Outputable tv => Outputable (VarBndr tv ForAllTyFlag) 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: VarBndr tv ForAllTyFlag -> SDoc #

Outputable tv => Outputable (VarBndr tv Specificity) 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: VarBndr tv Specificity -> SDoc #

data Var #

Variable

Essentially a typed Name, that may also contain some additional information about the Var and its use sites.

Instances

Instances details
Data Var 
Instance details

Defined in GHC.Types.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 #

NamedThing Var 
Instance details

Defined in GHC.Types.Var

Methods

getOccName :: Var -> OccName #

getName :: Var -> Name #

HasOccName Var 
Instance details

Defined in GHC.Types.Var

Methods

occName :: Var -> OccName #

Uniquable Var 
Instance details

Defined in GHC.Types.Var

Methods

getUnique :: Var -> Unique #

Outputable Var 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: Var -> SDoc #

Eq Var 
Instance details

Defined in GHC.Types.Var

Methods

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

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

Ord Var 
Instance details

Defined in GHC.Types.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 #

Eq (DeBruijn Var) 
Instance details

Defined in GHC.Core.Map.Type

OutputableBndr (Id, TagSig) 
Instance details

Defined in GHC.Stg.InferTags.TagSig

type Anno Id 
Instance details

Defined in GHC.Hs.Extension

type Anno (LocatedN Id) 
Instance details

Defined in GHC.Hs.Binds

type Anno [LocatedN Id] 
Instance details

Defined in GHC.Hs.Binds

data FunTyFlag #

The non-dependent version of ForAllTyFlag. See Note [FunTyFlag] Appears here partly so that it's together with its friends ForAllTyFlag and ForallVisFlag, but also because it is used in IfaceType, rather early in the compilation chain

Constructors

FTF_T_T 
FTF_T_C 
FTF_C_T 
FTF_C_C 

Instances

Instances details
Data FunTyFlag 
Instance details

Defined in GHC.Types.Var

Methods

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

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

toConstr :: FunTyFlag -> Constr #

dataTypeOf :: FunTyFlag -> DataType #

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

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

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

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

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

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

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

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

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

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

Binary FunTyFlag 
Instance details

Defined in GHC.Types.Var

Outputable FunTyFlag 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: FunTyFlag -> SDoc #

Eq FunTyFlag 
Instance details

Defined in GHC.Types.Var

Ord FunTyFlag 
Instance details

Defined in GHC.Types.Var

data ForAllTyFlag #

ForAllTyFlag

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, ForAllTyBinders, TyConBinders, and visibility] in GHC.Core.TyCo.Rep

Bundled Patterns

pattern Specified :: ForAllTyFlag 
pattern Inferred :: ForAllTyFlag 

Instances

Instances details
Data ForAllTyFlag 
Instance details

Defined in GHC.Types.Var

Methods

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

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

toConstr :: ForAllTyFlag -> Constr #

dataTypeOf :: ForAllTyFlag -> DataType #

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

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

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

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

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

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

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

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

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

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

Binary ForAllTyFlag 
Instance details

Defined in GHC.Types.Var

Outputable ForAllTyFlag 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: ForAllTyFlag -> SDoc #

Eq ForAllTyFlag 
Instance details

Defined in GHC.Types.Var

Ord ForAllTyFlag 
Instance details

Defined in GHC.Types.Var

Outputable tv => Outputable (VarBndr tv ForAllTyFlag) 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: VarBndr tv ForAllTyFlag -> SDoc #

type CoreExpr = Expr CoreBndr #

Expressions where binders are CoreBndrs

type CoreBndr = Var #

The common case for the type of binders and variables when we are manipulating the Core language within GHC

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 [Representation polymorphism invariants]
  • Lambda abstraction See Note [Representation 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 [Core letrec invariant] See Note [Core let-can-float invariant] See Note [Representation polymorphism invariants] See Note [Core 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.
  • Ticks. These are used to represent all the source annotation we support: profiling SCCs, HPC ticks, and GHCi breakpoints.
  • 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) CoercionR 
Tick CoreTickish (Expr b) 
Type Type 
Coercion Coercion 

Instances

Instances details
Data b => Data (Expr b) 
Instance details

Defined in GHC.Core

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) #

type ThetaType = [PredType] #

A collection of PredTypes

type RuntimeRepType = Type #

Type synonym used for types of kind RuntimeRep.

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 Mult = Type #

Mult is a type alias for Type.

Mult must contain Type because multiplicity variables are mere type variables (of kind Multiplicity) in Haskell. So the simplest implementation is to make Mult be Type.

Multiplicities can be formed with: - One: GHC.Types.One (= oneDataCon) - Many: GHC.Types.Many (= manyDataCon) - Multiplication: GHC.Types.MultMul (= multMulTyCon)

So that Mult feels a bit more structured, we provide pattern synonyms and smart constructors for these.

data Scaled a #

A shorthand for data with an attached Mult element (the multiplicity).

Instances

Instances details
Data a => Data (Scaled a) 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

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

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

toConstr :: Scaled a -> Constr #

dataTypeOf :: Scaled a -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable a => Outputable (Scaled a) 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: Scaled a -> SDoc #

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 GHC.Core.TyCo.Rep

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 GHC.Core.TyCo.Rep

Methods

ppr :: MCoercion -> SDoc #

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.

Instances

Instances details
Data UnivCoProvenance 
Instance details

Defined in GHC.Core.TyCo.Rep

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 GHC.Core.TyCo.Rep

Methods

ppr :: UnivCoProvenance -> SDoc #

data CoSel #

Instances

Instances details
Data CoSel 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

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

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

toConstr :: CoSel -> Constr #

dataTypeOf :: CoSel -> DataType #

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

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

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

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

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

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

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

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

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

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

NFData CoSel 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

rnf :: CoSel -> () #

Binary CoSel 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

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

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

get :: BinHandle -> IO CoSel #

Outputable CoSel 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: CoSel -> SDoc #

Eq CoSel 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

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

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

newtype NonDetUniqFM key ele #

A wrapper around UniqFM with the sole purpose of informing call sites that the provided Foldable and Traversable instances are nondeterministic. If you use this please provide a justification why it doesn't introduce nondeterminism. See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM to learn about determinism.

Constructors

NonDetUniqFM 

Fields

Instances

Instances details
Foldable (NonDetUniqFM key)

Inherently nondeterministic. If you use this please provide a justification why it doesn't introduce nondeterminism. See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM to learn about determinism.

Instance details

Defined in GHC.Types.Unique.FM

Methods

fold :: Monoid m => NonDetUniqFM key m -> m #

foldMap :: Monoid m => (a -> m) -> NonDetUniqFM key a -> m #

foldMap' :: Monoid m => (a -> m) -> NonDetUniqFM key a -> m #

foldr :: (a -> b -> b) -> b -> NonDetUniqFM key a -> b #

foldr' :: (a -> b -> b) -> b -> NonDetUniqFM key a -> b #

foldl :: (b -> a -> b) -> b -> NonDetUniqFM key a -> b #

foldl' :: (b -> a -> b) -> b -> NonDetUniqFM key a -> b #

foldr1 :: (a -> a -> a) -> NonDetUniqFM key a -> a #

foldl1 :: (a -> a -> a) -> NonDetUniqFM key a -> a #

toList :: NonDetUniqFM key a -> [a] #

null :: NonDetUniqFM key a -> Bool #

length :: NonDetUniqFM key a -> Int #

elem :: Eq a => a -> NonDetUniqFM key a -> Bool #

maximum :: Ord a => NonDetUniqFM key a -> a #

minimum :: Ord a => NonDetUniqFM key a -> a #

sum :: Num a => NonDetUniqFM key a -> a #

product :: Num a => NonDetUniqFM key a -> a #

Traversable (NonDetUniqFM key)

Inherently nondeterministic. If you use this please provide a justification why it doesn't introduce nondeterminism. See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM to learn about determinism.

Instance details

Defined in GHC.Types.Unique.FM

Methods

traverse :: Applicative f => (a -> f b) -> NonDetUniqFM key a -> f (NonDetUniqFM key b) #

sequenceA :: Applicative f => NonDetUniqFM key (f a) -> f (NonDetUniqFM key a) #

mapM :: Monad m => (a -> m b) -> NonDetUniqFM key a -> m (NonDetUniqFM key b) #

sequence :: Monad m => NonDetUniqFM key (m a) -> m (NonDetUniqFM key a) #

Functor (NonDetUniqFM key) 
Instance details

Defined in GHC.Types.Unique.FM

Methods

fmap :: (a -> b) -> NonDetUniqFM key a -> NonDetUniqFM key b #

(<$) :: a -> NonDetUniqFM key b -> NonDetUniqFM key a #

data UniqFM key ele #

A finite map from uniques of one type to elements in another type.

The key is just here to keep us honest. It's always safe to use a single type as key. If two types don't overlap in their uniques it's also safe to index the same map at multiple key types. But this is very much discouraged.

Instances

Instances details
Functor (UniqFM key) 
Instance details

Defined in GHC.Types.Unique.FM

Methods

fmap :: (a -> b) -> UniqFM key a -> UniqFM key b #

(<$) :: a -> UniqFM key b -> UniqFM key a #

(Data key, Data ele) => Data (UniqFM key ele) 
Instance details

Defined in GHC.Types.Unique.FM

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UniqFM key ele -> c (UniqFM key ele) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UniqFM key ele) #

toConstr :: UniqFM key ele -> Constr #

dataTypeOf :: UniqFM key ele -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> UniqFM key ele -> UniqFM key ele #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UniqFM key ele -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UniqFM key ele -> r #

gmapQ :: (forall d. Data d => d -> u) -> UniqFM key ele -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UniqFM key ele -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UniqFM key ele -> m (UniqFM key ele) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqFM key ele -> m (UniqFM key ele) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqFM key ele -> m (UniqFM key ele) #

Monoid (UniqFM key a) 
Instance details

Defined in GHC.Types.Unique.FM

Methods

mempty :: UniqFM key a #

mappend :: UniqFM key a -> UniqFM key a -> UniqFM key a #

mconcat :: [UniqFM key a] -> UniqFM key a #

Semigroup (UniqFM key a) 
Instance details

Defined in GHC.Types.Unique.FM

Methods

(<>) :: UniqFM key a -> UniqFM key a -> UniqFM key a #

sconcat :: NonEmpty (UniqFM key a) -> UniqFM key a #

stimes :: Integral b => b -> UniqFM key a -> UniqFM key a #

Outputable a => Outputable (UniqFM key a) 
Instance details

Defined in GHC.Types.Unique.FM

Methods

ppr :: UniqFM key a -> SDoc #

Eq ele => Eq (UniqFM key ele) 
Instance details

Defined in GHC.Types.Unique.FM

Methods

(==) :: UniqFM key ele -> UniqFM key ele -> Bool #

(/=) :: UniqFM key ele -> UniqFM key ele -> Bool #

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

A monad for generating unique identifiers

Minimal complete definition

getUniqueSupplyM

Methods

getUniqueSupplyM :: m UniqSupply #

Get a new UniqueSupply

getUniqueM :: m Unique #

Get a new unique identifier

getUniquesM :: m [Unique] #

Get an infinite list of new unique identifiers

data UniqSM result #

A monad which just gives the ability to obtain Uniques

Instances

Instances details
MonadFail UniqSM 
Instance details

Defined in GHC.Types.Unique.Supply

Methods

fail :: String -> UniqSM a #

MonadFix UniqSM 
Instance details

Defined in GHC.Types.Unique.Supply

Methods

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

Applicative UniqSM 
Instance details

Defined in GHC.Types.Unique.Supply

Methods

pure :: a -> UniqSM a #

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

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

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

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

Functor UniqSM 
Instance details

Defined in GHC.Types.Unique.Supply

Methods

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

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

Monad UniqSM 
Instance details

Defined in GHC.Types.Unique.Supply

Methods

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

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

return :: a -> UniqSM a #

MonadUnique UniqSM 
Instance details

Defined in GHC.Types.Unique.Supply

data UniqSupply #

Unique Supply

A value of type UniqSupply is unique, and it can supply one distinct Unique. Also, from the supply, one can also manufacture an arbitrary number of further UniqueSupply values, which will be distinct from the first and from all others.

data LayoutInfo pass #

Layout information for declarations.

Constructors

ExplicitBraces !(LHsToken "{" pass) !(LHsToken "}" pass)

Explicit braces written by the user.

class C a where { foo :: a; bar :: a }
VirtualBraces

Virtual braces inserted by the layout algorithm.

class C a where
  foo :: a
  bar :: a

Fields

  • !Int

    Layout column (indentation level, begins at 1)

NoLayoutInfo

Empty or compiler-generated blocks do not have layout information associated with them.

Instances

Instances details
Typeable p => Data (LayoutInfo (GhcPass p)) 
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) -> LayoutInfo (GhcPass p) -> c (LayoutInfo (GhcPass p)) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LayoutInfo (GhcPass p)) #

toConstr :: LayoutInfo (GhcPass p) -> Constr #

dataTypeOf :: LayoutInfo (GhcPass p) -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> LayoutInfo (GhcPass p) -> LayoutInfo (GhcPass p) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LayoutInfo (GhcPass p) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LayoutInfo (GhcPass p) -> r #

gmapQ :: (forall d. Data d => d -> u) -> LayoutInfo (GhcPass p) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LayoutInfo (GhcPass p) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LayoutInfo (GhcPass p) -> m (LayoutInfo (GhcPass p)) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LayoutInfo (GhcPass p) -> m (LayoutInfo (GhcPass p)) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LayoutInfo (GhcPass p) -> m (LayoutInfo (GhcPass p)) #

data HsUniToken (tok :: Symbol) (utok :: Symbol) #

With UnicodeSyntax, there might be multiple ways to write the same token. For example an arrow could be either -> or . This choice must be recorded in order to exactprint such tokens, so instead of HsToken "->" we introduce HsUniToken "->" "→".

See also IsUnicodeSyntax in GHC.Parser.Annotation; we do not use here to avoid a dependency.

Constructors

HsNormalTok 
HsUnicodeTok 

Instances

Instances details
(KnownSymbol tok, KnownSymbol utok) => Data (HsUniToken tok utok) 
Instance details

Defined in Language.Haskell.Syntax.Concrete

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsUniToken tok utok -> c (HsUniToken tok utok) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsUniToken tok utok) #

toConstr :: HsUniToken tok utok -> Constr #

dataTypeOf :: HsUniToken tok utok -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> HsUniToken tok utok -> HsUniToken tok utok #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsUniToken tok utok -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsUniToken tok utok -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsUniToken tok utok -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsUniToken tok utok -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsUniToken tok utok -> m (HsUniToken tok utok) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsUniToken tok utok -> m (HsUniToken tok utok) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsUniToken tok utok -> m (HsUniToken tok utok) #

type Anno (HsUniToken tok utok) 
Instance details

Defined in GHC.Hs.Extension

type Anno (HsUniToken tok utok) = TokenLocation

data HsToken (tok :: Symbol) #

A token stored in the syntax tree. For example, when parsing a let-expression, we store HsToken "let" and HsToken "in". The locations of those tokens can be used to faithfully reproduce (exactprint) the original program text.

Constructors

HsTok 

Instances

Instances details
KnownSymbol tok => Data (HsToken tok) 
Instance details

Defined in Language.Haskell.Syntax.Concrete

Methods

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

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

toConstr :: HsToken tok -> Constr #

dataTypeOf :: HsToken tok -> DataType #

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

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

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

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

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

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

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

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

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

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

type Anno (HsToken tok) 
Instance details

Defined in GHC.Hs.Extension

type LHsUniToken (tok :: Symbol) (utok :: Symbol) p = XRec p (HsUniToken tok utok) #

type LHsToken (tok :: Symbol) p = XRec p (HsToken tok) #

data ProfAuto #

What kind of {-# SCC #-} to add automatically

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 GHC.Types.ProfAuto

Eq ProfAuto 
Instance details

Defined in GHC.Types.ProfAuto

data PsSpan #

Constructors

PsSpan 

Instances

Instances details
Data PsSpan 
Instance details

Defined in GHC.Types.SrcLoc

Methods

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

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

toConstr :: PsSpan -> Constr #

dataTypeOf :: PsSpan -> DataType #

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

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

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

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

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

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

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

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

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

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

Show PsSpan 
Instance details

Defined in GHC.Types.SrcLoc

Eq PsSpan 
Instance details

Defined in GHC.Types.SrcLoc

Methods

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

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

Ord PsSpan 
Instance details

Defined in GHC.Types.SrcLoc

data PsLoc #

A location as produced by the parser. Consists of two components:

  • The location in the file, adjusted for #line and {-# LINE ... #-} pragmas (RealSrcLoc)
  • The location in the string buffer (BufPos) with monotonicity guarantees (see #17632)

Constructors

PsLoc 

Instances

Instances details
Show PsLoc 
Instance details

Defined in GHC.Types.SrcLoc

Methods

showsPrec :: Int -> PsLoc -> ShowS #

show :: PsLoc -> String #

showList :: [PsLoc] -> ShowS #

Eq PsLoc 
Instance details

Defined in GHC.Types.SrcLoc

Methods

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

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

Ord PsLoc 
Instance details

Defined in GHC.Types.SrcLoc

Methods

compare :: PsLoc -> PsLoc -> Ordering #

(<) :: PsLoc -> PsLoc -> Bool #

(<=) :: PsLoc -> PsLoc -> Bool #

(>) :: PsLoc -> PsLoc -> Bool #

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

max :: PsLoc -> PsLoc -> PsLoc #

min :: PsLoc -> PsLoc -> PsLoc #

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
Foldable (GenLocated l) 
Instance details

Defined in GHC.Types.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 GHC.Types.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) #

Functor (GenLocated l) 
Instance details

Defined in GHC.Types.SrcLoc

Methods

fmap :: (a -> b) -> GenLocated l a -> GenLocated l b #

(<$) :: a -> GenLocated l b -> GenLocated l a #

NamedThing e => NamedThing (Located e) 
Instance details

Defined in GHC.Types.Name

Outputable e => Outputable (Located e) 
Instance details

Defined in GHC.Types.SrcLoc

Methods

ppr :: Located e -> SDoc #

(Data l, Data e) => Data (GenLocated l e) 
Instance details

Defined in GHC.Types.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) #

(Show l, Show e) => Show (GenLocated l e) 
Instance details

Defined in GHC.Types.SrcLoc

Methods

showsPrec :: Int -> GenLocated l e -> ShowS #

show :: GenLocated l e -> String #

showList :: [GenLocated l e] -> ShowS #

(NFData l, NFData e) => NFData (GenLocated l e) 
Instance details

Defined in GHC.Types.SrcLoc

Methods

rnf :: GenLocated l e -> () #

NamedThing (Located a) => NamedThing (LocatedAn an a) 
Instance details

Defined in GHC.Parser.Annotation

Methods

getOccName :: LocatedAn an a -> OccName #

getName :: LocatedAn an a -> Name #

Outputable (GenLocated Anchor EpaComment) 
Instance details

Defined in GHC.Parser.Annotation

(Outputable a, Outputable e) => Outputable (GenLocated (SrcSpanAnn' a) e) 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: GenLocated (SrcSpanAnn' a) e -> SDoc #

Outputable a => Outputable (GenLocated TokenLocation a) 
Instance details

Defined in GHC.Parser.Annotation

Outputable e => Outputable (GenLocated RealSrcSpan e) 
Instance details

Defined in GHC.Types.SrcLoc

(Outputable a, OutputableBndr e) => OutputableBndr (GenLocated (SrcSpanAnn' a) e) 
Instance details

Defined in GHC.Parser.Annotation

(Eq l, Eq e) => Eq (GenLocated l e) 
Instance details

Defined in GHC.Types.SrcLoc

Methods

(==) :: GenLocated l e -> GenLocated l e -> Bool #

(/=) :: GenLocated l e -> GenLocated l e -> Bool #

(Ord l, Ord e) => Ord (GenLocated l e) 
Instance details

Defined in GHC.Types.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 #

type Anno (LocatedA (IE (GhcPass p))) 
Instance details

Defined in GHC.Hs.ImpExp

type Anno (LocatedN Name) 
Instance details

Defined in GHC.Hs.Binds

type Anno (LocatedN RdrName) 
Instance details

Defined in GHC.Hs.Binds

type Anno (LocatedN Id) 
Instance details

Defined in GHC.Hs.Binds

type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (Match GhcPs (LocatedA (PatBuilder GhcPs)))] 
Instance details

Defined in GHC.Parser.PostProcess

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsExpr (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs)))] 
Instance details

Defined in GHC.Parser.Types

type Anno [LocatedA (IE (GhcPass p))] 
Instance details

Defined in GHC.Hs.ImpExp

type Anno [LocatedA (ConDeclField (GhcPass _1))] 
Instance details

Defined in GHC.Hs.Decls

type Anno [LocatedA (HsType (GhcPass p))] 
Instance details

Defined in GHC.Hs.Type

type Anno [LocatedN Name] 
Instance details

Defined in GHC.Hs.Binds

type Anno [LocatedN RdrName] 
Instance details

Defined in GHC.Hs.Binds

type Anno [LocatedN Id] 
Instance details

Defined in GHC.Hs.Binds

type Anno (FamEqn p (LocatedA (HsType p))) 
Instance details

Defined in GHC.Hs.Decls

type Anno (GRHS (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (GRHS (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (GRHS GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (Match GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr)))) = SrcSpanAnnA
type Anno (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (StmtLR GhcRn GhcRn (LocatedA (body GhcRn))) 
Instance details

Defined in GHC.Hs.Expr

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
Data SrcSpan 
Instance details

Defined in GHC.Types.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 #

Show SrcSpan 
Instance details

Defined in GHC.Types.SrcLoc

NFData SrcSpan 
Instance details

Defined in GHC.Types.SrcLoc

Methods

rnf :: SrcSpan -> () #

ToJson SrcSpan 
Instance details

Defined in GHC.Types.SrcLoc

Methods

json :: SrcSpan -> JsonDoc #

Outputable SrcSpan 
Instance details

Defined in GHC.Types.SrcLoc

Methods

ppr :: SrcSpan -> SDoc #

Eq SrcSpan 
Instance details

Defined in GHC.Types.SrcLoc

Methods

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

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

NamedThing e => NamedThing (Located e) 
Instance details

Defined in GHC.Types.Name

Outputable e => Outputable (Located e) 
Instance details

Defined in GHC.Types.SrcLoc

Methods

ppr :: Located e -> 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
Data RealSrcSpan 
Instance details

Defined in GHC.Types.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 #

Show RealSrcSpan 
Instance details

Defined in GHC.Types.SrcLoc

ToJson RealSrcSpan 
Instance details

Defined in GHC.Types.SrcLoc

Methods

json :: RealSrcSpan -> JsonDoc #

Outputable RealSrcSpan 
Instance details

Defined in GHC.Types.SrcLoc

Methods

ppr :: RealSrcSpan -> SDoc #

Eq RealSrcSpan 
Instance details

Defined in GHC.Types.SrcLoc

Ord RealSrcSpan 
Instance details

Defined in GHC.Types.SrcLoc

Outputable e => Outputable (GenLocated RealSrcSpan e) 
Instance details

Defined in GHC.Types.SrcLoc

data BufSpan #

StringBuffer Source Span

Constructors

BufSpan 

Instances

Instances details
Data BufSpan 
Instance details

Defined in GHC.Types.SrcLoc

Methods

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

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

toConstr :: BufSpan -> Constr #

dataTypeOf :: BufSpan -> DataType #

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

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

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

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

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

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

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

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

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

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

Semigroup BufSpan 
Instance details

Defined in GHC.Types.SrcLoc

Show BufSpan 
Instance details

Defined in GHC.Types.SrcLoc

Eq BufSpan 
Instance details

Defined in GHC.Types.SrcLoc

Methods

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

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

Ord BufSpan 
Instance details

Defined in GHC.Types.SrcLoc

data RealSrcLoc #

Real Source Location

Represents a single point within a file

Instances

Instances details
Show RealSrcLoc 
Instance details

Defined in GHC.Types.SrcLoc

Outputable RealSrcLoc 
Instance details

Defined in GHC.Types.SrcLoc

Methods

ppr :: RealSrcLoc -> SDoc #

Eq RealSrcLoc 
Instance details

Defined in GHC.Types.SrcLoc

Ord RealSrcLoc 
Instance details

Defined in GHC.Types.SrcLoc

newtype BufPos #

0-based offset identifying the raw location in the StringBuffer.

The lexer increments the BufPos every time a character (UTF-8 code point) is read from the input buffer. As UTF-8 is a variable-length encoding and StringBuffer needs a byte offset for indexing, a BufPos cannot be used for indexing.

The parser guarantees that BufPos are monotonic. See #17632. This means that syntactic constructs that appear later in the StringBuffer are guaranteed to have a higher BufPos. Contrast that with RealSrcLoc, which does *not* make the analogous guarantee about higher line/column numbers.

This is due to #line and {-# LINE ... #-} pragmas that can arbitrarily modify RealSrcLoc. Notice how setSrcLoc and resetAlrLastLoc in GHC.Parser.Lexer update PsLoc, modifying RealSrcLoc but preserving BufPos.

Monotonicity makes BufPos useful to determine the order in which syntactic elements appear in the source. Consider this example (haddockA041 in the test suite):

haddockA041.hs {-# LANGUAGE CPP #-} -- | Module header documentation module Comments_and_CPP_include where #include "IncludeMe.hs"

IncludeMe.hs: -- | Comment on T data T = MkT -- ^ Comment on MkT

After the C preprocessor runs, the StringBuffer will contain a program that looks like this (unimportant lines at the beginning removed):

# 1 "haddockA041.hs" {-# LANGUAGE CPP #-} -- | Module header documentation module Comments_and_CPP_include where # 1 "IncludeMe.hs" 1 -- | Comment on T data T = MkT -- ^ Comment on MkT # 7 "haddockA041.hs" 2

The line pragmas inserted by CPP make the error messages more informative. The downside is that we can't use RealSrcLoc to determine the ordering of syntactic elements.

With RealSrcLoc, we have the following location information recorded in the AST: * The module name is located at haddockA041.hs:3:8-31 * The Haddock comment "Comment on T" is located at IncludeMe:1:1-17 * The data declaration is located at IncludeMe.hs:2:1-32

Is the Haddock comment located between the module name and the data declaration? This is impossible to tell because the locations are not comparable; they even refer to different files.

On the other hand, with BufPos, we have the following location information: * The module name is located at 846-870 * The Haddock comment "Comment on T" is located at 898-915 * The data declaration is located at 916-928

Aside: if you're wondering why the numbers are so high, try running ghc -E haddockA041.hs and see the extra fluff that CPP inserts at the start of the file.

For error messages, BufPos is not useful at all. On the other hand, this is exactly what we need to determine the order of syntactic elements: 870 < 898, therefore the Haddock comment appears *after* the module name. 915 < 916, therefore the Haddock comment appears *before* the data declaration.

We use BufPos in in GHC.Parser.PostProcess.Haddock to associate Haddock comments with parts of the AST using location information (#17544).

Constructors

BufPos 

Fields

Instances

Instances details
Data BufPos 
Instance details

Defined in GHC.Types.SrcLoc

Methods

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

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

toConstr :: BufPos -> Constr #

dataTypeOf :: BufPos -> DataType #

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

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

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

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

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

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

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

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

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

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

Show BufPos 
Instance details

Defined in GHC.Types.SrcLoc

Eq BufPos 
Instance details

Defined in GHC.Types.SrcLoc

Methods

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

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

Ord BufPos 
Instance details

Defined in GHC.Types.SrcLoc

type FastStringEnv a = UniqFM FastString a #

A non-deterministic set of FastStrings. See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM 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.

data UniqSet a #

Instances

Instances details
Data a => Data (UniqSet a) 
Instance details

Defined in GHC.Types.Unique.Set

Methods

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

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

toConstr :: UniqSet a -> Constr #

dataTypeOf :: UniqSet a -> DataType #

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

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

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

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

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

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

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

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

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

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

Monoid (UniqSet a) 
Instance details

Defined in GHC.Types.Unique.Set

Methods

mempty :: UniqSet a #

mappend :: UniqSet a -> UniqSet a -> UniqSet a #

mconcat :: [UniqSet a] -> UniqSet a #

Semigroup (UniqSet a) 
Instance details

Defined in GHC.Types.Unique.Set

Methods

(<>) :: UniqSet a -> UniqSet a -> UniqSet a #

sconcat :: NonEmpty (UniqSet a) -> UniqSet a #

stimes :: Integral b => b -> UniqSet a -> UniqSet a #

Outputable a => Outputable (UniqSet a) 
Instance details

Defined in GHC.Types.Unique.Set

Methods

ppr :: UniqSet a -> SDoc #

Eq (UniqSet a) 
Instance details

Defined in GHC.Types.Unique.Set

Methods

(==) :: UniqSet a -> UniqSet a -> Bool #

(/=) :: UniqSet a -> UniqSet a -> Bool #

data StringLiteral #

A String Literal in the source, including its original raw format for use by source to source manipulation tools.

Instances

Instances details
Data StringLiteral 
Instance details

Defined in GHC.Types.SourceText

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 #

Binary StringLiteral 
Instance details

Defined in GHC.Types.SourceText

Outputable StringLiteral 
Instance details

Defined in GHC.Types.SourceText

Methods

ppr :: StringLiteral -> SDoc #

Eq StringLiteral 
Instance details

Defined in GHC.Types.SourceText

type Anno StringLiteral 
Instance details

Defined in GHC.Hs.Binds

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. Note [FractionalLit representation] in GHC.HsToCore.Match.Literal The actual value then is: sign * fl_signi * (fl_exp_base^fl_exp) where sign = if fl_neg then (-1) else 1

For example FL { fl_neg = True, fl_signi = 5.3, fl_exp = 4, fl_exp_base = Base10 } denotes -5300

Constructors

FL 

Fields

Instances

Instances details
Data FractionalLit 
Instance details

Defined in GHC.Types.SourceText

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 #

Show FractionalLit 
Instance details

Defined in GHC.Types.SourceText

Outputable FractionalLit 
Instance details

Defined in GHC.Types.SourceText

Methods

ppr :: FractionalLit -> SDoc #

Eq FractionalLit

Be wary of using this instance to compare for equal *values* when exponents are large. The same value expressed in different syntactic form won't compare as equal when any of the exponents is >= 100.

Instance details

Defined in GHC.Types.SourceText

Ord FractionalLit

Be wary of using this instance to compare for equal *values* when exponents are large. The same value expressed in different syntactic form won't compare as equal when any of the exponents is >= 100.

Instance details

Defined in GHC.Types.SourceText

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
Data IntegralLit 
Instance details

Defined in GHC.Types.SourceText

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 #

Show IntegralLit 
Instance details

Defined in GHC.Types.SourceText

Outputable IntegralLit 
Instance details

Defined in GHC.Types.SourceText

Methods

ppr :: IntegralLit -> SDoc #

Eq IntegralLit 
Instance details

Defined in GHC.Types.SourceText

Ord IntegralLit 
Instance details

Defined in GHC.Types.SourceText

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
Data SourceText 
Instance details

Defined in GHC.Types.SourceText

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 GHC.Types.SourceText

Binary SourceText 
Instance details

Defined in GHC.Types.SourceText

Outputable SourceText 
Instance details

Defined in GHC.Types.SourceText

Methods

ppr :: SourceText -> SDoc #

Eq SourceText 
Instance details

Defined in GHC.Types.SourceText

type Anno (SourceText, RuleName) 
Instance details

Defined in GHC.Hs.Decls

data FieldLabel #

Fields in an algebraic record type; see Note [FieldLabel].

Constructors

FieldLabel 

Fields

Instances

Instances details
Data FieldLabel 
Instance details

Defined in GHC.Types.FieldLabel

Methods

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

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

toConstr :: FieldLabel -> Constr #

dataTypeOf :: FieldLabel -> DataType #

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

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

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

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

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

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

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

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

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

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

NFData FieldLabel 
Instance details

Defined in GHC.Types.FieldLabel

Methods

rnf :: FieldLabel -> () #

HasOccName FieldLabel 
Instance details

Defined in GHC.Types.FieldLabel

Binary Name => Binary FieldLabel

We need the Binary Name constraint here even though there is an instance defined in GHC.Types.Name, because the we have a SOURCE import, so the instance is not in scope. And the instance cannot be added to Name.hs-boot because GHC.Utils.Binary itself depends on GHC.Types.Name.

Instance details

Defined in GHC.Types.FieldLabel

Outputable FieldLabel 
Instance details

Defined in GHC.Types.FieldLabel

Methods

ppr :: FieldLabel -> SDoc #

Eq FieldLabel 
Instance details

Defined in GHC.Types.FieldLabel

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_WarnRedundantBangPatterns 
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_WarnMisplacedPragmas 
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 
Opt_WarnInvalidHaddock 
Opt_WarnOperatorWhitespaceExtConflict 
Opt_WarnOperatorWhitespace 
Opt_WarnAmbiguousFields 
Opt_WarnImplicitLift 
Opt_WarnMissingKindSignatures 
Opt_WarnMissingExportedPatternSynonymSignatures 
Opt_WarnRedundantStrictnessFlags 
Opt_WarnForallIdentifier 
Opt_WarnUnicodeBidirectionalFormatCharacters 
Opt_WarnGADTMonoLocalBinds 
Opt_WarnTypeEqualityOutOfScope 
Opt_WarnTypeEqualityRequiresOperators 
Opt_WarnLoopySuperclassSolve 

data GeneralFlag #

Enumerates the simple on-or-off dynamic flags

Constructors

Opt_DumpToFile

Append dump output to files instead of stdout.

Opt_DumpWithWays

Use foo.ways.dumpFlag instead of foo.dumpFlag

Opt_D_dump_minimal_imports 
Opt_DoCoreLinting 
Opt_DoLinearCoreLinting 
Opt_DoStgLinting 
Opt_DoCmmLinting 
Opt_DoAsmLinting 
Opt_DoAnnotationLinting 
Opt_DoBoundsChecking 
Opt_NoLlvmMangler 
Opt_FastLlvm 
Opt_NoTypeableBinds 
Opt_DistinctConstructorTables 
Opt_InfoTableMap 
Opt_InfoTableMapWithFallback 
Opt_InfoTableMapWithStack 
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_PrintRedundantPromotionTicks 
Opt_PrintTypecheckerElaboration 
Opt_CallArity 
Opt_Exitification 
Opt_Strictness 
Opt_LateDmdAnal 
Opt_KillAbsence 
Opt_KillOneShot 
Opt_FullLaziness 
Opt_FloatIn 
Opt_LocalFloatOut

Enable floating out of let-bindings in the simplifier

Opt_LocalFloatOutTopLevel

Enable floating out of let-bindings at the top level in the simplifier N.B. See Note [RHS Floating]

Opt_LateSpecialise 
Opt_Specialise 
Opt_SpecialiseAggressively 
Opt_CrossModuleSpecialise 
Opt_PolymorphicSpecialisation 
Opt_InlineGenerics 
Opt_InlineGenericsAggressively 
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_CmmStaticPred 
Opt_CmmElimCommonBlocks 
Opt_CmmControlFlow 
Opt_AsmShortcutting 
Opt_OmitYields 
Opt_FunToThunk 
Opt_DictsStrict 
Opt_DmdTxDictSel

deprecated, no effect and behaviour is now default. Allowed switching of a special demand transformer for dictionary selectors

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_WorkerWrapperUnlift

Do W/W split for unlifting even if we won't unbox anything.

Opt_SolveConstantDicts 
Opt_AlignmentSanitisation 
Opt_CatchNonexhaustiveCases 
Opt_NumConstantFolding 
Opt_CoreConstantFolding 
Opt_FastPAPCalls 
Opt_DoTagInferenceChecks 
Opt_SimplPreInlining 
Opt_IgnoreInterfacePragmas 
Opt_OmitInterfacePragmas 
Opt_ExposeAllUnfoldings 
Opt_WriteInterface 
Opt_WriteHie 
Opt_AutoSccsOnIndividualCafs 
Opt_ProfCountEntries 
Opt_ProfLateInlineCcs 
Opt_ProfLateCcs 
Opt_ProfManualCcs

Ignore manual SCC annotations

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_Ticky 
Opt_Ticky_Allocd 
Opt_Ticky_LNE 
Opt_Ticky_Dyn_Thunk 
Opt_Ticky_Tag 
Opt_Ticky_AP

Use regular thunks even when we could use std ap thunks in order to get entry counts

Opt_CmmThreadSanitizer 
Opt_RPath 
Opt_RelativeDynlibPaths 
Opt_CompactUnwind
-fcompact-unwind
Opt_Hpc 
Opt_FamAppCache 
Opt_ExternalInterpreter 
Opt_OptimalApplicativeDo 
Opt_VersionMacros 
Opt_WholeArchiveHsLibs 
Opt_SingleLibFolder 
Opt_ExposeInternalSymbols 
Opt_KeepCAFs 
Opt_KeepGoing 
Opt_ByteCode 
Opt_ByteCodeAndObjectCode 
Opt_LinkRts 
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_SuppressCoercionTypes 
Opt_SuppressVarKinds 
Opt_SuppressModulePrefixes 
Opt_SuppressTypeApplications 
Opt_SuppressIdInfo 
Opt_SuppressUnfoldings 
Opt_SuppressTypeSignatures 
Opt_SuppressUniques 
Opt_SuppressStgExts 
Opt_SuppressStgReps 
Opt_SuppressTicks 
Opt_SuppressTimestamps

Suppress timestamps in dumps

Opt_SuppressCoreSizes

Suppress per binding Core size stats in dumps

Opt_ShowErrorContext 
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_WriteIfSimplifiedCore 
Opt_UseBytecodeRatherThanObjects 
Opt_DistrustAllPackages 
Opt_PackageTrust 
Opt_PluginTrustworthy 
Opt_G_NoStateHack 
Opt_G_NoOptCoercion 

data DumpFlag #

Debugging flags

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_cmm_thread_sanitizer 
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_c_backend 
Opt_D_dump_llvm 
Opt_D_dump_js 
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_verbose_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_late_cc 
Opt_D_dump_stg_from_core

Initial STG (CoreToStg output)

Opt_D_dump_stg_unarised

STG after unarise

Opt_D_dump_stg_cg

STG (after stg2stg)

Opt_D_dump_stg_tags

Result of tag inference analysis.

Opt_D_dump_stg_final

Final STG (before cmm gen)

Opt_D_dump_call_arity 
Opt_D_dump_exitify 
Opt_D_dump_stranal 
Opt_D_dump_str_signatures 
Opt_D_dump_cpranal 
Opt_D_dump_cpr_signatures 
Opt_D_dump_tc 
Opt_D_dump_tc_ast 
Opt_D_dump_hie 
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_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 
Opt_D_dump_faststrings 
Opt_D_faststring_stats 
Opt_D_ipe_stats 

Instances

Instances details
Enum DumpFlag 
Instance details

Defined in GHC.Driver.Flags

Show DumpFlag 
Instance details

Defined in GHC.Driver.Flags

Eq DumpFlag 
Instance details

Defined in GHC.Driver.Flags

data Language #

Constructors

Haskell98 
Haskell2010 
GHC2021 

Instances

Instances details
Bounded Language 
Instance details

Defined in GHC.Driver.Flags

Enum Language 
Instance details

Defined in GHC.Driver.Flags

Show Language 
Instance details

Defined in GHC.Driver.Flags

NFData Language 
Instance details

Defined in GHC.Driver.Flags

Methods

rnf :: Language -> () #

Binary Language 
Instance details

Defined in GHC.Driver.Flags

Outputable Language 
Instance details

Defined in GHC.Driver.Flags

Methods

ppr :: Language -> SDoc #

Eq Language 
Instance details

Defined in GHC.Driver.Flags

data GenWithIsBoot mod #

This data type just pairs a value mod with an IsBootInterface flag. In practice, mod is usually a Module or ModuleName'.

Constructors

GWIB 

Instances

Instances details
Foldable GenWithIsBoot 
Instance details

Defined in GHC.Unit.Types

Methods

fold :: Monoid m => GenWithIsBoot m -> m #

foldMap :: Monoid m => (a -> m) -> GenWithIsBoot a -> m #

foldMap' :: Monoid m => (a -> m) -> GenWithIsBoot a -> m #

foldr :: (a -> b -> b) -> b -> GenWithIsBoot a -> b #

foldr' :: (a -> b -> b) -> b -> GenWithIsBoot a -> b #

foldl :: (b -> a -> b) -> b -> GenWithIsBoot a -> b #

foldl' :: (b -> a -> b) -> b -> GenWithIsBoot a -> b #

foldr1 :: (a -> a -> a) -> GenWithIsBoot a -> a #

foldl1 :: (a -> a -> a) -> GenWithIsBoot a -> a #

toList :: GenWithIsBoot a -> [a] #

null :: GenWithIsBoot a -> Bool #

length :: GenWithIsBoot a -> Int #

elem :: Eq a => a -> GenWithIsBoot a -> Bool #

maximum :: Ord a => GenWithIsBoot a -> a #

minimum :: Ord a => GenWithIsBoot a -> a #

sum :: Num a => GenWithIsBoot a -> a #

product :: Num a => GenWithIsBoot a -> a #

Traversable GenWithIsBoot 
Instance details

Defined in GHC.Unit.Types

Methods

traverse :: Applicative f => (a -> f b) -> GenWithIsBoot a -> f (GenWithIsBoot b) #

sequenceA :: Applicative f => GenWithIsBoot (f a) -> f (GenWithIsBoot a) #

mapM :: Monad m => (a -> m b) -> GenWithIsBoot a -> m (GenWithIsBoot b) #

sequence :: Monad m => GenWithIsBoot (m a) -> m (GenWithIsBoot a) #

Functor GenWithIsBoot 
Instance details

Defined in GHC.Unit.Types

Methods

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

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

Show mod => Show (GenWithIsBoot mod) 
Instance details

Defined in GHC.Unit.Types

Binary a => Binary (GenWithIsBoot a) 
Instance details

Defined in GHC.Unit.Types

Outputable a => Outputable (GenWithIsBoot a) 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: GenWithIsBoot a -> SDoc #

Eq mod => Eq (GenWithIsBoot mod) 
Instance details

Defined in GHC.Unit.Types

Methods

(==) :: GenWithIsBoot mod -> GenWithIsBoot mod -> Bool #

(/=) :: GenWithIsBoot mod -> GenWithIsBoot mod -> Bool #

Ord mod => Ord (GenWithIsBoot mod) 
Instance details

Defined in GHC.Unit.Types

newtype Definite unit #

A definite unit (i.e. without any free module hole)

Constructors

Definite 

Fields

Instances

Instances details
Functor Definite 
Instance details

Defined in GHC.Unit.Types

Methods

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

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

Uniquable unit => Uniquable (Definite unit) 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: Definite unit -> Unique #

IsUnitId unit => IsUnitId (Definite unit) 
Instance details

Defined in GHC.Unit.Types

Methods

unitFS :: Definite unit -> FastString #

Binary unit => Binary (Definite unit) 
Instance details

Defined in GHC.Unit.Types

Methods

put_ :: BinHandle -> Definite unit -> IO () #

put :: BinHandle -> Definite unit -> IO (Bin (Definite unit)) #

get :: BinHandle -> IO (Definite unit) #

Outputable unit => Outputable (Definite unit) 
Instance details

Defined in GHC.Unit.Types

Methods

ppr :: Definite unit -> SDoc #

Eq unit => Eq (Definite unit) 
Instance details

Defined in GHC.Unit.Types

Methods

(==) :: Definite unit -> Definite unit -> Bool #

(/=) :: Definite unit -> Definite unit -> Bool #

Ord unit => Ord (Definite unit) 
Instance details

Defined in GHC.Unit.Types

Methods

compare :: Definite unit -> Definite unit -> Ordering #

(<) :: Definite unit -> Definite unit -> Bool #

(<=) :: Definite unit -> Definite unit -> Bool #

(>) :: Definite unit -> Definite unit -> Bool #

(>=) :: Definite unit -> Definite unit -> Bool #

max :: Definite unit -> Definite unit -> Definite unit #

min :: Definite unit -> Definite unit -> Definite unit #

type DefUnitId = Definite UnitId #

A DefUnitId is an UnitId with the invariant that it only refers to a definite library; i.e., one we have generated code for.

data GenInstantiatedUnit unit #

An instantiated unit.

It identifies an indefinite library (with holes) that has been instantiated.

This unit may be indefinite or not (i.e. with remaining holes or not). If it is definite, we don't know if it has already been compiled and installed in a database. Nevertheless, we have a mechanism called "improvement" to try to match a fully instantiated unit with existing compiled and installed units: see Note [VirtUnit to RealUnit improvement].

An indefinite unit identifier pretty-prints to something like p[H=H,A=aimpl:A>] (p is the UnitId, and the brackets enclose the module substitution).

Constructors

InstantiatedUnit 

Fields

newtype UnitKey #

A unit key in the database

Constructors

UnitKey FastString 

Instances

Instances details
IsUnitId UnitKey 
Instance details

Defined in GHC.Unit.Types

Methods

unitFS :: UnitKey -> FastString #

class IsUnitId u where #

Class for types that are used as unit identifiers (UnitKey, UnitId, Unit)

We need this class because we create new unit ids for virtual units (see VirtUnit) and they have to to be made from units with different kinds of identifiers.

Methods

unitFS :: u -> FastString #

Instances

Instances details
IsUnitId UnitId 
Instance details

Defined in GHC.Unit.Types

Methods

unitFS :: UnitId -> FastString #

IsUnitId UnitKey 
Instance details

Defined in GHC.Unit.Types

Methods

unitFS :: UnitKey -> FastString #

IsUnitId unit => IsUnitId (Definite unit) 
Instance details

Defined in GHC.Unit.Types

Methods

unitFS :: Definite unit -> FastString #

IsUnitId u => IsUnitId (GenUnit u) 
Instance details

Defined in GHC.Unit.Types

Methods

unitFS :: GenUnit u -> FastString #

type HomeUnitModule = GenModule UnitId #

A HomeUnitModule is like an InstalledModule but we expect to find it in one of the home units rather than the package database.

type InstalledModule = GenModule UnitId #

A InstalledModule is a GenModule whose unit is identified with an UnitId.

data ModLocation #

Module Location

Where a module lives on the file system: the actual locations of the .hs, .hi, .dyn_hi, .o, .dyn_o and .hie files, if we have them.

For a module in another unit, the ml_hs_file and ml_obj_file components of ModLocation are undefined.

The locations specified by a ModLocation may or may not correspond to actual files yet: for example, even if the object file doesn't exist, the ModLocation still contains the path to where the object file will reside if/when it is created.

The paths of anything which can affect recompilation should be placed inside ModLocation.

When a ModLocation is created none of the filepaths will have -boot suffixes. This is because in --make mode the ModLocation is put in the finder cache which is indexed by ModuleName, when a ModLocation is retrieved from the FinderCache the boot suffixes are appended. The other case is in -c mode, there the ModLocation immediately gets given the boot suffixes in mkOneShotModLocation.

Constructors

ModLocation 

Fields

  • ml_hs_file :: Maybe FilePath

    The source file, if we have one. Package modules probably don't have source files.

  • ml_hi_file :: FilePath

    Where the .hi file is, whether or not it exists yet. Always of form foo.hi, even if there is an hi-boot file (we add the -boot suffix later)

  • ml_dyn_hi_file :: FilePath

    Where the .dyn_hi file is, whether or not it exists yet.

  • ml_obj_file :: FilePath

    Where the .o file is, whether or not it exists yet. (might not exist either because the module hasn't been compiled yet, or because it is part of a unit with a .a file)

  • ml_dyn_obj_file :: FilePath

    Where the .dy file is, whether or not it exists yet.

  • ml_hie_file :: FilePath

    Where the .hie file is, whether or not it exists yet.

Instances

Instances details
Show ModLocation 
Instance details

Defined in GHC.Unit.Module.Location

Outputable ModLocation 
Instance details

Defined in GHC.Unit.Module.Location

Methods

ppr :: ModLocation -> SDoc #

data InstalledModuleEnv elt #

A map keyed off of InstalledModule

Instances

Instances details
Outputable elt => Outputable (InstalledModuleEnv elt) 
Instance details

Defined in GHC.Unit.Module.Env

Methods

ppr :: InstalledModuleEnv elt -> SDoc #

type DModuleNameEnv elt = UniqDFM ModuleName elt #

A map keyed off of ModuleNames (actually, their Uniques) Has deterministic folds and can be deterministically converted to a list

type ModuleNameEnv elt = UniqFM ModuleName elt #

A map keyed off of ModuleNames (actually, their Uniques)

type ModuleSet = Set NDModule #

A set of GenModules

data ModuleEnv elt #

A map keyed off of GenModules

Instances

Instances details
Outputable a => Outputable (ModuleEnv a) 
Instance details

Defined in GHC.Unit.Module.Env

Methods

ppr :: ModuleEnv a -> SDoc #

class HasModule (m :: Type -> Type) where #

Methods

getModule :: m Module #

Instances

Instances details
HasModule CoreM 
Instance details

Defined in GHC.Core.Opt.Monad

HasModule TcS 
Instance details

Defined in GHC.Tc.Solver.Monad

Methods

getModule :: TcS Module #

ContainsModule env => HasModule (IOEnv env) 
Instance details

Defined in GHC.Data.IOEnv

Methods

getModule :: IOEnv env Module #

class ContainsModule t where #

Methods

extractModule :: t -> Module #

Instances

Instances details
ContainsModule DsGblEnv 
Instance details

Defined in GHC.HsToCore.Types

ContainsModule TcGblEnv 
Instance details

Defined in GHC.Tc.Types

ContainsModule gbl => ContainsModule (Env gbl lcl) 
Instance details

Defined in GHC.Tc.Types

Methods

extractModule :: Env gbl lcl -> Module #

data GenHomeUnit u #

Information about the home unit (i.e., the until that will contain the modules we are compiling)

The unit identifier of the instantiating units is left open to allow switching from UnitKey (what is provided by the user) to UnitId (internal unit identifier) with homeUnitMap.

TODO: this isn't implemented yet. UnitKeys are still converted too early into UnitIds in GHC.Unit.State.readUnitDataBase

Constructors

DefiniteHomeUnit UnitId (Maybe (u, GenInstantiations u))

Definite home unit (i.e. that we can compile).

Nothing: not an instantiated unit Just (i,insts): made definite by instantiating "i" with "insts"

IndefiniteHomeUnit UnitId (GenInstantiations u)

Indefinite home unit (i.e. that we can only typecheck)

All the holes are instantiated with fake modules from the Hole unit. See Note [Representation of module/name variables] in GHC.Unit

data PkgQual #

Package-qualifier after renaming

Renaming detects if "this" or the unit-id of the home-unit was used as a package qualifier.

Constructors

NoPkgQual

No package qualifier

ThisPkg UnitId

Import from home-unit

OtherPkg UnitId

Import from another unit

Instances

Instances details
Data PkgQual 
Instance details

Defined in GHC.Types.PkgQual

Methods

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

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

toConstr :: PkgQual -> Constr #

dataTypeOf :: PkgQual -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable PkgQual 
Instance details

Defined in GHC.Types.PkgQual

Methods

ppr :: PkgQual -> SDoc #

Eq PkgQual 
Instance details

Defined in GHC.Types.PkgQual

Methods

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

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

Ord PkgQual 
Instance details

Defined in GHC.Types.PkgQual

data RawPkgQual #

Package-qualifier as it was parsed

Constructors

NoRawPkgQual

No package qualifier

RawPkgQual StringLiteral

Raw package qualifier string.

Instances

Instances details
Data RawPkgQual 
Instance details

Defined in GHC.Types.PkgQual

Methods

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

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

toConstr :: RawPkgQual -> Constr #

dataTypeOf :: RawPkgQual -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable RawPkgQual 
Instance details

Defined in GHC.Types.PkgQual

Methods

ppr :: RawPkgQual -> SDoc #

type LPat p = XRec p (Pat p) #

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) (LIdP p)

Variable Pattern

LazyPat (XLazyPat p) (LPat p)

Lazy Pattern ^ - AnnKeywordId : AnnTilde

AsPat (XAsPat p) (LIdP p) !(LHsToken "@" p) (LPat p)

As pattern ^ - AnnKeywordId : AnnAt

ParPat 

Fields

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 SumWidth

Anonymous sum pattern

ConPat

Constructor Pattern

ViewPat

Fields

SplicePat

Fields

LitPat (XLitPat p) (HsLit p)

Literal Pattern Used for *non-overloaded* literal patterns: Int#, Char#, Int, Char, String, etc.

NPat (XNPat p) (XRec p (HsOverLit p)) (Maybe (SyntaxExpr p)) (SyntaxExpr p)

Natural Pattern

NPlusKPat (XNPlusKPat p) (LIdP p) (XRec p (HsOverLit p)) (HsOverLit p) (SyntaxExpr p) (SyntaxExpr p)

n+k pattern

SigPat

Fields

XPat !(XXPat p) 

Instances

Instances details
type Anno (Pat (GhcPass p)) 
Instance details

Defined in GHC.Hs.Pat

type LHsExpr p #

Arguments

 = XRec p (HsExpr p)

May have AnnKeywordId : AnnComma when in a list

Located Haskell Expression

type family SyntaxExpr p #

Syntax Expression

SyntaxExpr is represents the function used in interpreting rebindable syntax. In the parser, we have no information to supply; in the renamer, we have the name of the function (but see Note [Monad fail : Rebindable syntax, overloaded strings] for a wrinkle) and in the type-checker we have a more elaborate structure SyntaxExprTc.

In some contexts, rebindable syntax is not implemented, and so we have constructors to represent that possibility in both the renamer and typechecker instantiations.

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

Instances

Instances details
type SyntaxExpr (GhcPass p) 
Instance details

Defined in GHC.Hs.Expr

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 MatchGroup p body #

Constructors

MG 

Fields

XMatchGroup !(XXMatchGroup p body) 

data HsUntypedSplice id #

Haskell Splice

Instances

Instances details
type Anno (HsUntypedSplice (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

data PromotionFlag #

Is a TyCon a promoted data constructor or just a normal type constructor?

Constructors

NotPromoted 
IsPromoted 

Instances

Instances details
Data PromotionFlag 
Instance details

Defined in Language.Haskell.Syntax.Type

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 #

Eq PromotionFlag 
Instance details

Defined in Language.Haskell.Syntax.Type

data DefaultingStrategy #

Specify whether to default kind variables, and type variables of kind RuntimeRepLevityMultiplicity.

Constructors

DefaultKindVars

Default kind variables:

  • default kind variables of kind Type to Type,
  • default RuntimeRepLevityMultiplicity kind variables to LiftedRepLiftedMany, respectively.

When this strategy is used, it means that we have determined that the variables we are considering defaulting are all kind variables.

Usually, we pass this option when -XNoPolyKinds is enabled.

NonStandardDefaulting NonStandardDefaultingStrategy

Default (or don't default) non-standard variables, of kinds RuntimeRep, Levity and Multiplicity.

Instances

Instances details
Outputable DefaultingStrategy 
Instance details

Defined in GHC.Types.Basic

data NonStandardDefaultingStrategy #

Specify whether to default type variables of kind RuntimeRepLevityMultiplicity.

Constructors

DefaultNonStandardTyVars

Default type variables of the given kinds:

  • default RuntimeRep variables to LiftedRep
  • default Levity variables to Lifted
  • default Multiplicity variables to Many
TryNotToDefaultNonStandardTyVars

Try not to default type variables of the kinds RuntimeRepLevityMultiplicity.

Note that these might get defaulted anyway, if they are kind variables and `-XNoPolyKinds` is enabled.

Instances

Instances details
Outputable NonStandardDefaultingStrategy 
Instance details

Defined in GHC.Types.Basic

data TypeOrConstraint #

Constructors

TypeLike 
ConstraintLike 

Instances

Instances details
Data TypeOrConstraint 
Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: TypeOrConstraint -> Constr #

dataTypeOf :: TypeOrConstraint -> DataType #

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

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

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

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

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

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

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

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

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

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

Eq TypeOrConstraint 
Instance details

Defined in GHC.Types.Basic

Ord TypeOrConstraint 
Instance details

Defined in GHC.Types.Basic

data TypeOrKind #

Flag to see whether we're type-checking terms or kind-checking types

Constructors

TypeLevel 
KindLevel 

Instances

Instances details
Outputable TypeOrKind 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: TypeOrKind -> SDoc #

Eq TypeOrKind 
Instance details

Defined in GHC.Types.Basic

data InlineSpec #

Inline Specification

Instances

Instances details
Data InlineSpec 
Instance details

Defined in GHC.Types.Basic

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 GHC.Types.Basic

Binary InlineSpec 
Instance details

Defined in GHC.Types.Basic

Outputable InlineSpec 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: InlineSpec -> SDoc #

Eq InlineSpec 
Instance details

Defined in GHC.Types.Basic

data RuleMatchInfo #

Rule Match Information

Constructors

ConLike 
FunLike 

Instances

Instances details
Data RuleMatchInfo 
Instance details

Defined in GHC.Types.Basic

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 GHC.Types.Basic

Binary RuleMatchInfo 
Instance details

Defined in GHC.Types.Basic

Outputable RuleMatchInfo 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: RuleMatchInfo -> SDoc #

Eq RuleMatchInfo 
Instance details

Defined in GHC.Types.Basic

data InlinePragma #

Instances

Instances details
Data InlinePragma 
Instance details

Defined in GHC.Types.Basic

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 #

Binary InlinePragma 
Instance details

Defined in GHC.Types.Basic

Outputable InlinePragma 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: InlinePragma -> SDoc #

Eq InlinePragma 
Instance details

Defined in GHC.Types.Basic

data Activation #

Instances

Instances details
Data Activation 
Instance details

Defined in GHC.Types.Basic

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 #

Binary Activation 
Instance details

Defined in GHC.Types.Basic

Outputable Activation 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: Activation -> SDoc #

Eq Activation 
Instance details

Defined in GHC.Types.Basic

data CompilerPhase #

Instances

Instances details
Outputable CompilerPhase 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: CompilerPhase -> SDoc #

Eq CompilerPhase 
Instance details

Defined in GHC.Types.Basic

type PhaseNum = Int #

Phase Number

data SuccessFlag #

Constructors

Succeeded 
Failed 

Instances

Instances details
Semigroup SuccessFlag 
Instance details

Defined in GHC.Types.Basic

Outputable SuccessFlag 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: SuccessFlag -> SDoc #

data DefMethSpec ty #

Default Method Specification

Constructors

VanillaDM 
GenericDM ty 

Instances

Instances details
Binary (DefMethSpec IfaceType) 
Instance details

Defined in GHC.Iface.Type

Outputable (DefMethSpec ty) 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: DefMethSpec ty -> SDoc #

data TailCallInfo #

Instances

Instances details
Outputable TailCallInfo 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: TailCallInfo -> SDoc #

Eq TailCallInfo 
Instance details

Defined in GHC.Types.Basic

data InsideLam #

Inside Lambda

Constructors

IsInsideLam

Occurs inside a non-linear lambda Substituting a redex for this occurrence is dangerous because it might duplicate work.

NotInsideLam 

Instances

Instances details
Monoid InsideLam 
Instance details

Defined in GHC.Types.Basic

Semigroup InsideLam

If any occurrence of an identifier is inside a lambda, then the occurrence info of that identifier marks it as occurring inside a lambda

Instance details

Defined in GHC.Types.Basic

Eq InsideLam 
Instance details

Defined in GHC.Types.Basic

data InterestingCxt #

Interesting Context

Constructors

IsInteresting

Function: is applied Data value: scrutinised by a case with at least one non-DEFAULT branch

NotInteresting 

Instances

Instances details
Monoid InterestingCxt 
Instance details

Defined in GHC.Types.Basic

Semigroup InterestingCxt

If there is any interesting identifier occurrence, then the aggregated occurrence info of that identifier is considered interesting.

Instance details

Defined in GHC.Types.Basic

Eq InterestingCxt 
Instance details

Defined in GHC.Types.Basic

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
Outputable OccInfo 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: OccInfo -> SDoc #

Eq OccInfo 
Instance details

Defined in GHC.Types.Basic

Methods

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

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

data EP a #

Embedding Projection pair

Constructors

EP 

Fields

data UnboxedTupleOrSum #

Are we dealing with an unboxed tuple or an unboxed sum?

Used when validity checking, see check_ubx_tuple_or_sum.

Instances

Instances details
Outputable UnboxedTupleOrSum 
Instance details

Defined in GHC.Types.Basic

Eq UnboxedTupleOrSum 
Instance details

Defined in GHC.Types.Basic

data TupleSort #

Instances

Instances details
Data TupleSort 
Instance details

Defined in GHC.Types.Basic

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 #

Binary TupleSort 
Instance details

Defined in GHC.Types.Basic

Outputable TupleSort 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: TupleSort -> SDoc #

Eq TupleSort 
Instance details

Defined in GHC.Types.Basic

newtype PprPrec #

A general-purpose pretty-printing precedence type.

Constructors

PprPrec Int 

Instances

Instances details
Show PprPrec 
Instance details

Defined in GHC.Types.Basic

Eq PprPrec 
Instance details

Defined in GHC.Types.Basic

Methods

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

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

Ord PprPrec 
Instance details

Defined in GHC.Types.Basic

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 {-# OVERLAPPABLE #-} 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 {-# OVERLAPPING #-} 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 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 GHC.Core.InstEnv

Instances

Instances details
Data OverlapMode 
Instance details

Defined in GHC.Types.Basic

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 #

Binary OverlapMode 
Instance details

Defined in GHC.Types.Basic

Outputable OverlapMode 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: OverlapMode -> SDoc #

Eq OverlapMode 
Instance details

Defined in GHC.Types.Basic

type Anno OverlapMode 
Instance details

Defined in GHC.Hs.Decls

type Anno OverlapMode 
Instance details

Defined in GHC.Hs.Decls

data OverlapFlag #

The semantics allowed for overlapping instances for a particular instance. See Note [Safe Haskell isSafeOverlap] in GHC.Core.InstEnv for a explanation of the isSafeOverlap field.

Instances

Instances details
Data OverlapFlag 
Instance details

Defined in GHC.Types.Basic

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 #

Binary OverlapFlag 
Instance details

Defined in GHC.Types.Basic

Outputable OverlapFlag 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: OverlapFlag -> SDoc #

Eq OverlapFlag 
Instance details

Defined in GHC.Types.Basic

data Origin #

Constructors

FromSource 
Generated 

Instances

Instances details
Data Origin 
Instance details

Defined in GHC.Types.Basic

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 GHC.Types.Basic

Methods

ppr :: Origin -> SDoc #

Eq Origin 
Instance details

Defined in GHC.Types.Basic

Methods

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

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

data RecFlag #

Recursivity Flag

Constructors

Recursive 
NonRecursive 

Instances

Instances details
Data RecFlag 
Instance details

Defined in GHC.Types.Basic

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 #

Binary RecFlag 
Instance details

Defined in GHC.Types.Basic

Outputable RecFlag 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: RecFlag -> SDoc #

Eq RecFlag 
Instance details

Defined in GHC.Types.Basic

Methods

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

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

data CbvMark #

Should an argument be passed evaluated *and* tagged.

Constructors

MarkedCbv 
NotMarkedCbv 

Instances

Instances details
Binary CbvMark 
Instance details

Defined in GHC.Types.Basic

Outputable CbvMark 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: CbvMark -> SDoc #

Eq CbvMark 
Instance details

Defined in GHC.Types.Basic

Methods

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

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

data TopLevelFlag #

Constructors

TopLevel 
NotTopLevel 

Instances

Instances details
Data TopLevelFlag 
Instance details

Defined in GHC.Types.Basic

Methods

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

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

toConstr :: TopLevelFlag -> Constr #

dataTypeOf :: TopLevelFlag -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable TopLevelFlag 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: TopLevelFlag -> SDoc #

data FunctionOrData #

Constructors

IsFunction 
IsData 

Instances

Instances details
Data FunctionOrData 
Instance details

Defined in GHC.Types.Basic

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 #

Binary FunctionOrData 
Instance details

Defined in GHC.Types.Basic

Outputable FunctionOrData 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: FunctionOrData -> SDoc #

Eq FunctionOrData 
Instance details

Defined in GHC.Types.Basic

Ord FunctionOrData 
Instance details

Defined in GHC.Types.Basic

data SwapFlag #

Constructors

NotSwapped 
IsSwapped 

Instances

Instances details
Outputable SwapFlag 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: SwapFlag -> SDoc #

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.

See also Note [OneShotInfo overview] above.

Constructors

NoOneShotInfo

No information

OneShotLam

The lambda is applied at most once.

Instances

Instances details
Outputable OneShotInfo 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: OneShotInfo -> SDoc #

Eq OneShotInfo 
Instance details

Defined in GHC.Types.Basic

data Alignment #

A power-of-two alignment

Instances

Instances details
Outputable Alignment 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: Alignment -> SDoc #

Eq Alignment 
Instance details

Defined in GHC.Types.Basic

Ord Alignment 
Instance details

Defined in GHC.Types.Basic

OutputableP env Alignment 
Instance details

Defined in GHC.Types.Basic

Methods

pdoc :: env -> Alignment -> SDoc #

type ConTagZ = Int #

A *zero-indexed* constructor tag

type FullArgCount = Int #

FullArgCount is the number of type or value arguments in an application, or the number of type or value binders in a lambda. Note: it includes both type and value arguments!

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 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 (# x, y #) -> fib (x + y) has representation arity 2

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 GHC.Core.Opt.Arity

data LeftOrRight #

Constructors

CLeft 
CRight 

Instances

Instances details
Data LeftOrRight 
Instance details

Defined in GHC.Types.Basic

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 #

Binary LeftOrRight 
Instance details

Defined in GHC.Types.Basic

Outputable LeftOrRight 
Instance details

Defined in GHC.Types.Basic

Methods

ppr :: LeftOrRight -> SDoc #

Eq LeftOrRight 
Instance details

Defined in GHC.Types.Basic

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 GHC.Core.DataCon

Methods

ppr :: EqSpec -> SDoc #

data DataConRep #

Data Constructor Representation See Note [Data constructor workers and wrappers]

data DataCon #

A data constructor

Instances

Instances details
Data DataCon 
Instance details

Defined in GHC.Core.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 #

NamedThing DataCon 
Instance details

Defined in GHC.Core.DataCon

Uniquable DataCon 
Instance details

Defined in GHC.Core.DataCon

Methods

getUnique :: DataCon -> Unique #

Outputable DataCon 
Instance details

Defined in GHC.Core.DataCon

Methods

ppr :: DataCon -> SDoc #

OutputableBndr DataCon 
Instance details

Defined in GHC.Core.DataCon

Eq DataCon 
Instance details

Defined in GHC.Core.DataCon

Methods

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

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

data OccEnv a #

Instances

Instances details
Data a => Data (OccEnv a) 
Instance details

Defined in GHC.Types.Name.Occurrence

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 GHC.Types.Name.Occurrence

Methods

ppr :: OccEnv a -> SDoc #

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 BuiltInSyntax #

BuiltInSyntax is for things like (:), [] and tuples, which have special syntactic forms. They aren't in scope as such.

Constructors

BuiltInSyntax 
UserSyntax 

type PiTyVarBinder = PiTyBinder #

PiTyVarBinder is like PiTyBinder, but there can only be Var in the Named field.

data PiTyBinder #

A PiTyBinder represents an argument to a function. PiTyBinders can be dependent (Named) or nondependent (Anon). They may also be visible or not. See Note [PiTyBinders]

Instances

Instances details
Data PiTyBinder 
Instance details

Defined in GHC.Types.Var

Methods

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

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

toConstr :: PiTyBinder -> Constr #

dataTypeOf :: PiTyBinder -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable PiTyBinder 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: PiTyBinder -> SDoc #

type ForAllTyBinder = VarBndr TyCoVar ForAllTyFlag #

Variable Binder

A ForAllTyBinder is the binder of a ForAllTy It's convenient to define this synonym here rather its natural home in GHC.Core.TyCo.Rep, because it's used in GHC.Core.DataCon.hs-boot

A TyVarBinder is a binder with only TyVar

type OutId = Id #

type OutVar = Var #

type InId = Id #

type InCoVar = CoVar #

type InTyVar = TyVar #

type InVar = Var #

type JoinId = Id #

type EqVar = EvId #

Equality Variable

type IpId = EvId #

Implicit parameter Identifier

type DictId = EvId #

Dictionary Identifier

type DFunId = Id #

Dictionary Function Identifier

type EvVar = EvId #

Evidence Variable

type EvId = Id #

Evidence Identifier

type KindVar = Var #

Kind Variable

type TypeVar = Var #

Type Variable

type TKVar = Var #

Type or Kind Variable

type NcId = Id #

 

type CoVar = Id #

Coercion Variable

type DTyCoVarSet = UniqDSet TyCoVar #

Deterministic Type or Coercion Variable Set

type DTyVarSet = UniqDSet TyVar #

Deterministic Type Variable Set

type DIdSet = UniqDSet Id #

Deterministic Identifier Set

type DVarSet = UniqDSet Var #

Deterministic Variable Set

type TyCoVarSet = UniqSet TyCoVar #

Type or Coercion Variable Set

type CoVarSet = UniqSet CoVar #

Coercion Variable Set

type TyVarSet = UniqSet TyVar #

Type Variable Set

type IdSet = UniqSet Id #

Identifier Set

type VarSet = UniqSet Var #

A non-deterministic Variable Set

A non-deterministic set of variables. See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why it's not deterministic and why it matters. Use DVarSet if the set eventually gets converted into a list or folded over in a way where the order changes the generated code, for example when abstracting variables.

type InterestingVarFun = Var -> Bool #

Predicate on possible free variables: returns True iff the variable is interesting

type DTyVarEnv elt = UniqDFM TyVar elt #

Deterministic Type Variable Environment

type DIdEnv elt = UniqDFM Var elt #

Deterministic Identifier Environment Sadly not always indexed by Id, but it is in the common case.

type DVarEnv elt = UniqDFM Var elt #

Deterministic Variable Environment

type CoVarEnv elt = UniqFM CoVar elt #

Coercion Variable Environment

type TyCoVarEnv elt = UniqFM TyCoVar elt #

Type or Coercion Variable Environment

type TyVarEnv elt = UniqFM Var elt #

Type Variable Environment

type IdEnv elt = UniqFM Id elt #

Identifier Environment

type VarEnv elt = UniqFM Var elt #

Variable Environment

type TidyEnv = (TidyOccEnv, VarEnv Var) #

Tidy Environment

When tidying up print names, we keep a mapping of in-scope occ-names (the TidyOccEnv) and a Var-to-Var of the current renamings

data RnEnv2 #

Rename Environment 2

When we are comparing (or matching) types or terms, we are faced with "going under" corresponding binders. E.g. when comparing:

\x. e1     ~   \y. e2

Basically we want to rename [x -> y] or [y -> x], but there are lots of things we must be careful of. In particular, x might be free in e2, or y in e1. So the idea is that we come up with a fresh binder that is free in neither, and rename x and y respectively. That means we must maintain:

  1. A renaming for the left-hand expression
  2. A renaming for the right-hand expressions
  3. An in-scope set

Furthermore, when matching, we want to be able to have an 'occurs check', to prevent:

\x. f   ~   \y. y

matching with [f -> y]. So for each expression we want to know that set of locally-bound variables. That is precisely the domain of the mappings 1. and 2., but we must ensure that we always extend the mappings as we go in.

All of this information is bundled up in the RnEnv2

newtype InScopeSet #

A set of variables that are in scope at some point.

Note that this is a superset of the variables that are currently in scope. See Note [The InScopeSet invariant].

"Secrets of the Glasgow Haskell Compiler inliner" Section 3.2 provides the motivation for this abstraction.

Constructors

InScope VarSet 

Instances

Instances details
Outputable InScopeSet 
Instance details

Defined in GHC.Types.Var.Env

Methods

ppr :: InScopeSet -> SDoc #

newtype NonCaffySet #

Ids which have no CAF references. This is a result of analysis of C--. It is always safe to use an empty NonCaffySet. TODO Refer to Note.

Constructors

NonCaffySet 

Fields

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

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 Uses = NameSet #

A set of names that are used somewhere

type Defs = NameSet #

A set of names that are defined somewhere

type DNameEnv a = UniqDFM Name a #

Deterministic Name Environment

See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why we need DNameEnv.

type NameEnv a = UniqFM Name a #

Name Environment

data GreName #

Used where we may have an ordinary name or a record field label. See Note [GreNames] in GHC.Types.Name.Reader.

Instances

Instances details
Data GreName 
Instance details

Defined in GHC.Types.Avail

Methods

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

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

toConstr :: GreName -> Constr #

dataTypeOf :: GreName -> DataType #

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

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

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

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

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

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

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

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

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

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

NFData GreName 
Instance details

Defined in GHC.Types.Avail

Methods

rnf :: GreName -> () #

HasOccName GreName 
Instance details

Defined in GHC.Types.Avail

Methods

occName :: GreName -> OccName #

Binary GreName 
Instance details

Defined in GHC.Types.Avail

Outputable GreName 
Instance details

Defined in GHC.Types.Avail

Methods

ppr :: GreName -> SDoc #

Eq GreName 
Instance details

Defined in GHC.Types.Avail

Methods

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

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

Ord GreName 
Instance details

Defined in GHC.Types.Avail

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
Data ImpItemSpec 
Instance details

Defined in GHC.Types.Name.Reader

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 #

Eq ImpItemSpec 
Instance details

Defined in GHC.Types.Name.Reader

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
Data ImpDeclSpec 
Instance details

Defined in GHC.Types.Name.Reader

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 #

Eq ImpDeclSpec 
Instance details

Defined in GHC.Types.Name.Reader

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
Data ImportSpec 
Instance details

Defined in GHC.Types.Name.Reader

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 #

Outputable ImportSpec 
Instance details

Defined in GHC.Types.Name.Reader

Methods

ppr :: ImportSpec -> SDoc #

Eq ImportSpec 
Instance details

Defined in GHC.Types.Name.Reader

data Parent #

See Note [Parents]

Constructors

NoParent 
ParentIs 

Fields

Instances

Instances details
Data Parent 
Instance details

Defined in GHC.Types.Name.Reader

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 GHC.Types.Name.Reader

Methods

ppr :: Parent -> SDoc #

Eq Parent 
Instance details

Defined in GHC.Types.Name.Reader

Methods

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

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

data GlobalRdrElt #

Global Reader Element

An element of the GlobalRdrEnv

Constructors

GRE 

Fields

Instances

Instances details
Data GlobalRdrElt 
Instance details

Defined in GHC.Types.Name.Reader

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 #

HasOccName GlobalRdrElt 
Instance details

Defined in GHC.Types.Name.Reader

Outputable GlobalRdrElt 
Instance details

Defined in GHC.Types.Name.Reader

Methods

ppr :: GlobalRdrElt -> SDoc #

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 GHC.Rename.Names Note [Top-level Names in Template Haskell decl quotes]

INVARIANT 3: If the GlobalRdrEnv maps [occ -> gre], then greOccName gre = occ

NB: greOccName gre is usually the same as nameOccName (greMangledName gre), but not always in the case of record selectors; see Note [GreNames]

data LocalRdrEnv #

Local Reader Environment See Note [LocalRdrEnv]

Instances

Instances details
Outputable LocalRdrEnv 
Instance details

Defined in GHC.Types.Name.Reader

Methods

ppr :: LocalRdrEnv -> SDoc #

data SrcSpanAnn' a #

The 'SrcSpanAnn'' type wraps a normal SrcSpan, together with an extra annotation type. This is mapped to a specific GenLocated usage in the AST through the XRec and Anno type families.

Constructors

SrcSpanAnn 

Fields

Instances

Instances details
Data a => Data (SrcSpanAnn' a) 
Instance details

Defined in GHC.Parser.Annotation

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcSpanAnn' a -> c (SrcSpanAnn' a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SrcSpanAnn' a) #

toConstr :: SrcSpanAnn' a -> Constr #

dataTypeOf :: SrcSpanAnn' a -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> SrcSpanAnn' a -> SrcSpanAnn' a #

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

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

gmapQ :: (forall d. Data d => d -> u) -> SrcSpanAnn' a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcSpanAnn' a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcSpanAnn' a -> m (SrcSpanAnn' a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpanAnn' a -> m (SrcSpanAnn' a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcSpanAnn' a -> m (SrcSpanAnn' a) #

Semigroup an => Semigroup (SrcSpanAnn' an) 
Instance details

Defined in GHC.Parser.Annotation

Outputable a => Outputable (SrcSpanAnn' a) 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: SrcSpanAnn' a -> SDoc #

Eq a => Eq (SrcSpanAnn' a) 
Instance details

Defined in GHC.Parser.Annotation

NamedThing (Located a) => NamedThing (LocatedAn an a) 
Instance details

Defined in GHC.Parser.Annotation

Methods

getOccName :: LocatedAn an a -> OccName #

getName :: LocatedAn an a -> Name #

(Outputable a, Outputable e) => Outputable (GenLocated (SrcSpanAnn' a) e) 
Instance details

Defined in GHC.Parser.Annotation

Methods

ppr :: GenLocated (SrcSpanAnn' a) e -> SDoc #

(Outputable a, OutputableBndr e) => OutputableBndr (GenLocated (SrcSpanAnn' a) e) 
Instance details

Defined in GHC.Parser.Annotation

type Anno (LocatedA (IE (GhcPass p))) 
Instance details

Defined in GHC.Hs.ImpExp

type Anno (LocatedN Name) 
Instance details

Defined in GHC.Hs.Binds

type Anno (LocatedN RdrName) 
Instance details

Defined in GHC.Hs.Binds

type Anno (LocatedN Id) 
Instance details

Defined in GHC.Hs.Binds

type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (Match GhcPs (LocatedA (PatBuilder GhcPs)))] 
Instance details

Defined in GHC.Parser.PostProcess

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsExpr (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs)))] 
Instance details

Defined in GHC.Parser.Types

type Anno [LocatedA (IE (GhcPass p))] 
Instance details

Defined in GHC.Hs.ImpExp

type Anno [LocatedA (ConDeclField (GhcPass _1))] 
Instance details

Defined in GHC.Hs.Decls

type Anno [LocatedA (HsType (GhcPass p))] 
Instance details

Defined in GHC.Hs.Type

type Anno [LocatedN Name] 
Instance details

Defined in GHC.Hs.Binds

type Anno [LocatedN RdrName] 
Instance details

Defined in GHC.Hs.Binds

type Anno [LocatedN Id] 
Instance details

Defined in GHC.Hs.Binds

type Anno (FamEqn p (LocatedA (HsType p))) 
Instance details

Defined in GHC.Hs.Decls

type Anno (GRHS (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (GRHS (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (GRHS GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (Match GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr)))) = SrcSpanAnnA
type Anno (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (StmtLR GhcRn GhcRn (LocatedA (body GhcRn))) 
Instance details

Defined in GHC.Hs.Expr

type OutputableBndrId (pass :: Pass) = (OutputableBndr (IdGhcP pass), OutputableBndr (IdGhcP (NoGhcTcPass pass)), Outputable (GenLocated (Anno (IdGhcP pass)) (IdGhcP pass)), Outputable (GenLocated (Anno (IdGhcP (NoGhcTcPass pass))) (IdGhcP (NoGhcTcPass pass))), IsPass pass) #

Constraint type to bundle up the requirement for OutputableBndr on both the id and the NoGhcTc of it. See Note [NoGhcTc].

type family NoGhcTcPass (p :: Pass) :: Pass where ... #

Equations

NoGhcTcPass 'Typechecked = 'Renamed 
NoGhcTcPass other = other 

type family IdGhcP (pass :: Pass) where ... #

Maps the "normal" id type for a given GHC pass

class (NoGhcTcPass (NoGhcTcPass p) ~ NoGhcTcPass p, IsPass (NoGhcTcPass p)) => IsPass (p :: Pass) where #

Allows us to check what phase we're in at GHC's runtime. For example, this class allows us to write > f :: forall p. IsPass p => HsExpr (GhcPass p) -> blah > f e = case ghcPass @p of > GhcPs -> ... in this RHS we have HsExpr GhcPs... > GhcRn -> ... in this RHS we have HsExpr GhcRn... > GhcTc -> ... in this RHS we have HsExpr GhcTc... which is very useful, for example, when pretty-printing. See Note [IsPass].

Methods

ghcPass :: GhcPass p #

Instances

Instances details
IsPass 'Parsed 
Instance details

Defined in GHC.Hs.Extension

Methods

ghcPass :: GhcPass 'Parsed #

IsPass 'Renamed 
Instance details

Defined in GHC.Hs.Extension

IsPass 'Typechecked 
Instance details

Defined in GHC.Hs.Extension

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 #

data GhcPass (c :: Pass) where #

Used as a data type index for the hsSyn AST; also serves as a singleton type for Pass

Instances

Instances details
Typeable p => Data (GhcPass p) 
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) -> GhcPass p -> c (GhcPass p) #

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

toConstr :: GhcPass p -> Constr #

dataTypeOf :: GhcPass p -> DataType #

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

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

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

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

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

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

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

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

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

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

Typeable p => Data (LayoutInfo (GhcPass p)) 
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) -> LayoutInfo (GhcPass p) -> c (LayoutInfo (GhcPass p)) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LayoutInfo (GhcPass p)) #

toConstr :: LayoutInfo (GhcPass p) -> Constr #

dataTypeOf :: LayoutInfo (GhcPass p) -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> LayoutInfo (GhcPass p) -> LayoutInfo (GhcPass p) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LayoutInfo (GhcPass p) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LayoutInfo (GhcPass p) -> r #

gmapQ :: (forall d. Data d => d -> u) -> LayoutInfo (GhcPass p) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LayoutInfo (GhcPass p) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LayoutInfo (GhcPass p) -> m (LayoutInfo (GhcPass p)) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LayoutInfo (GhcPass p) -> m (LayoutInfo (GhcPass p)) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LayoutInfo (GhcPass p) -> m (LayoutInfo (GhcPass p)) #

DisambECP (PatBuilder GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

Associated Types

type Body (PatBuilder GhcPs) :: Type -> Type #

type InfixOp (PatBuilder GhcPs) #

type FunArg (PatBuilder GhcPs) #

Methods

ecpFromCmd' :: LHsCmd GhcPs -> PV (LocatedA (PatBuilder GhcPs)) #

ecpFromExp' :: LHsExpr GhcPs -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsProjUpdatePV :: SrcSpan -> Located [LocatedAn NoEpAnns (DotFieldOcc GhcPs)] -> LocatedA (PatBuilder GhcPs) -> Bool -> [AddEpAnn] -> PV (LHsRecProj GhcPs (LocatedA (PatBuilder GhcPs))) #

mkHsLamPV :: SrcSpan -> (EpAnnComments -> MatchGroup GhcPs (LocatedA (PatBuilder GhcPs))) -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsLetPV :: SrcSpan -> LHsToken "let" GhcPs -> HsLocalBinds GhcPs -> LHsToken "in" GhcPs -> LocatedA (PatBuilder GhcPs) -> PV (LocatedA (PatBuilder GhcPs)) #

superInfixOp :: (DisambInfixOp (InfixOp (PatBuilder GhcPs)) => PV (LocatedA (PatBuilder GhcPs))) -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsOpAppPV :: SrcSpan -> LocatedA (PatBuilder GhcPs) -> LocatedN (InfixOp (PatBuilder GhcPs)) -> LocatedA (PatBuilder GhcPs) -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> LocatedL [LMatch GhcPs (LocatedA (PatBuilder GhcPs))] -> EpAnnHsCase -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsLamCasePV :: SrcSpan -> LamCaseVariant -> LocatedL [LMatch GhcPs (LocatedA (PatBuilder GhcPs))] -> [AddEpAnn] -> PV (LocatedA (PatBuilder GhcPs)) #

superFunArg :: (DisambECP (FunArg (PatBuilder GhcPs)) => PV (LocatedA (PatBuilder GhcPs))) -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsAppPV :: SrcSpanAnnA -> LocatedA (PatBuilder GhcPs) -> LocatedA (FunArg (PatBuilder GhcPs)) -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsAppTypePV :: SrcSpanAnnA -> LocatedA (PatBuilder GhcPs) -> LHsToken "@" GhcPs -> LHsType GhcPs -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> LocatedA (PatBuilder GhcPs) -> Bool -> LocatedA (PatBuilder GhcPs) -> AnnsIf -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsDoPV :: SrcSpan -> Maybe ModuleName -> LocatedL [LStmt GhcPs (LocatedA (PatBuilder GhcPs))] -> AnnList -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsParPV :: SrcSpan -> LHsToken "(" GhcPs -> LocatedA (PatBuilder GhcPs) -> LHsToken ")" GhcPs -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsVarPV :: LocatedN RdrName -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkHsOverLitPV :: LocatedAn a (HsOverLit GhcPs) -> PV (LocatedAn a (PatBuilder GhcPs)) #

mkHsWildCardPV :: SrcSpan -> PV (Located (PatBuilder GhcPs)) #

mkHsTySigPV :: SrcSpanAnnA -> LocatedA (PatBuilder GhcPs) -> LHsType GhcPs -> [AddEpAnn] -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsExplicitListPV :: SrcSpan -> [LocatedA (PatBuilder GhcPs)] -> AnnList -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsSplicePV :: Located (HsUntypedSplice GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkHsRecordPV :: Bool -> SrcSpan -> SrcSpan -> LocatedA (PatBuilder GhcPs) -> ([Fbind (PatBuilder GhcPs)], Maybe SrcSpan) -> [AddEpAnn] -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsNegAppPV :: SrcSpan -> LocatedA (PatBuilder GhcPs) -> [AddEpAnn] -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsSectionR_PV :: SrcSpan -> LocatedA (InfixOp (PatBuilder GhcPs)) -> LocatedA (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs)) #

mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> LocatedA (PatBuilder GhcPs) -> [AddEpAnn] -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsAsPatPV :: SrcSpan -> LocatedN RdrName -> LHsToken "@" GhcPs -> LocatedA (PatBuilder GhcPs) -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsLazyPatPV :: SrcSpan -> LocatedA (PatBuilder GhcPs) -> [AddEpAnn] -> PV (LocatedA (PatBuilder GhcPs)) #

mkHsBangPatPV :: SrcSpan -> LocatedA (PatBuilder GhcPs) -> [AddEpAnn] -> PV (LocatedA (PatBuilder GhcPs)) #

mkSumOrTuplePV :: SrcSpanAnnA -> Boxity -> SumOrTuple (PatBuilder GhcPs) -> [AddEpAnn] -> PV (LocatedA (PatBuilder GhcPs)) #

rejectPragmaPV :: LocatedA (PatBuilder GhcPs) -> PV () #

DisambECP (HsCmd GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

Associated Types

type Body (HsCmd GhcPs) :: Type -> Type #

type InfixOp (HsCmd GhcPs) #

type FunArg (HsCmd GhcPs) #

Methods

ecpFromCmd' :: LHsCmd GhcPs -> PV (LocatedA (HsCmd GhcPs)) #

ecpFromExp' :: LHsExpr GhcPs -> PV (LocatedA (HsCmd GhcPs)) #

mkHsProjUpdatePV :: SrcSpan -> Located [LocatedAn NoEpAnns (DotFieldOcc GhcPs)] -> LocatedA (HsCmd GhcPs) -> Bool -> [AddEpAnn] -> PV (LHsRecProj GhcPs (LocatedA (HsCmd GhcPs))) #

mkHsLamPV :: SrcSpan -> (EpAnnComments -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs))) -> PV (LocatedA (HsCmd GhcPs)) #

mkHsLetPV :: SrcSpan -> LHsToken "let" GhcPs -> HsLocalBinds GhcPs -> LHsToken "in" GhcPs -> LocatedA (HsCmd GhcPs) -> PV (LocatedA (HsCmd GhcPs)) #

superInfixOp :: (DisambInfixOp (InfixOp (HsCmd GhcPs)) => PV (LocatedA (HsCmd GhcPs))) -> PV (LocatedA (HsCmd GhcPs)) #

mkHsOpAppPV :: SrcSpan -> LocatedA (HsCmd GhcPs) -> LocatedN (InfixOp (HsCmd GhcPs)) -> LocatedA (HsCmd GhcPs) -> PV (LocatedA (HsCmd GhcPs)) #

mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> LocatedL [LMatch GhcPs (LocatedA (HsCmd GhcPs))] -> EpAnnHsCase -> PV (LocatedA (HsCmd GhcPs)) #

mkHsLamCasePV :: SrcSpan -> LamCaseVariant -> LocatedL [LMatch GhcPs (LocatedA (HsCmd GhcPs))] -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

superFunArg :: (DisambECP (FunArg (HsCmd GhcPs)) => PV (LocatedA (HsCmd GhcPs))) -> PV (LocatedA (HsCmd GhcPs)) #

mkHsAppPV :: SrcSpanAnnA -> LocatedA (HsCmd GhcPs) -> LocatedA (FunArg (HsCmd GhcPs)) -> PV (LocatedA (HsCmd GhcPs)) #

mkHsAppTypePV :: SrcSpanAnnA -> LocatedA (HsCmd GhcPs) -> LHsToken "@" GhcPs -> LHsType GhcPs -> PV (LocatedA (HsCmd GhcPs)) #

mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> LocatedA (HsCmd GhcPs) -> Bool -> LocatedA (HsCmd GhcPs) -> AnnsIf -> PV (LocatedA (HsCmd GhcPs)) #

mkHsDoPV :: SrcSpan -> Maybe ModuleName -> LocatedL [LStmt GhcPs (LocatedA (HsCmd GhcPs))] -> AnnList -> PV (LocatedA (HsCmd GhcPs)) #

mkHsParPV :: SrcSpan -> LHsToken "(" GhcPs -> LocatedA (HsCmd GhcPs) -> LHsToken ")" GhcPs -> PV (LocatedA (HsCmd GhcPs)) #

mkHsVarPV :: LocatedN RdrName -> PV (LocatedA (HsCmd GhcPs)) #

mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located (HsCmd GhcPs)) #

mkHsOverLitPV :: LocatedAn a (HsOverLit GhcPs) -> PV (LocatedAn a (HsCmd GhcPs)) #

mkHsWildCardPV :: SrcSpan -> PV (Located (HsCmd GhcPs)) #

mkHsTySigPV :: SrcSpanAnnA -> LocatedA (HsCmd GhcPs) -> LHsType GhcPs -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

mkHsExplicitListPV :: SrcSpan -> [LocatedA (HsCmd GhcPs)] -> AnnList -> PV (LocatedA (HsCmd GhcPs)) #

mkHsSplicePV :: Located (HsUntypedSplice GhcPs) -> PV (Located (HsCmd GhcPs)) #

mkHsRecordPV :: Bool -> SrcSpan -> SrcSpan -> LocatedA (HsCmd GhcPs) -> ([Fbind (HsCmd GhcPs)], Maybe SrcSpan) -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

mkHsNegAppPV :: SrcSpan -> LocatedA (HsCmd GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

mkHsSectionR_PV :: SrcSpan -> LocatedA (InfixOp (HsCmd GhcPs)) -> LocatedA (HsCmd GhcPs) -> PV (Located (HsCmd GhcPs)) #

mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> LocatedA (HsCmd GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

mkHsAsPatPV :: SrcSpan -> LocatedN RdrName -> LHsToken "@" GhcPs -> LocatedA (HsCmd GhcPs) -> PV (LocatedA (HsCmd GhcPs)) #

mkHsLazyPatPV :: SrcSpan -> LocatedA (HsCmd GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

mkHsBangPatPV :: SrcSpan -> LocatedA (HsCmd GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

mkSumOrTuplePV :: SrcSpanAnnA -> Boxity -> SumOrTuple (HsCmd GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

rejectPragmaPV :: LocatedA (HsCmd GhcPs) -> PV () #

DisambECP (HsExpr GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

Associated Types

type Body (HsExpr GhcPs) :: Type -> Type #

type InfixOp (HsExpr GhcPs) #

type FunArg (HsExpr GhcPs) #

Methods

ecpFromCmd' :: LHsCmd GhcPs -> PV (LocatedA (HsExpr GhcPs)) #

ecpFromExp' :: LHsExpr GhcPs -> PV (LocatedA (HsExpr GhcPs)) #

mkHsProjUpdatePV :: SrcSpan -> Located [LocatedAn NoEpAnns (DotFieldOcc GhcPs)] -> LocatedA (HsExpr GhcPs) -> Bool -> [AddEpAnn] -> PV (LHsRecProj GhcPs (LocatedA (HsExpr GhcPs))) #

mkHsLamPV :: SrcSpan -> (EpAnnComments -> MatchGroup GhcPs (LocatedA (HsExpr GhcPs))) -> PV (LocatedA (HsExpr GhcPs)) #

mkHsLetPV :: SrcSpan -> LHsToken "let" GhcPs -> HsLocalBinds GhcPs -> LHsToken "in" GhcPs -> LocatedA (HsExpr GhcPs) -> PV (LocatedA (HsExpr GhcPs)) #

superInfixOp :: (DisambInfixOp (InfixOp (HsExpr GhcPs)) => PV (LocatedA (HsExpr GhcPs))) -> PV (LocatedA (HsExpr GhcPs)) #

mkHsOpAppPV :: SrcSpan -> LocatedA (HsExpr GhcPs) -> LocatedN (InfixOp (HsExpr GhcPs)) -> LocatedA (HsExpr GhcPs) -> PV (LocatedA (HsExpr GhcPs)) #

mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> LocatedL [LMatch GhcPs (LocatedA (HsExpr GhcPs))] -> EpAnnHsCase -> PV (LocatedA (HsExpr GhcPs)) #

mkHsLamCasePV :: SrcSpan -> LamCaseVariant -> LocatedL [LMatch GhcPs (LocatedA (HsExpr GhcPs))] -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

superFunArg :: (DisambECP (FunArg (HsExpr GhcPs)) => PV (LocatedA (HsExpr GhcPs))) -> PV (LocatedA (HsExpr GhcPs)) #

mkHsAppPV :: SrcSpanAnnA -> LocatedA (HsExpr GhcPs) -> LocatedA (FunArg (HsExpr GhcPs)) -> PV (LocatedA (HsExpr GhcPs)) #

mkHsAppTypePV :: SrcSpanAnnA -> LocatedA (HsExpr GhcPs) -> LHsToken "@" GhcPs -> LHsType GhcPs -> PV (LocatedA (HsExpr GhcPs)) #

mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> LocatedA (HsExpr GhcPs) -> Bool -> LocatedA (HsExpr GhcPs) -> AnnsIf -> PV (LocatedA (HsExpr GhcPs)) #

mkHsDoPV :: SrcSpan -> Maybe ModuleName -> LocatedL [LStmt GhcPs (LocatedA (HsExpr GhcPs))] -> AnnList -> PV (LocatedA (HsExpr GhcPs)) #

mkHsParPV :: SrcSpan -> LHsToken "(" GhcPs -> LocatedA (HsExpr GhcPs) -> LHsToken ")" GhcPs -> PV (LocatedA (HsExpr GhcPs)) #

mkHsVarPV :: LocatedN RdrName -> PV (LocatedA (HsExpr GhcPs)) #

mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located (HsExpr GhcPs)) #

mkHsOverLitPV :: LocatedAn a (HsOverLit GhcPs) -> PV (LocatedAn a (HsExpr GhcPs)) #

mkHsWildCardPV :: SrcSpan -> PV (Located (HsExpr GhcPs)) #

mkHsTySigPV :: SrcSpanAnnA -> LocatedA (HsExpr GhcPs) -> LHsType GhcPs -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

mkHsExplicitListPV :: SrcSpan -> [LocatedA (HsExpr GhcPs)] -> AnnList -> PV (LocatedA (HsExpr GhcPs)) #

mkHsSplicePV :: Located (HsUntypedSplice GhcPs) -> PV (Located (HsExpr GhcPs)) #

mkHsRecordPV :: Bool -> SrcSpan -> SrcSpan -> LocatedA (HsExpr GhcPs) -> ([Fbind (HsExpr GhcPs)], Maybe SrcSpan) -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

mkHsNegAppPV :: SrcSpan -> LocatedA (HsExpr GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

mkHsSectionR_PV :: SrcSpan -> LocatedA (InfixOp (HsExpr GhcPs)) -> LocatedA (HsExpr GhcPs) -> PV (Located (HsExpr GhcPs)) #

mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> LocatedA (HsExpr GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

mkHsAsPatPV :: SrcSpan -> LocatedN RdrName -> LHsToken "@" GhcPs -> LocatedA (HsExpr GhcPs) -> PV (LocatedA (HsExpr GhcPs)) #

mkHsLazyPatPV :: SrcSpan -> LocatedA (HsExpr GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

mkHsBangPatPV :: SrcSpan -> LocatedA (HsExpr GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

mkSumOrTuplePV :: SrcSpanAnnA -> Boxity -> SumOrTuple (HsExpr GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsExpr GhcPs)) #

rejectPragmaPV :: LocatedA (HsExpr GhcPs) -> PV () #

DisambInfixOp (HsExpr GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

DisambTD (HsType GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

Binary (WarningTxt GhcRn) 
Instance details

Defined in GHC.Unit.Module.Warnings

Binary (Warnings GhcRn) 
Instance details

Defined in GHC.Unit.Module.Warnings

Outputable (PatBuilder GhcPs) 
Instance details

Defined in GHC.Parser.Types

Methods

ppr :: PatBuilder GhcPs -> SDoc #

OutputableBndrId a => Outputable (InstInfo (GhcPass a)) 
Instance details

Defined in GHC.Tc.Utils.Env

Methods

ppr :: InstInfo (GhcPass a) -> SDoc #

MapXRec (GhcPass p) 
Instance details

Defined in GHC.Hs.Extension

Methods

mapXRec :: Anno a ~ Anno b => (a -> b) -> XRec (GhcPass p) a -> XRec (GhcPass p) b #

UnXRec (GhcPass p) 
Instance details

Defined in GHC.Hs.Extension

Methods

unXRec :: XRec (GhcPass p) a -> a #

Binary a => Binary (WithHsDocIdentifiers a GhcRn) 
Instance details

Defined in GHC.Hs.Doc

type ImportDeclPkgQual GhcPs 
Instance details

Defined in GHC.Hs.ImpExp

type ImportDeclPkgQual GhcRn 
Instance details

Defined in GHC.Hs.ImpExp

type ImportDeclPkgQual GhcTc 
Instance details

Defined in GHC.Hs.ImpExp

type XAmbiguous GhcPs 
Instance details

Defined in GHC.Hs.Type

type XAmbiguous GhcRn 
Instance details

Defined in GHC.Hs.Type

type XAmbiguous GhcTc 
Instance details

Defined in GHC.Hs.Type

type XAnyClassStrategy GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XAnyClassStrategy GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XAnyClassStrategy GhcTc 
Instance details

Defined in GHC.Hs.Decls

type XAppTypeE GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XAppTypeE GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XAppTypeE GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XApplicativeArgOne GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XApplicativeArgOne GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XApplicativeArgOne 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 XAsPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XAsPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XAsPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XBangPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XBangPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XBangPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XCClsInstDecl GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XCClsInstDecl GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XCClsInstDecl GhcTc 
Instance details

Defined in GHC.Hs.Decls

type XCDefaultDecl GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XCDefaultDecl GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XCDefaultDecl GhcTc 
Instance details

Defined in GHC.Hs.Decls

type XCFieldOcc GhcPs 
Instance details

Defined in GHC.Hs.Type

type XCFieldOcc GhcRn 
Instance details

Defined in GHC.Hs.Type

type XCFieldOcc GhcTc 
Instance details

Defined in GHC.Hs.Type

type XCIPBind GhcPs 
Instance details

Defined in GHC.Hs.Binds

type XCIPBind GhcRn 
Instance details

Defined in GHC.Hs.Binds

type XCIPBind GhcTc 
Instance details

Defined in GHC.Hs.Binds

type XCImportDecl GhcPs 
Instance details

Defined in GHC.Hs.ImpExp

type XCImportDecl GhcRn 
Instance details

Defined in GHC.Hs.ImpExp

type XCImportDecl GhcTc 
Instance details

Defined in GHC.Hs.ImpExp

type XCModule GhcPs 
Instance details

Defined in GHC.Hs

type XCModule GhcRn 
Instance details

Defined in GHC.Hs

type XCModule GhcTc 
Instance details

Defined in GHC.Hs

type XCRoleAnnotDecl GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XCRoleAnnotDecl GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XCRoleAnnotDecl GhcTc 
Instance details

Defined in GHC.Hs.Decls

type XCRuleDecls GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XCRuleDecls GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XCRuleDecls GhcTc 
Instance details

Defined in GHC.Hs.Decls

type XCase GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCase GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCase GhcTc 
Instance details

Defined in GHC.Hs.Expr

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 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 XCmdArrForm GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdArrForm GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdArrForm GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XCmdCase GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdCase GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdCase 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 XCmdIf GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdIf GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdIf GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XCmdLet GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XCmdLet GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XCmdLet 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 XConPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XConPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XConPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

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 XDecBrG GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XDecBrG GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XDecBrG GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XDecBrL GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XDecBrL GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XDecBrL 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 XExpBr GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XExpBr GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XExpBr GhcTc 
Instance details

Defined in GHC.Hs.Expr

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 XExplicitListTy GhcPs 
Instance details

Defined in GHC.Hs.Type

type XExplicitListTy GhcRn 
Instance details

Defined in GHC.Hs.Type

type XExplicitListTy GhcTc 
Instance details

Defined in GHC.Hs.Type

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 XExplicitTuple GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XExplicitTuple GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XExplicitTuple GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XExplicitTupleTy GhcPs 
Instance details

Defined in GHC.Hs.Type

type XExplicitTupleTy GhcRn 
Instance details

Defined in GHC.Hs.Type

type XExplicitTupleTy GhcTc 
Instance details

Defined in GHC.Hs.Type

type XExprWithTySig GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XExprWithTySig GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XExprWithTySig GhcTc 
Instance details

Defined in GHC.Hs.Expr

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 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 XGetField GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XGetField GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XGetField GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XHsOuterImplicit GhcPs 
Instance details

Defined in GHC.Hs.Type

type XHsOuterImplicit GhcRn 
Instance details

Defined in GHC.Hs.Type

type XHsOuterImplicit GhcTc 
Instance details

Defined in GHC.Hs.Type

type XHsPS GhcPs 
Instance details

Defined in GHC.Hs.Type

type XHsPS GhcRn 
Instance details

Defined in GHC.Hs.Type

type XHsPS GhcTc 
Instance details

Defined in GHC.Hs.Type

type XHsQTvs GhcPs 
Instance details

Defined in GHC.Hs.Type

type XHsQTvs GhcRn 
Instance details

Defined in GHC.Hs.Type

type XHsQTvs GhcRn = HsQTvsRn
type XHsQTvs GhcTc 
Instance details

Defined in GHC.Hs.Type

type XHsQTvs GhcTc = HsQTvsRn
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 XIEModuleContents GhcPs 
Instance details

Defined in GHC.Hs.ImpExp

type XIEModuleContents GhcRn 
Instance details

Defined in GHC.Hs.ImpExp

type XIEModuleContents GhcTc 
Instance details

Defined in GHC.Hs.ImpExp

type XIEVar GhcPs 
Instance details

Defined in GHC.Hs.ImpExp

type XIEVar GhcRn 
Instance details

Defined in GHC.Hs.ImpExp

type XIEVar GhcTc 
Instance details

Defined in GHC.Hs.ImpExp

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 XIPVar GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XIPVar GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XIPVar GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XIf GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XIf GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XIf GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XLazyPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XLazyPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XLazyPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XLet GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XLet GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XLet GhcTc 
Instance details

Defined in GHC.Hs.Expr

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 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 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 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 XNegApp GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XNegApp GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XNegApp GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XNewtypeStrategy GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XNewtypeStrategy GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XNewtypeStrategy 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 XOverLabel GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XOverLabel GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XOverLabel 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 XPatBr GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XPatBr GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XPatBr GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XProjection GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XProjection GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XProjection GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XRecSel GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XRecSel GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XRecSel GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XRecTy GhcPs 
Instance details

Defined in GHC.Hs.Type

type XRecTy GhcRn 
Instance details

Defined in GHC.Hs.Type

type XRecTy GhcTc 
Instance details

Defined in GHC.Hs.Type

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 XSectionL GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XSectionL GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XSectionL GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XSectionR GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XSectionR GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XSectionR GhcTc 
Instance details

Defined in GHC.Hs.Expr

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 XSplicePat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XSplicePat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XSplicePat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XSpliceTy GhcPs 
Instance details

Defined in GHC.Hs.Type

type XSpliceTy GhcRn 
Instance details

Defined in GHC.Hs.Type

type XSpliceTy GhcTc 
Instance details

Defined in GHC.Hs.Type

type XStandaloneKindSig GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XStandaloneKindSig GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XStandaloneKindSig GhcTc 
Instance details

Defined in GHC.Hs.Decls

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 XStockStrategy GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XStockStrategy GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XStockStrategy GhcTc 
Instance details

Defined in GHC.Hs.Decls

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 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 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 XTyFamInstD GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XTyFamInstD GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XTyFamInstD GhcTc 
Instance details

Defined in GHC.Hs.Decls

type XTypBr GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XTypBr GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XTypBr GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XTypedBracket GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XTypedBracket GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XTypedBracket GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XTypedSplice GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XTypedSplice GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XTypedSplice GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XUnambiguous GhcPs 
Instance details

Defined in GHC.Hs.Type

type XUnambiguous GhcRn 
Instance details

Defined in GHC.Hs.Type

type XUnambiguous GhcTc 
Instance details

Defined in GHC.Hs.Type

type XUnboundVar GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XUnboundVar GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XUnboundVar GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XUntypedBracket GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XUntypedBracket GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XUntypedBracket GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XUntypedSplice GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XUntypedSplice GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XUntypedSplice GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XUntypedSpliceExpr GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XUntypedSpliceExpr GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XUntypedSpliceExpr GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XVarBr GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XVarBr GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XVarBr GhcTc 
Instance details

Defined in GHC.Hs.Expr

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 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 XWarnings GhcPs 
Instance details

Defined in GHC.Hs.Decls

type XWarnings GhcRn 
Instance details

Defined in GHC.Hs.Decls

type XWarnings GhcTc 
Instance details

Defined in GHC.Hs.Decls

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 XXCmd GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XXCmd GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XXCmd GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XXExpr GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XXExpr GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XXExpr GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XXPat GhcPs 
Instance details

Defined in GHC.Hs.Pat

type XXPat GhcRn 
Instance details

Defined in GHC.Hs.Pat

type XXPat GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XXQuote GhcPs 
Instance details

Defined in GHC.Hs.Expr

type XXQuote GhcRn 
Instance details

Defined in GHC.Hs.Expr

type XXQuote GhcTc 
Instance details

Defined in GHC.Hs.Expr

type XXSig GhcPs 
Instance details

Defined in GHC.Hs.Binds

type XXSig GhcRn 
Instance details

Defined in GHC.Hs.Binds

type XXSig GhcTc 
Instance details

Defined in GHC.Hs.Binds

type ConLikeP GhcPs 
Instance details

Defined in GHC.Hs.Pat

type ConLikeP GhcRn 
Instance details

Defined in GHC.Hs.Pat

type ConLikeP GhcTc 
Instance details

Defined in GHC.Hs.Pat

type XHsOuterExplicit GhcPs _1 
Instance details

Defined in GHC.Hs.Type

type XHsOuterExplicit GhcRn _1 
Instance details

Defined in GHC.Hs.Type

type XHsOuterExplicit GhcTc flag 
Instance details

Defined in GHC.Hs.Type

type XHsOuterExplicit GhcTc flag = [VarBndr TyVar flag]
type XHsWC GhcPs b 
Instance details

Defined in GHC.Hs.Type

type XHsWC GhcRn b 
Instance details

Defined in GHC.Hs.Type

type XHsWC GhcRn b = [Name]
type XHsWC GhcTc b 
Instance details

Defined in GHC.Hs.Type

type XHsWC GhcTc b = [Name]
type XMG GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XMG GhcPs b = Origin
type XMG GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XMG GhcRn b = Origin
type XMG GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XXHsBindsLR GhcPs pR 
Instance details

Defined in GHC.Hs.Binds

type XXHsBindsLR GhcRn pR 
Instance details

Defined in GHC.Hs.Binds

type XXHsBindsLR GhcTc pR 
Instance details

Defined in GHC.Hs.Binds

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 Body (PatBuilder GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type Body (HsCmd GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type Body (HsExpr GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type FunArg (PatBuilder GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type FunArg (HsCmd GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type FunArg (HsExpr GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type InfixOp (PatBuilder GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type InfixOp (HsCmd GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type InfixOp (HsExpr GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type SyntaxExpr (GhcPass p) 
Instance details

Defined in GHC.Hs.Expr

type Anno (LocatedA (IE (GhcPass p))) 
Instance details

Defined in GHC.Hs.ImpExp

type Anno (FixitySig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

type Anno (IPBind (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

type Anno (Sig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

type Anno (AnnDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (ClsInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (ConDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DataFamInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DefaultDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DerivClauseTys (GhcPass _1)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DerivDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DerivStrategy (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DocDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (FamilyDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (FamilyResultSig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (ForeignDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (FunDep (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (HsDecl (GhcPass _1)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (HsDerivingClause (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (InjectivityAnn (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (InstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (RoleAnnotDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (RuleBndr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (RuleDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (RuleDecls (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (SpliceDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (StandaloneKindSig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (TyClDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (TyFamInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (WarnDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (WarnDecls (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type Anno (DotFieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno (FieldLabelStrings (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno (HsCmd (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno (HsCmdTop (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno (HsExpr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno (HsUntypedSplice (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno (IE (GhcPass p)) 
Instance details

Defined in GHC.Hs.ImpExp

type Anno (IE (GhcPass p)) = SrcSpanAnnA
type Anno (IEWrappedName (GhcPass _1)) 
Instance details

Defined in GHC.Hs.ImpExp

type Anno (ImportDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.ImpExp

type Anno (HsOverLit (GhcPass p)) 
Instance details

Defined in GHC.Hs.Pat

type Anno (Pat (GhcPass p)) 
Instance details

Defined in GHC.Hs.Pat

type Anno (AmbiguousFieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (BangType (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (ConDeclField (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (FieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsKind (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsSigType (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsType (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (Match GhcPs (LocatedA (PatBuilder GhcPs)))] 
Instance details

Defined in GHC.Parser.PostProcess

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsExpr (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs)))] 
Instance details

Defined in GHC.Parser.Types

type Anno [LocatedA (IE (GhcPass p))] 
Instance details

Defined in GHC.Hs.ImpExp

type Anno [LocatedA (ConDeclField (GhcPass _1))] 
Instance details

Defined in GHC.Hs.Decls

type Anno [LocatedA (HsType (GhcPass p))] 
Instance details

Defined in GHC.Hs.Type

type IdP (GhcPass p) 
Instance details

Defined in GHC.Hs.Extension

type IdP (GhcPass p) = IdGhcP p
type NoGhcTc (GhcPass pass)

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. See Note [NoGhcTc]

Instance details

Defined in GHC.Hs.Extension

type NoGhcTc (GhcPass pass) = GhcPass (NoGhcTcPass pass)
type XAnnD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XApp (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XApp (GhcPass _1) = EpAnnCO
type XAppKindTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XAppTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XApplicativeArgMany (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XBangTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XCDerivDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCDotFieldOcc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCExport (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCFamilyDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCFunDep (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCHsDataDefn (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCHsDerivingClause (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCHsGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCImport (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCInjectivityAnn (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCKindSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCRuleBndr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCTyClGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCTyFamInstDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCharTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XClassOpSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XClsInstD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCmdApp (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCmdApp (GhcPass _1) = EpAnnCO
type XCmdLam (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCmdLamCase (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCmdPar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCmdPar (GhcPass _1) = EpAnnCO
type XCmdWrap (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XCompleteMatchSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XConDeclField (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XConDeclGADT (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XConDeclH98 (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XDataFamInstD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XDctMulti (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XDctSingle (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XDefD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XDerivD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XDocD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XDocTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XFamDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XFixSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XFixitySig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XForAllTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XForD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XFunTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XFunTy (GhcPass _1) = EpAnnCO
type XHsAnnotation (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XHsChar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsCharPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsDoublePrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsFloatPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsForAllInvis (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XHsForAllVis (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XHsInt (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsInt64Prim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsIntPrim (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 XHsSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XHsString (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsStringPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsWord64Prim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XHsWordPrim (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XIEDoc (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEDocNamed (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEName (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEPattern (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 'Parsed) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEThingWith (GhcPass 'Renamed) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEThingWith (GhcPass 'Typechecked) 
Instance details

Defined in GHC.Hs.ImpExp

type XIEType (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XIParamTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XInlineSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XInstD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XKindSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XKindSigD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XKindedTyVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XLam (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XLam (GhcPass _1) = NoExtField
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 XListTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XLitE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XLitE (GhcPass _1) = EpAnnCO
type XLitPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type XMinimalSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XNoSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XNumTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XOpTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XOpTy (GhcPass _1) = EpAnn [AddEpAnn]
type XOverLitE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XPar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XPar (GhcPass _1) = EpAnnCO
type XParPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type XParPat (GhcPass _1) = EpAnnCO
type XParTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XPatSynSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XPragE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XPresent (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XProc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XProc (GhcPass _1) = EpAnn [AddEpAnn]
type XQualTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XRoleAnnotD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XRuleBndrSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XRuleD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XSCC (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XSCCFunSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XSigD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XSpecInstSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XSpecSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XSpliceD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XSpliceDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XStarTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XStrTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XSumTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XTupleTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XTyClD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XTyLit (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XTyVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XTyVarSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XTypeSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XUserTyVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XValD (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 XVar (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XVar (GhcPass _1) = NoExtField
type XVarPat (GhcPass _1) 
Instance details

Defined in GHC.Hs.Pat

type XWarning (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XWarningD (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XWildCardTy (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XXAmbiguousFieldOcc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XXAnnDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXApplicativeArg (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXClsInstDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXCmdTop (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXConDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXConDeclField (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XXDefaultDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXDerivClauseTys (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXDerivDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXDotFieldOcc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXFamilyDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXFamilyResultSig (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXFieldOcc (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XXFixitySig (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XXForeignDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXForeignExport (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXForeignImport (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXFunDep (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXHsDataDefn (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXHsDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXHsDerivingClause (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXHsForAllTelescope (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XXHsGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXHsIPBinds (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XXHsOuterTyVarBndrs (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XXHsPatSigType (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XXHsSigType (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XXIE (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XXIEWrappedName (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XXIPBind (GhcPass p) 
Instance details

Defined in GHC.Hs.Binds

type XXImportDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.ImpExp

type XXInjectivityAnn (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXInstDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXLHsQTyVars (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XXLit (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XXOverLit (GhcPass _1) 
Instance details

Defined in GHC.Hs.Lit

type XXPragE (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXRoleAnnotDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXRuleBndr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXRuleDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXRuleDecls (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXSpliceDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXStandaloneKindSig (GhcPass p) 
Instance details

Defined in GHC.Hs.Decls

type XXTupArg (GhcPass _1) 
Instance details

Defined in GHC.Hs.Expr

type XXTyClDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXTyClGroup (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXTyFamInstDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXTyLit (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XXTyVarBndr (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XXType (GhcPass _1) 
Instance details

Defined in GHC.Hs.Type

type XXType (GhcPass _1) = HsCoreTy
type XXWarnDecl (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XXWarnDecls (GhcPass _1) 
Instance details

Defined in GHC.Hs.Decls

type XCFamEqn (GhcPass _1) r 
Instance details

Defined in GHC.Hs.Decls

type XCFamEqn (GhcPass _1) r = EpAnn [AddEpAnn]
type XCGRHS (GhcPass _1) _2 
Instance details

Defined in GHC.Hs.Expr

type XCGRHS (GhcPass _1) _2 = EpAnn GrhsAnn
type XCGRHSs (GhcPass _1) _2 
Instance details

Defined in GHC.Hs.Expr

type XCMatch (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XCMatch (GhcPass _1) b = EpAnn [AddEpAnn]
type XFunBind (GhcPass pL) GhcPs 
Instance details

Defined in GHC.Hs.Binds

type XFunBind (GhcPass pL) GhcRn

After the renamer (but before the type-checker), the FunBind extension field contains the locally-bound free variables of this defn. See Note [Bind free vars]

Instance details

Defined in GHC.Hs.Binds

type XFunBind (GhcPass pL) GhcTc

After the type-checker, the FunBind extension field contains the ticks to put on the rhs, if any, and a 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'.

Instance details

Defined in GHC.Hs.Binds

type XPSB (GhcPass idL) GhcPs 
Instance details

Defined in GHC.Hs.Binds

type XPSB (GhcPass idL) GhcRn 
Instance details

Defined in GHC.Hs.Binds

type XPSB (GhcPass idL) GhcRn = NameSet
type XPSB (GhcPass idL) GhcTc 
Instance details

Defined in GHC.Hs.Binds

type XPSB (GhcPass idL) GhcTc = NameSet
type XRec (GhcPass p) a 
Instance details

Defined in GHC.Hs.Extension

type XRec (GhcPass p) a = GenLocated (Anno a) a
type XXFamEqn (GhcPass _1) r 
Instance details

Defined in GHC.Hs.Decls

type XXGRHS (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XXGRHSs (GhcPass _1) _2 
Instance details

Defined in GHC.Hs.Expr

type XXHsWildCardBndrs (GhcPass _1) _2 
Instance details

Defined in GHC.Hs.Type

type XXMatch (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XXMatchGroup (GhcPass _1) b 
Instance details

Defined in GHC.Hs.Expr

type XXValBindsLR (GhcPass pL) pR 
Instance details

Defined in GHC.Hs.Binds

type XApplicativeStmt (GhcPass _1) GhcPs 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) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XBindStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XBindStmt (GhcPass _1) GhcRn b 
Instance details

Defined in GHC.Hs.Expr

type XBindStmt (GhcPass _1) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XBodyStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XBodyStmt (GhcPass _1) GhcRn 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 XParStmt (GhcPass _1) GhcPs b 
Instance details

Defined in GHC.Hs.Expr

type XParStmt (GhcPass _1) GhcRn 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 XRecStmt (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) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XTransStmt (GhcPass _1) GhcPs 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) GhcTc b 
Instance details

Defined in GHC.Hs.Expr

type XEmptyLocalBinds (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 XHsValBinds (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Binds

type XParStmtBlock (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Expr

type XPatSynBind (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 XVarBind (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 XXParStmtBlock (GhcPass pL) (GhcPass pR) 
Instance details

Defined in GHC.Hs.Expr

type XXPatSynBind (GhcPass idL) (GhcPass idR) 
Instance details

Defined in GHC.Hs.Binds

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 = EpAnn [AddEpAnn]
type XXStmtLR (GhcPass _1) (GhcPass _2) b 
Instance details

Defined in GHC.Hs.Expr

type Anno (HsBindLR (GhcPass idL) (GhcPass idR)) 
Instance details

Defined in GHC.Hs.Binds

type Anno (HsBindLR (GhcPass idL) (GhcPass idR)) = SrcSpanAnnA
type Anno (FamEqn (GhcPass p) _1) 
Instance details

Defined in GHC.Hs.Decls

type Anno (FamEqn (GhcPass p) _1) = SrcSpanAnnA
type Anno (FamEqn (GhcPass p) _1) 
Instance details

Defined in GHC.Hs.Decls

type Anno (FamEqn (GhcPass p) _1) = SrcSpanAnnA
type Anno (GRHS (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (GRHS (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (GRHS GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (Match GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (HsOuterTyVarBndrs _1 (GhcPass _2)) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsTyVarBndr _flag (GhcPass _1)) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsTyVarBndr _flag (GhcPass _1)) = SrcSpanAnnA
type Anno (HsTyVarBndr _flag GhcPs) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsTyVarBndr _flag GhcRn) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsTyVarBndr _flag GhcTc) 
Instance details

Defined in GHC.Hs.Type

type Anno (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr)))) = SrcSpanAnnA
type Anno (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (StmtLR GhcRn GhcRn (LocatedA (body GhcRn))) 
Instance details

Defined in GHC.Hs.Expr

type IsSrcSpanAnn (p :: Pass) a = (Anno (IdGhcP p) ~ SrcSpanAnn' (EpAnn a), IsPass p) #

type LIEWrappedName p = XRec p (IEWrappedName p) #

Located name with possible adornment - AnnKeywordIds : AnnType, AnnPattern

data IEWrappedName p #

A name in an import or export specification which may have adornments. Used primarily for accurate pretty printing of ParsedSource, and API Annotation placement. The Annotation is the location of the adornment in the original source.

Constructors

IEName (XIEName p) (LIdP p)

no extra

IEPattern (XIEPattern p) (LIdP p)

pattern X

IEType (XIEType p) (LIdP p)

type (:+:)

XIEWrappedName !(XXIEWrappedName p) 

Instances

Instances details
type Anno (IEWrappedName (GhcPass _1)) 
Instance details

Defined in GHC.Hs.ImpExp

data IEWildcard #

Wildcard in an import or export sublist, like the .. in import Mod ( T(Mk1, Mk2, ..) ).

Constructors

NoIEWildcard

no wildcard in this list

IEWildcard Int

wildcard after the given # of items in this list The Int is in the range [0..n], where n is the length of the list.

Instances

Instances details
Data IEWildcard 
Instance details

Defined in Language.Haskell.Syntax.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 #

Eq IEWildcard 
Instance details

Defined in Language.Haskell.Syntax.ImpExp

type LIE pass #

Arguments

 = XRec pass (IE pass)

When in a list this may have

Located Import or Export

data ImportListInterpretation #

Whether the import list is exactly what to import, or whether hiding was used, and therefore everything but what was listed should be imported

Constructors

Exactly 
EverythingBut 

Instances

Instances details
Data ImportListInterpretation 
Instance details

Defined in Language.Haskell.Syntax.ImpExp

Methods

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

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

toConstr :: ImportListInterpretation -> Constr #

dataTypeOf :: ImportListInterpretation -> DataType #

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

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

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

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

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

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

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

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

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

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

Eq ImportListInterpretation 
Instance details

Defined in Language.Haskell.Syntax.ImpExp

data ImportDecl pass #

Import Declaration

A single Haskell import declaration.

Constructors

ImportDecl 

Fields

XImportDecl !(XXImportDecl pass)

AnnKeywordIds

Instances

Instances details
type Anno (ImportDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.ImpExp

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
Data ImportDeclQualifiedStyle 
Instance details

Defined in Language.Haskell.Syntax.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 #

Eq ImportDeclQualifiedStyle 
Instance details

Defined in Language.Haskell.Syntax.ImpExp

type LImportDecl pass #

Arguments

 = XRec pass (ImportDecl pass)

When in a list this may have

Located Import Declaration

data AnnEnv #

A collection of annotations

type CoreAnnTarget = AnnTarget Name #

The kind of annotation target found in the middle end of the compiler

data AnnTarget name #

An annotation target

Constructors

NamedTarget name

We are annotating something with a name: a type or identifier

ModuleTarget Module

We are annotating a particular module

Instances

Instances details
Functor AnnTarget 
Instance details

Defined in GHC.Types.Annotations

Methods

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

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

Binary name => Binary (AnnTarget name) 
Instance details

Defined in GHC.Types.Annotations

Methods

put_ :: BinHandle -> AnnTarget name -> IO () #

put :: BinHandle -> AnnTarget name -> IO (Bin (AnnTarget name)) #

get :: BinHandle -> IO (AnnTarget name) #

Outputable name => Outputable (AnnTarget name) 
Instance details

Defined in GHC.Types.Annotations

Methods

ppr :: AnnTarget name -> SDoc #

type AnnPayload #

Arguments

 = Serialized

The "payload" of an annotation allows recovery of its value at a given type, and can be persisted to an interface file

data RuleOpts #

Rule options

data GhcNameVersion #

Settings for what GHC this is.

data FileSettings #

Paths to various files and directories used by GHC, including those that provide more settings.

newtype PackageName #

Constructors

PackageName 

Instances

Instances details
Uniquable PackageName 
Instance details

Defined in GHC.Unit.Info

Outputable PackageName 
Instance details

Defined in GHC.Unit.Info

Methods

ppr :: PackageName -> SDoc #

Eq PackageName 
Instance details

Defined in GHC.Unit.Info

newtype PackageId #

Constructors

PackageId FastString 

Instances

Instances details
Uniquable PackageId 
Instance details

Defined in GHC.Unit.Info

Outputable PackageId 
Instance details

Defined in GHC.Unit.Info

Methods

ppr :: PackageId -> SDoc #

Eq PackageId 
Instance details

Defined in GHC.Unit.Info

type UnitInfo = GenUnitInfo UnitId #

Information about an installed unit (units are identified by their internal UnitId)

type UnitKeyInfo = GenUnitInfo UnitKey #

Information about an installed unit (units are identified by their database UnitKey)

type GenUnitInfo unit = GenericUnitInfo PackageId PackageName unit ModuleName (GenModule (GenUnit unit)) #

Information about an installed unit

We parameterize on the unit identifier: * UnitKey: identifier used in the database (cf UnitKeyInfo) * UnitId: identifier used to generate code (cf UnitInfo)

These two identifiers are different for wired-in packages. See Note [About units] in GHC.Unit

newtype Hsc a #

The Hsc monad: Passing an environment and diagnostic state

Constructors

Hsc (HscEnv -> Messages GhcMessage -> IO (a, Messages GhcMessage)) 

Instances

Instances details
MonadIO Hsc 
Instance details

Defined in GHC.Driver.Env.Types

Methods

liftIO :: IO a -> Hsc a #

Applicative Hsc 
Instance details

Defined in GHC.Driver.Env.Types

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 #

Functor Hsc 
Instance details

Defined in GHC.Driver.Env.Types

Methods

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

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

Monad Hsc 
Instance details

Defined in GHC.Driver.Env.Types

Methods

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

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

return :: a -> Hsc a #

HasDynFlags Hsc 
Instance details

Defined in GHC.Driver.Env.Types

HasLogger Hsc 
Instance details

Defined in GHC.Driver.Env.Types

Methods

getLogger :: Hsc Logger #

data LiftingContext #

Constructors

LC Subst LiftCoEnv 

Instances

Instances details
Outputable LiftingContext 
Instance details

Defined in GHC.Core.Coercion

Methods

ppr :: LiftingContext -> SDoc #

data FunDep pass #

Constructors

FunDep (XCFunDep pass) [LIdP pass] [LIdP pass] 
XFunDep !(XXFunDep pass) 

Instances

Instances details
type Anno (FunDep (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

data TyConFlavour #

Paints a picture of what a TyCon represents, in broad strokes. This is used towards more informative error messages.

Instances

Instances details
Outputable TyConFlavour 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: TyConFlavour -> SDoc #

Eq TyConFlavour 
Instance details

Defined in GHC.Core.TyCon

data ExpandSynResult tyco #

Constructors

NoExpansion 
ExpandsSyn [(TyVar, tyco)] Type [tyco] 

data PrimElemRep #

Instances

Instances details
Data PrimElemRep 
Instance details

Defined in GHC.Core.TyCon

Methods

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

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

toConstr :: PrimElemRep -> Constr #

dataTypeOf :: PrimElemRep -> DataType #

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

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

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

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

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

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

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

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

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

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

Enum PrimElemRep 
Instance details

Defined in GHC.Core.TyCon

Show PrimElemRep 
Instance details

Defined in GHC.Core.TyCon

Binary PrimElemRep 
Instance details

Defined in GHC.Core.TyCon

Outputable PrimElemRep 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: PrimElemRep -> SDoc #

Eq PrimElemRep 
Instance details

Defined in GHC.Core.TyCon

Ord PrimElemRep 
Instance details

Defined in GHC.Core.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 GHC.Types.RepType and Note [VoidRep] in GHC.Types.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

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

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
Data PrimRep 
Instance details

Defined in GHC.Core.TyCon

Methods

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

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

toConstr :: PrimRep -> Constr #

dataTypeOf :: PrimRep -> DataType #

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

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

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

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

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

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

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

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

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

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

Show PrimRep 
Instance details

Defined in GHC.Core.TyCon

Binary PrimRep 
Instance details

Defined in GHC.Core.TyCon

Outputable PrimRep 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: PrimRep -> SDoc #

Eq PrimRep 
Instance details

Defined in GHC.Core.TyCon

Methods

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

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

Ord PrimRep 
Instance details

Defined in GHC.Core.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 GHC.Core.TyCon

Methods

ppr :: FamTyConFlav -> SDoc #

data Injectivity #

Constructors

NotInjective 
Injective [Bool] 

Instances

Instances details
Binary Injectivity 
Instance details

Defined in GHC.Core.TyCon

Eq Injectivity 
Instance details

Defined in GHC.Core.TyCon

data AlgTyConFlav #

Describes the flavour of an algebraic type constructor. For classes and data families, this flavour includes a reference to the parent TyCon.

Constructors

VanillaAlgTyCon TyConRepName

An ordinary algebraic type constructor. This includes unlifted and representation-polymorphic datatypes and newtypes and unboxed tuples, but NOT unboxed sums; see UnboxedSumTyCon.

UnboxedSumTyCon

An unboxed sum type constructor. This is distinct from VanillaAlgTyCon because 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 GHC.Core.TyCo.Rep

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 GHC.Core.TyCon

Methods

ppr :: AlgTyConFlav -> SDoc #

data PromDataConInfo #

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 GHC.Types.RepType

Constructors

NoPromInfo

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

Levity Levity

A constructor of PromDataConInfo

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]

  • is_type_data :: Bool
     
  • data_fixed_lev :: Bool

    True if the data type constructor has a known, fixed levity when fully applied to its arguments, False otherwise.

    This can only be False with UnliftedDatatypes, e.g.

    data A :: TYPE (BoxedRep l) where { MkA :: Int -> A }

    This boolean is cached to make it cheaper to check for levity and representation-polymorphism in tcHasFixedRuntimeRep.

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_con :: DataCon

    The unique constructor for the newtype. It has no existentials

  • nt_rhs :: Type

    Cached value: the argument type of the constructor, which is just the representation type of the TyCon (remember that newtypes do not exist at runtime so need a different representation type).

    The free TyVars of this type are the tyConTyVars from the corresponding TyCon

  • nt_etad_rhs :: ([TyVar], Type)

    Same as the nt_rhs, but this time eta-reduced. Hence the list of TyVars in this field may be shorter than the declared arity of the TyCon.

  • nt_co :: CoAxiom Unbranched
     
  • nt_fixed_rep :: Bool

    True if the newtype has a known, fixed representation when fully applied to its arguments, False otherwise. This can only ever be False with UnliftedNewtypes.

    Example:

    newtype N (a :: TYPE r) = MkN a

    Invariant: nt_fixed_rep nt = tcHasFixedRuntimeRep (nt_rhs nt)

    This boolean is cached to make it cheaper to check if a variable binding is representation-polymorphic in tcHasFixedRuntimeRep.

data TyConBndrVis #

Instances

Instances details
Binary TyConBndrVis 
Instance details

Defined in GHC.Core.TyCon

Outputable TyConBndrVis 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: TyConBndrVis -> SDoc #

OutputableBndr tv => Outputable (VarBndr tv TyConBndrVis) 
Instance details

Defined in GHC.Core.TyCon

Methods

ppr :: VarBndr tv TyConBndrVis -> SDoc #

data TyCoFolder env a #

Constructors

TyCoFolder 

Fields

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 GHC.Core.TyCo.Rep

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 #

Uniquable CoercionHole 
Instance details

Defined in GHC.Core.TyCo.Rep

Outputable CoercionHole 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: CoercionHole -> SDoc #

data FunSel #

Constructors

SelMult 
SelArg 
SelRes 

Instances

Instances details
Data FunSel 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

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

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

toConstr :: FunSel -> Constr #

dataTypeOf :: FunSel -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable FunSel 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

ppr :: FunSel -> SDoc #

Eq FunSel 
Instance details

Defined in GHC.Core.TyCo.Rep

Methods

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

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

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 GHC.Tc.TyCl

type FRRType = Type #

type KindOrType = Type #

The key representation of types within the compiler

type CvSubstEnv = CoVarEnv Coercion #

A substitution of Coercions for CoVars

type TvSubstEnv = TyVarEnv Type #

A substitution of Types for TyVars and Kinds for KindVars

type IdSubstEnv = IdEnv CoreExpr #

A substitution of Exprs for non-coercion Ids

data TyCoMapper env (m :: Type -> Type) #

This describes how a "map" operation over a type/coercion should behave

Constructors

TyCoMapper 

Fields

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
Data OverLitVal 
Instance details

Defined in Language.Haskell.Syntax.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 #

Eq OverLitVal 
Instance details

Defined in Language.Haskell.Syntax.Lit

Ord OverLitVal 
Instance details

Defined in Language.Haskell.Syntax.Lit

data HsOverLit p #

Haskell Overloaded Literal

Constructors

OverLit 

Fields

XOverLit !(XXOverLit p) 

Instances

Instances details
Eq (XXOverLit p) => Eq (HsOverLit p) 
Instance details

Defined in Language.Haskell.Syntax.Lit

Methods

(==) :: HsOverLit p -> HsOverLit p -> Bool #

(/=) :: HsOverLit p -> HsOverLit p -> Bool #

Ord (XXOverLit p) => Ord (HsOverLit p) 
Instance details

Defined in Language.Haskell.Syntax.Lit

type Anno (HsOverLit (GhcPass p)) 
Instance details

Defined in GHC.Hs.Pat

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 GHC.Tc.Deriv.Generate, 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 Language.Haskell.Syntax.Lit

Methods

(==) :: HsLit x -> HsLit x -> Bool #

(/=) :: HsLit x -> HsLit x -> Bool #

data LitNumType #

Numeric literal type

Constructors

LitNumBigNat

Bignat (see Note [BigNum literals])

LitNumInt

Int# - according to target machine

LitNumInt8

Int8# - exactly 8 bits

LitNumInt16

Int16# - exactly 16 bits

LitNumInt32

Int32# - exactly 32 bits

LitNumInt64

Int64# - exactly 64 bits

LitNumWord

Word# - according to target machine

LitNumWord8

Word8# - exactly 8 bits

LitNumWord16

Word16# - exactly 16 bits

LitNumWord32

Word32# - exactly 32 bits

LitNumWord64

Word64# - exactly 64 bits

Instances

Instances details
Data LitNumType 
Instance details

Defined in GHC.Types.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 #

Enum LitNumType 
Instance details

Defined in GHC.Types.Literal

Binary LitNumType 
Instance details

Defined in GHC.Types.Literal

Eq LitNumType 
Instance details

Defined in GHC.Types.Literal

Ord LitNumType 
Instance details

Defined in GHC.Types.Literal

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 that are never used.
  • A character
  • A string
  • The NULL pointer

Constructors

LitChar Char

Char# - at least 31 bits. Create with mkLitChar

LitNumber !LitNumType !Integer

Any numeric literal that can be internally represented with an Integer.

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 TypeOrConstraint RuntimeRepType

A nonsense value; 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
Data Literal 
Instance details

Defined in GHC.Types.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 #

Binary Literal 
Instance details

Defined in GHC.Types.Literal

Outputable Literal 
Instance details

Defined in GHC.Types.Literal

Methods

ppr :: Literal -> SDoc #

Eq Literal 
Instance details

Defined in GHC.Types.Literal

Methods

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

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

Ord Literal

Needed for the Ord instance of AltCon, which in turn is needed in CoreMap.

Instance details

Defined in GHC.Types.Literal

data NormaliseStepResult ev #

The result of stepping in a normalisation function. See topNormaliseTypeX.

Constructors

NS_Done

Nothing more to do

NS_Abort

Utter failure. The outer function should fail too.

NS_Step RecTcChecker Type ev

We stepped, yielding new bits; ^ ev is evidence; Usually a co :: old type ~ new type

Instances

Instances details
Functor NormaliseStepResult 
Instance details

Defined in GHC.Core.Coercion

Outputable ev => Outputable (NormaliseStepResult ev) 
Instance details

Defined in GHC.Core.Coercion

Methods

ppr :: NormaliseStepResult ev -> SDoc #

type NormaliseStepper ev = RecTcChecker -> TyCon -> [Type] -> NormaliseStepResult ev #

A function to check if we can reduce a type by one step. Used with topNormaliseTypeX.

data GhcHint #

A type for hints emitted by GHC. A hint suggests a possible way to deal with a particular warning or error.

Constructors

(Outputable a, Typeable a) => UnknownHint a

An "unknown" hint. This type constructor allows arbitrary -- hints to be embedded. The typical use case would be GHC plugins -- willing to emit hints alongside their custom diagnostics.

SuggestExtension !LanguageExtensionHint

Suggests adding a particular language extension. GHC will do its best trying to guess when the user is using the syntax of a particular language extension without having the relevant extension enabled.

Example: If the user uses the keyword "mdo" (and we are in a monadic block), but the relevant extension is not enabled, GHC will emit a 'SuggestExtension RecursiveDo'.

Test case(s): parsershould_failT12429, parsershould_failT8501c, parsershould_failT18251e, ... (and many more)

SuggestCorrectPragmaName ![String]

Suggests possible corrections of a misspelled pragma. Its argument represents all applicable suggestions.

Example: {-# LNGUAGE BangPatterns #-}

Test case(s): parsershould_compileT21589

SuggestMissingDo

Suggests that a monadic code block is probably missing a "do" keyword.

Example: main = putStrLn "hello" putStrLn "world"

Test case(s): parsershould_failT8501a, parsershould_failreadFail007, parsershould_failInfixAppPatErr, parsershould_failT984

SuggestLetInDo

Suggests that a "let" expression is needed in a "do" block.

Test cases: None (that explicitly test this particular hint is emitted).

SuggestAddSignatureCabalFile !ModuleName

Suggests to add an ".hsig" signature file to the Cabal manifest.

Triggered by: DriverUnexpectedSignature, if Cabal is being used.

Example: See comment of DriverUnexpectedSignature.

Test case(s): driver/T12955

SuggestSignatureInstantiations !ModuleName [InstantiationSuggestion]

Suggests to explicitly list the instantiations for the signatures in the GHC invocation command.

Triggered by: DriverUnexpectedSignature, if Cabal is not being used.

Example: See comment of DriverUnexpectedSignature.

Test case(s): driver/T12955

SuggestUseSpaces

Suggests to use spaces instead of tabs.

Triggered by: PsWarnTab.

Examples: None Test Case(s): None

SuggestUseWhitespaceAfter !OperatorWhitespaceSymbol

Suggests adding a whitespace after the given symbol.

Examples: None Test Case(s): parsershould_compileT18834a.hs

SuggestUseWhitespaceAround !String !OperatorWhitespaceOccurrence

Suggests adding a whitespace around the given operator symbol, as it might be repurposed as special syntax by a future language extension. The second parameter is how such operator occurred, if in a prefix, suffix or tight infix position.

Triggered by: PsWarnOperatorWhitespace.

Example: h a b = a+b -- not OK, no spaces around +.

Test Case(s): parsershould_compileT18834b.hs

SuggestParentheses

Suggests wrapping an expression in parentheses

Examples: None Test Case(s): None

SuggestIncreaseMaxPmCheckModels

Suggests to increase the -fmax-pmcheck-models limit for the pattern match checker.

Triggered by: DsMaxPmCheckModelsReached

Test case(s): pmcheckshould_compileTooManyDeltas pmcheckshould_compileTooManyDeltas pmcheckshould_compileT11822

SuggestAddTypeSignatures AvailableBindings

Suggests adding a type signature, typically to resolve ambiguity or help GHC inferring types.

SuggestBindToWildcard !(LHsExpr GhcTc)

Suggests to explicitly discard the result of a monadic action by binding the result to the '_' wilcard.

Example: main = do _ <- getCurrentTime

SuggestAddInlineOrNoInlinePragma !Var !Activation 
SuggestAddPhaseToCompetingRule !RuleName 
SuggestAddToHSigExportList !Name !(Maybe Module)

Suggests adding an identifier to the export list of a signature.

SuggestIncreaseSimplifierIterations

Suggests increasing the limit for the number of iterations in the simplifier.

SuggestUseTypeFromDataKind (Maybe RdrName)

Suggests to explicitly import Type from the Kind module, because using "*" to mean Type relies on the StarIsType extension, which will become deprecated in the future.

Triggered by: PsWarnStarIsType Example: None Test case(s): wcompat-warnings/WCompatWarningsOn.hs

SuggestQualifiedAfterModuleName

Suggests placing the qualified keyword after the module name.

Triggered by: PsWarnImportPreQualified Example: None Test case(s): module/mod184.hs

SuggestThQuotationSyntax

Suggests using TemplateHaskell quotation syntax.

Triggered by: PsErrEmptyDoubleQuotes only if TemplateHaskell is enabled. Example: None Test case(s): parsershould_failT13450TH.hs

SuggestRoles [Role]

Suggests alternative roles in case we found an illegal one.

Triggered by: PsErrIllegalRoleName Example: None Test case(s): rolesshould_failRoles7.hs

SuggestQualifyStarOperator

Suggests qualifying the * operator in modules where StarIsType is enabled.

Triggered by: PsWarnStarBinder Test case(s): warningsshould_compileStarBinder.hs

SuggestTypeSignatureForm

Suggests that a type signature should have form variable :: type in order to be accepted by GHC.

Triggered by: PsErrInvalidTypeSignature Test case(s): parsershould_failT3811

SuggestFixOrphanInstance

Suggests to move an orphan instance or to newtype-wrap it.

Triggered by: TcRnOrphanInstance Test cases(s): warningsshould_compileT9178 typecheckshould_compileT4912

SuggestAddStandaloneDerivation

Suggests to use a standalone deriving declaration when GHC can't derive a typeclass instance in a trivial way.

Triggered by: DerivBadErrConstructor Test cases(s): typecheckshould_failtcfail086

SuggestFillInWildcardConstraint

Suggests the user to fill in the wildcard constraint to disambiguate which constraint that is.

Example: deriving instance _ => Eq (Foo f a)

Triggered by: DerivBadErrConstructor Test cases(s): partial-sigsshould_failT13324_fail2

SuggestRenameForall

Suggests to use an identifier other than forall Triggered by: TcRnForallIdentifier

SuggestAppropriateTHTick NameSpace

Suggests to use the appropriate Template Haskell tick: a single tick for a term-level NameSpace, or a double tick for a type-level NameSpace.

Triggered by: TcRnIncorrectNameSpace.

SuggestDumpSlices

Suggests enabling -ddump-splices to help debug an issue when a Name is not in scope or is used in multiple different namespaces (e.g. both as a data constructor and a type constructor).

Concomitant with NoExactName or SameName errors, see e.g. "GHC.Rename.Env.lookupExactOcc_either". Test cases: T5971, T7241, T13937.

SuggestAddTick UntickedPromotedThing

Suggests adding a tick to refer to something which has been promoted to the type level, e.g. a data constructor.

Test cases: T9778, T19984.

SuggestMoveToDeclarationSite

Something is split off from its corresponding declaration. For example, a datatype is given a role declaration in a different module.

Test cases: T495, T8485, T2713, T5533.

Fields

  • SDoc

    fixity declaration, role annotation, type signature, ...

  • RdrName

    the RdrName for the declaration site

SuggestSimilarNames RdrName (NonEmpty SimilarName)

Suggest a similar name that the user might have meant, e.g. suggest traverse when the user has written travrese.

Test case: mod73.

RemindFieldSelectorSuppressed

Remind the user that the field selector has been suppressed because of -XNoFieldSelectors.

Test cases: NFSSuppressed, records-nofieldselectors.

ImportSuggestion ImportSuggestion

Suggest importing from a module, removing a hiding clause, or explain to the user that we couldn't find a module with the given ModuleName.

Test cases: mod28, mod36, mod87, mod114, ...

SuggestImportingDataCon

Suggest importing a data constructor to bring it into scope Triggered by: TcRnTypeCannotBeMarshaled

Test cases: ccfail004

SuggestPlacePragmaInHeader 
SuggestPatternMatchingSyntax

Suggest using pattern matching syntax for a non-bidirectional pattern synonym

Test cases: patsynshould_failrecord-exquant typecheckshould_failT3176

SuggestSpecialiseVisibilityHints Name

Suggest tips for making a definition visible for the purpose of writing a SPECIALISE pragma for it in a different module.

Test cases: none

LoopySuperclassSolveHint PredType ClsInstOrQC 

data LanguageExtensionHint #

Constructors

SuggestSingleExtension !SDoc !Extension

Suggest to enable the input extension. This is the hint that GHC emits if this is not a "known" fix, i.e. this is GHC giving its best guess on what extension might be necessary to make a certain program compile. For example, GHC might suggests to enable BlockArguments when the user simply formatted incorrectly the input program, so GHC here is trying to be as helpful as possible. If the input SDoc is not empty, it will contain some extra information about the why the extension is required, but it's totally irrelevant/redundant for IDEs and other tools.

SuggestAnyExtension !SDoc [Extension]

Suggest to enable the input extensions. The list is to be intended as disjunctive i.e. the user is suggested to enable any of the extensions listed. If the input SDoc is not empty, it will contain some extra information about the why the extensions are required, but it's totally irrelevant/redundant for IDEs and other tools.

SuggestExtensions !SDoc [Extension]

Suggest to enable the input extensions. The list is to be intended as conjunctive i.e. the user is suggested to enable all the extensions listed. If the input SDoc is not empty, it will contain some extra information about the why the extensions are required, but it's totally irrelevant/redundant for IDEs and other tools.

SuggestExtensionInOrderTo !SDoc !Extension

Suggest to enable the input extension in order to fix a certain problem. This is the suggestion that GHC emits when is more-or-less clear "what's going on". For example, if both DeriveAnyClass and GeneralizedNewtypeDeriving are turned on, the right thing to do is to enabled DerivingStrategies, so in contrast to SuggestSingleExtension GHC will be a bit more "imperative" (i.e. "Use X Y Z in order to ... "). If the input SDoc is not empty, it will contain some extra information about the why the extensions are required, but it's totally irrelevant/redundant for IDEs and other tools.

data AvailableBindings #

The bindings we have available in scope when suggesting an explicit type signature.

Constructors

NamedBindings (NonEmpty Name) 
UnnamedBinding

An unknown binding (i.e. too complicated to turn into a Name)

data DiagnosticCode #

A diagnostic code is a namespaced numeric identifier unique to the given diagnostic (error or warning).

All diagnostic codes defined within GHC are given the GHC namespace.

See Note [Diagnostic codes] in GHC.Types.Error.Codes.

Constructors

DiagnosticCode 

Fields

Instances

Instances details
Outputable DiagnosticCode 
Instance details

Defined in GHC.Types.Error

Methods

ppr :: DiagnosticCode -> SDoc #

data Severity #

Used to describe warnings and errors o The message has a file/line/column heading, plus "warning:" or "error:", added by mkLocMessage o With SevIgnore the message is suppressed o Output is intended for end users

Constructors

SevIgnore

Ignore this message, for example in case of suppression of warnings users don't want to see. See Note [Suppressing Messages]

SevWarning 
SevError 

Instances

Instances details
Show Severity 
Instance details

Defined in GHC.Types.Error

ToJson Severity 
Instance details

Defined in GHC.Types.Error

Methods

json :: Severity -> JsonDoc #

Outputable Severity 
Instance details

Defined in GHC.Types.Error

Methods

ppr :: Severity -> SDoc #

Eq Severity 
Instance details

Defined in GHC.Types.Error

data MessageClass #

The class for a diagnostic message. The main purpose is to classify a message within GHC, to distinguish it from a debug/dump message vs a proper diagnostic, for which we include a DiagnosticReason.

Constructors

MCOutput 
MCFatal 
MCInteractive 
MCDump

Log message intended for compiler developers No file/line/column stuff

MCInfo

Log messages intended for end users. No file/line/column stuff.

MCDiagnostic Severity DiagnosticReason (Maybe DiagnosticCode)

Diagnostics from the compiler. This constructor is very powerful as it allows the construction of a MessageClass with a completely arbitrary permutation of Severity and DiagnosticReason. As such, users are encouraged to use the mkMCDiagnostic smart constructor instead. Use this constructor directly only if you need to construct and manipulate diagnostic messages directly, for example inside Error. In all the other circumstances, especially when emitting compiler diagnostics, use the smart constructor.

The Maybe DiagnosticCode field carries a code (if available) for this diagnostic. If you are creating a message not tied to any error-message type, then use Nothing. In the long run, this really should always have a DiagnosticCode. See Note [Diagnostic codes].

Instances

Instances details
ToJson MessageClass 
Instance details

Defined in GHC.Types.Error

Methods

json :: MessageClass -> JsonDoc #

data MsgEnvelope e #

An envelope for GHC's facts about a running program, parameterised over the domain-specific (i.e. parsing, typecheck-renaming, etc) diagnostics.

To say things differently, GHC emits diagnostics about the running program, each of which is wrapped into a MsgEnvelope that carries specific information like where the error happened, etc. Finally, multiple MsgEnvelopes are aggregated into Messages that are returned to the user.

Constructors

MsgEnvelope 

Fields

Instances

Instances details
Foldable MsgEnvelope 
Instance details

Defined in GHC.Types.Error

Methods

fold :: Monoid m => MsgEnvelope m -> m #

foldMap :: Monoid m => (a -> m) -> MsgEnvelope a -> m #

foldMap' :: Monoid m => (a -> m) -> MsgEnvelope a -> m #

foldr :: (a -> b -> b) -> b -> MsgEnvelope a -> b #

foldr' :: (a -> b -> b) -> b -> MsgEnvelope a -> b #

foldl :: (b -> a -> b) -> b -> MsgEnvelope a -> b #

foldl' :: (b -> a -> b) -> b -> MsgEnvelope a -> b #

foldr1 :: (a -> a -> a) -> MsgEnvelope a -> a #

foldl1 :: (a -> a -> a) -> MsgEnvelope a -> a #

toList :: MsgEnvelope a -> [a] #

null :: MsgEnvelope a -> Bool #

length :: MsgEnvelope a -> Int #

elem :: Eq a => a -> MsgEnvelope a -> Bool #

maximum :: Ord a => MsgEnvelope a -> a #

minimum :: Ord a => MsgEnvelope a -> a #

sum :: Num a => MsgEnvelope a -> a #

product :: Num a => MsgEnvelope a -> a #

Traversable MsgEnvelope 
Instance details

Defined in GHC.Types.Error

Methods

traverse :: Applicative f => (a -> f b) -> MsgEnvelope a -> f (MsgEnvelope b) #

sequenceA :: Applicative f => MsgEnvelope (f a) -> f (MsgEnvelope a) #

mapM :: Monad m => (a -> m b) -> MsgEnvelope a -> m (MsgEnvelope b) #

sequence :: Monad m => MsgEnvelope (m a) -> m (MsgEnvelope a) #

Functor MsgEnvelope 
Instance details

Defined in GHC.Types.Error

Methods

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

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

Show (MsgEnvelope DiagnosticMessage) 
Instance details

Defined in GHC.Types.Error

data DiagnosticReason #

The reason why a Diagnostic was emitted in the first place. Diagnostic messages are born within GHC with a very precise reason, which can be completely statically-computed (i.e. this is an error or a warning no matter what), or influenced by the specific state of the DynFlags at the moment of the creation of a new Diagnostic. For example, a parsing error is always going to be an error, whereas a 'WarningWithoutFlag Opt_WarnUnusedImports' might turn into an error due to '-Werror' or '-Werror=warn-unused-imports'. Interpreting a DiagnosticReason together with its associated Severity gives us the full picture.

Constructors

WarningWithoutFlag

Born as a warning.

WarningWithFlag !WarningFlag

Warning was enabled with the flag.

ErrorWithoutFlag

Born as an error.

Instances

Instances details
Show DiagnosticReason 
Instance details

Defined in GHC.Types.Error

Outputable DiagnosticReason 
Instance details

Defined in GHC.Types.Error

Methods

ppr :: DiagnosticReason -> SDoc #

Eq DiagnosticReason 
Instance details

Defined in GHC.Types.Error

data DiagnosticMessage #

A generic Diagnostic message, without any further classification or provenance: By looking at a DiagnosticMessage we don't know neither where it was generated nor how to intepret its payload (as it's just a structured document). All we can do is to print it out and look at its DiagnosticReason.

data DiagnosticHint #

A generic Hint message, to be used with DiagnosticMessage.

Constructors

DiagnosticHint !SDoc 

Instances

Instances details
Outputable DiagnosticHint 
Instance details

Defined in GHC.Types.Error

Methods

ppr :: DiagnosticHint -> SDoc #

class Diagnostic a where #

A class identifying a diagnostic. Dictionary.com defines a diagnostic as:

"a message output by a computer diagnosing an error in a computer program, computer system, or component device".

A Diagnostic carries the actual description of the message (which, in GHC's case, it can be an error or a warning) and the reason why such message was generated in the first place.

Associated Types

type DiagnosticOpts a #

Type of configuration options for the diagnostic.

Methods

defaultDiagnosticOpts :: DiagnosticOpts a #

diagnosticMessage :: DiagnosticOpts a -> a -> DecoratedSDoc #

Extract the error message text from a Diagnostic.

diagnosticReason :: a -> DiagnosticReason #

Extract the reason for this diagnostic. For warnings, a DiagnosticReason includes the warning flag.

diagnosticHints :: a -> [GhcHint] #

Extract any hints a user might use to repair their code to avoid this diagnostic.

diagnosticCode :: a -> Maybe DiagnosticCode #

Get the DiagnosticCode associated with this Diagnostic. This can return Nothing for at least two reasons:

  1. The message might be from a plugin that does not supply codes.
  2. The message might not yet have been assigned a code. See the Diagnostic instance for DiagnosticMessage.

Ideally, case (2) would not happen, but because some errors in GHC still use the old system of just writing the error message in-place (instead of using a dedicated error type and constructor), we do not have error codes for all errors. #18516 tracks our progress toward this goal.

data DecoratedSDoc #

A DecoratedSDoc is isomorphic to a '[SDoc]' but it carries the invariant that the input '[SDoc]' needs to be rendered decorated into its final form, where the typical case would be adding bullets between each elements of the list. The type of decoration depends on the formatting function used, but in practice GHC uses the formatBulleted.

data Messages e #

A collection of messages emitted by GHC during error reporting. A diagnostic message is typically a warning or an error. See Note [Messages].

INVARIANT: All the messages in this collection must be relevant, i.e. their Severity should not be SevIgnore. The smart constructor mkMessages will filter out any message which Severity is SevIgnore.

Instances

Instances details
Foldable Messages 
Instance details

Defined in GHC.Types.Error

Methods

fold :: Monoid m => Messages m -> m #

foldMap :: Monoid m => (a -> m) -> Messages a -> m #

foldMap' :: Monoid m => (a -> m) -> Messages a -> m #

foldr :: (a -> b -> b) -> b -> Messages a -> b #

foldr' :: (a -> b -> b) -> b -> Messages a -> b #

foldl :: (b -> a -> b) -> b -> Messages a -> b #

foldl' :: (b -> a -> b) -> b -> Messages a -> b #

foldr1 :: (a -> a -> a) -> Messages a -> a #

foldl1 :: (a -> a -> a) -> Messages a -> a #

toList :: Messages a -> [a] #

null :: Messages a -> Bool #

length :: Messages a -> Int #

elem :: Eq a => a -> Messages a -> Bool #

maximum :: Ord a => Messages a -> a #

minimum :: Ord a => Messages a -> a #

sum :: Num a => Messages a -> a #

product :: Num a => Messages a -> a #

Traversable Messages 
Instance details

Defined in GHC.Types.Error

Methods

traverse :: Applicative f => (a -> f b) -> Messages a -> f (Messages b) #

sequenceA :: Applicative f => Messages (f a) -> f (Messages a) #

mapM :: Monad m => (a -> m b) -> Messages a -> m (Messages b) #

sequence :: Monad m => Messages (m a) -> m (Messages a) #

Functor Messages 
Instance details

Defined in GHC.Types.Error

Methods

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

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

Monoid (Messages e) 
Instance details

Defined in GHC.Types.Error

Methods

mempty :: Messages e #

mappend :: Messages e -> Messages e -> Messages e #

mconcat :: [Messages e] -> Messages e #

Semigroup (Messages e) 
Instance details

Defined in GHC.Types.Error

Methods

(<>) :: Messages e -> Messages e -> Messages e #

sconcat :: NonEmpty (Messages e) -> Messages e #

stimes :: Integral b => b -> Messages e -> Messages e #

Diagnostic e => Outputable (Messages e) 
Instance details

Defined in GHC.Types.Error

Methods

ppr :: Messages e -> SDoc #

type Validity = Validity' SDoc #

Monomorphic version of Validity' specialised for SDocs.

data Validity' a #

Constructors

IsValid

Everything is fine

NotValid a

A problem, and some indication of why

Instances

Instances details
Functor Validity' 
Instance details

Defined in GHC.Utils.Error

Methods

fmap :: (a -> b) -> Validity' a -> Validity' b #

(<$) :: a -> Validity' b -> Validity' a #

data DiagOpts #

Constructors

DiagOpts 

Fields

data StrictnessMark #

Instances

Instances details
Binary StrictnessMark 
Instance details

Defined in GHC.Core.DataCon

Outputable StrictnessMark 
Instance details

Defined in GHC.Core.DataCon

Methods

ppr :: StrictnessMark -> SDoc #

Eq StrictnessMark 
Instance details

Defined in GHC.Core.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 Bool

Strict but not unpacked field True = we could have unpacked, but opted not to because of -O0. See Note [Detecting useless UNPACK pragmas]

HsUnpack (Maybe Coercion)

Strict and unpacked field co :: arg-ty ~ product-ty HsBang

Instances

Instances details
Data HsImplBang 
Instance details

Defined in GHC.Core.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 GHC.Core.DataCon

Methods

ppr :: HsImplBang -> SDoc #

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 GHC.Core.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 GHC.Core.DataCon

Methods

ppr :: HsSrcBang -> 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. See Note [Located RdrNames] in GHC.Hs.Expr.

Instances

Instances details
type Anno (AmbiguousFieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type LAmbiguousFieldOcc pass = XRec pass (AmbiguousFieldOcc pass) #

Located Ambiguous Field Occurence

data FieldOcc pass #

Field Occurrence

Represents an *occurrence* of a field. This may or may not be a binding occurrence (e.g. this type is used in ConDeclField and RecordPatSynField which bind their fields, but also in HsRecField for record construction and patterns, which do not).

We store both the RdrName the user originally wrote, and after the renamer we use the extension field to store the selector function.

Constructors

FieldOcc 

Fields

XFieldOcc !(XXFieldOcc pass) 

Instances

Instances details
(Eq (XRec pass RdrName), Eq (XCFieldOcc pass), Eq (XXFieldOcc pass)) => Eq (FieldOcc pass) 
Instance details

Defined in Language.Haskell.Syntax.Type

Methods

(==) :: FieldOcc pass -> FieldOcc pass -> Bool #

(/=) :: FieldOcc pass -> FieldOcc pass -> Bool #

type Anno (FieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type LFieldOcc pass = XRec pass (FieldOcc pass) #

Located Field Occurrence

type LHsTypeArg p = HsArg (LHsType p) (LHsKind p) #

data HsArg tm ty #

Arguments in an expression/type after splitting

Constructors

HsValArg tm 
HsTypeArg SrcSpan ty 
HsArgPar SrcSpan 

data HsConDetails tyarg arg rec #

Describes the arguments to a data constructor. This is a common representation for several constructor-related concepts, including:

  • The arguments in a Haskell98-style constructor declaration (see HsConDeclH98Details in GHC.Hs.Decls).
  • The arguments in constructor patterns in case/function definitions (see HsConPatDetails in GHC.Hs.Pat).
  • The left-hand side arguments in a pattern synonym binding (see HsPatSynDetails in GHC.Hs.Binds).

One notable exception is the arguments in a GADT constructor, which uses a separate data type entirely (see HsConDeclGADTDetails in GHC.Hs.Decls). This is because GADT constructors cannot be declared with infix syntax, unlike the concepts above (#18844).

Constructors

PrefixCon [tyarg] [arg] 
RecCon rec 
InfixCon arg arg 

Instances

Instances details
(Data tyarg, Data rec, Data arg) => Data (HsConDetails tyarg arg rec) 
Instance details

Defined in Language.Haskell.Syntax.Type

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsConDetails tyarg arg rec -> c (HsConDetails tyarg arg rec) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsConDetails tyarg arg rec) #

toConstr :: HsConDetails tyarg arg rec -> Constr #

dataTypeOf :: HsConDetails tyarg arg rec -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsConDetails tyarg arg rec)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsConDetails tyarg arg rec)) #

gmapT :: (forall b. Data b => b -> b) -> HsConDetails tyarg arg rec -> HsConDetails tyarg arg rec #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails tyarg arg rec -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails tyarg arg rec -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsConDetails tyarg arg rec -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsConDetails tyarg arg rec -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsConDetails tyarg arg rec -> m (HsConDetails tyarg arg rec) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails tyarg arg rec -> m (HsConDetails tyarg arg rec) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails tyarg arg rec -> m (HsConDetails tyarg arg rec) #

data ConDeclField pass #

Constructor Declaration Field

Constructors

ConDeclField 

Fields

XConDeclField !(XXConDeclField pass) 

Instances

Instances details
type Anno (ConDeclField (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno [LocatedA (ConDeclField (GhcPass _1))] 
Instance details

Defined in GHC.Hs.Decls

type LConDeclField pass #

Arguments

 = XRec pass (ConDeclField pass)

May have AnnKeywordId : AnnComma when in a list

Located Constructor Declaration Field

data HsTupleSort #

Haskell Tuple Sort

Instances

Instances details
Data HsTupleSort 
Instance details

Defined in Language.Haskell.Syntax.Type

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 #

data HsScaled pass a #

This is used in the syntax. In constructor declaration. It must keep the arrow representation.

Constructors

HsScaled (HsArrow pass) a 

data HsLinearArrowTokens pass #

Constructors

HsPct1 !(LHsToken "%1" pass) !(LHsUniToken "->" "\8594" pass) 
HsLolly !(LHsToken "\8888" pass) 

data HsArrow pass #

Denotes the type of arrows in the surface language

Constructors

HsUnrestrictedArrow !(LHsUniToken "->" "\8594" pass)

a -> b or a → b

HsLinearArrow !(HsLinearArrowTokens pass)

a %1 -> b or a %1 → b, or a ⊸ b

HsExplicitMult !(LHsToken "%" pass) !(LHsType pass) !(LHsUniToken "->" "\8594" pass)

a %m -> b or a %m → b (very much including `a %Many -> b`! This is how the programmer wrote it). It is stored as an HsType so as to preserve the syntax as written in the program.

data HsTyLit pass #

Haskell Type Literal

Constructors

HsNumTy (XNumTy pass) Integer 
HsStrTy (XStrTy pass) FastString 
HsCharTy (XCharTy pass) Char 
XTyLit !(XXTyLit pass) 

data HsType pass #

Haskell Type

Constructors

HsForAllTy
HsQualTy 

Fields

HsTyVar (XTyVar pass) PromotionFlag (LIdP pass)
HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass)
HsAppKindTy (XAppKindTy pass) (LHsType pass) (LHsKind pass) 
HsFunTy (XFunTy pass) (HsArrow pass) (LHsType pass) (LHsType pass)
HsListTy (XListTy pass) (LHsType pass)
HsTupleTy (XTupleTy pass) HsTupleSort [LHsType pass]
HsSumTy (XSumTy pass) [LHsType pass]
HsOpTy (XOpTy pass) PromotionFlag (LHsType pass) (LIdP pass) (LHsType pass)
HsParTy (XParTy pass) (LHsType pass)
HsIParamTy (XIParamTy pass) (XRec pass HsIPName) (LHsType pass)
(?x :: ty)
HsStarTy (XStarTy pass) Bool
HsKindSig (XKindSig pass) (LHsType pass) (LHsKind pass)
(ty :: kind)
HsSpliceTy (XSpliceTy pass) (HsUntypedSplice pass)
HsDocTy (XDocTy pass) (LHsType pass) (LHsDoc pass)
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 pass)
HsWildCardTy (XWildCardTy pass)
XHsType !(XXType pass) 

Instances

Instances details
DisambTD (HsType GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (BangType (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsKind (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsType (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type Anno [LocatedA (HsType (GhcPass p))] 
Instance details

Defined in GHC.Hs.Type

type Anno (FamEqn p (LocatedA (HsType p))) 
Instance details

Defined in GHC.Hs.Decls

data HsTyVarBndr flag pass #

Haskell Type Variable Binder The flag annotates the binder. It is Specificity in places where explicit specificity is allowed (e.g. x :: forall {a} b. ...) or () in other places.

Constructors

UserTyVar (XUserTyVar pass) flag (LIdP pass) 
KindedTyVar (XKindedTyVar pass) flag (LIdP pass) (LHsKind pass)
XTyVarBndr !(XXTyVarBndr pass) 

Instances

Instances details
type Anno (HsTyVarBndr _flag (GhcPass _1)) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsTyVarBndr _flag (GhcPass _1)) = SrcSpanAnnA
type Anno (HsTyVarBndr _flag GhcPs) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsTyVarBndr _flag GhcRn) 
Instance details

Defined in GHC.Hs.Type

type Anno (HsTyVarBndr _flag GhcTc) 
Instance details

Defined in GHC.Hs.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
Data HsIPName 
Instance details

Defined in Language.Haskell.Syntax.Type

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 #

Eq HsIPName 
Instance details

Defined in Language.Haskell.Syntax.Type

type Anno HsIPName 
Instance details

Defined in GHC.Hs.Type

data HsSigType pass #

A type signature that obeys the forall-or-nothing rule. In other words, an LHsType that uses an HsOuterSigTyVarBndrs to represent its outermost type variable quantification. See Note [Representing type signatures].

Constructors

HsSig 

Fields

XHsSigType !(XXHsSigType pass) 

Instances

Instances details
type Anno (HsSigType (GhcPass p)) 
Instance details

Defined in GHC.Hs.Type

type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass) #

Located Haskell Signature Wildcard Type

type LHsWcType pass = HsWildCardBndrs pass (LHsType pass) #

Located Haskell Wildcard Type

type LHsSigType pass = XRec pass (HsSigType pass) #

Located Haskell Signature Type

data HsPatSigType pass #

Types that can appear in pattern signatures, as well as the signatures for term-level binders in RULES. See Note [Pattern signature binders and scoping].

This is very similar to HsSigWcType, but with slightly different semantics: see Note [HsType binders]. See also Note [The wildcard story for types].

Constructors

HsPS 

Fields

XHsPatSigType !(XXHsPatSigType pass) 

data HsWildCardBndrs pass thing #

Haskell Wildcard Binders

Constructors

HsWC 

Fields

XHsWildCardBndrs !(XXHsWildCardBndrs pass thing) 

type HsOuterFamEqnTyVarBndrs = HsOuterTyVarBndrs () #

Used for type-family instance equations, e.g.,

type instance forall a. F [a] = Tree a

The notion of specificity is irrelevant in type family equations, so we use () for the HsOuterTyVarBndrs flag.

type HsOuterSigTyVarBndrs = HsOuterTyVarBndrs Specificity #

Used for signatures, e.g.,

f :: forall a {b}. blah

We use Specificity for the HsOuterTyVarBndrs flag to allow distinguishing between specified and inferred type variables.

data HsOuterTyVarBndrs flag pass #

The outermost type variables in a type that obeys the forall-or-nothing rule. See Note [forall-or-nothing rule].

Constructors

HsOuterImplicit

Implicit forall, e.g., f :: a -> b -> b

HsOuterExplicit

Explicit forall, e.g., f :: forall a b. a -> b -> b

Fields

XHsOuterTyVarBndrs !(XXHsOuterTyVarBndrs pass) 

Instances

Instances details
type Anno (HsOuterTyVarBndrs _1 (GhcPass _2)) 
Instance details

Defined in GHC.Hs.Type

data LHsQTyVars pass #

Located Haskell Quantified Type Variables

Constructors

HsQTvs 

Fields

XLHsQTyVars !(XXLHsQTyVars pass) 

type LHsTyVarBndr flag pass = XRec pass (HsTyVarBndr flag pass) #

Located Haskell Type Variable Binder

data HsForAllTelescope pass #

The type variable binders in an HsForAllTy. See also Note [Variable Specificity and Forall Visibility] in GHC.Tc.Gen.HsType.

Constructors

HsForAllVis

A visible forall (e.g., forall a -> {...}). These do not have any notion of specificity, so we use () as a placeholder value.

Fields

HsForAllInvis

An invisible forall (e.g., forall a {b} c. {...}), where each binder has a Specificity.

XHsForAllTelescope !(XXHsForAllTelescope pass) 

type LHsKind pass #

Arguments

 = XRec pass (HsKind pass)

AnnKeywordId : AnnDcolon

Located Haskell Kind

type HsKind pass = HsType pass #

Haskell Kind

type LHsType pass #

Arguments

 = XRec pass (HsType pass)

May have AnnKeywordId : AnnComma when in a list

Located Haskell Type

type HsContext pass = [LHsType pass] #

Haskell Context

type LHsContext pass #

Arguments

 = XRec pass (HsContext pass)

AnnKeywordId : AnnUnit For details on above see Note [exact print annotations] in GHC.Parser.Annotation

Located Haskell Context

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 LBangType pass = XRec pass (BangType pass) #

Located Bang Type

data HsFieldBind lhs rhs #

Haskell Field Binding

For details on above see Note [exact print annotations] in GHC.Parser.Annotation

Constructors

HsFieldBind 

Fields

Instances

Instances details
Foldable (HsFieldBind lhs) 
Instance details

Defined in Language.Haskell.Syntax.Pat

Methods

fold :: Monoid m => HsFieldBind lhs m -> m #

foldMap :: Monoid m => (a -> m) -> HsFieldBind lhs a -> m #

foldMap' :: Monoid m => (a -> m) -> HsFieldBind lhs a -> m #

foldr :: (a -> b -> b) -> b -> HsFieldBind lhs a -> b #

foldr' :: (a -> b -> b) -> b -> HsFieldBind lhs a -> b #

foldl :: (b -> a -> b) -> b -> HsFieldBind lhs a -> b #

foldl' :: (b -> a -> b) -> b -> HsFieldBind lhs a -> b #

foldr1 :: (a -> a -> a) -> HsFieldBind lhs a -> a #

foldl1 :: (a -> a -> a) -> HsFieldBind lhs a -> a #

toList :: HsFieldBind lhs a -> [a] #

null :: HsFieldBind lhs a -> Bool #

length :: HsFieldBind lhs a -> Int #

elem :: Eq a => a -> HsFieldBind lhs a -> Bool #

maximum :: Ord a => HsFieldBind lhs a -> a #

minimum :: Ord a => HsFieldBind lhs a -> a #

sum :: Num a => HsFieldBind lhs a -> a #

product :: Num a => HsFieldBind lhs a -> a #

Traversable (HsFieldBind lhs) 
Instance details

Defined in Language.Haskell.Syntax.Pat

Methods

traverse :: Applicative f => (a -> f b) -> HsFieldBind lhs a -> f (HsFieldBind lhs b) #

sequenceA :: Applicative f => HsFieldBind lhs (f a) -> f (HsFieldBind lhs a) #

mapM :: Monad m => (a -> m b) -> HsFieldBind lhs a -> m (HsFieldBind lhs b) #

sequence :: Monad m => HsFieldBind lhs (m a) -> m (HsFieldBind lhs a) #

Functor (HsFieldBind lhs) 
Instance details

Defined in Language.Haskell.Syntax.Pat

Methods

fmap :: (a -> b) -> HsFieldBind lhs a -> HsFieldBind lhs b #

(<$) :: a -> HsFieldBind lhs b -> HsFieldBind lhs a #

type Anno (HsFieldBind lhs rhs) 
Instance details

Defined in GHC.Hs.Pat

type Anno (HsFieldBind lhs rhs) = SrcSpanAnnA

type HsRecUpdField p = HsFieldBind (LAmbiguousFieldOcc p) (LHsExpr p) #

Haskell Record Update Field

type HsRecField p arg = HsFieldBind (LFieldOcc p) arg #

Haskell Record Field

type LHsRecUpdField p = XRec p (HsRecUpdField p) #

Located Haskell Record Update Field

type LHsRecField p arg = XRec p (HsRecField p arg) #

Located Haskell Record Field

type LHsFieldBind p id arg = XRec p (HsFieldBind id arg) #

Located Haskell Record Field

newtype RecFieldsDotDot #

Newtype to be able to have a specific XRec instance for the Int in rec_dotdot

Constructors

RecFieldsDotDot 

Instances

Instances details
Data RecFieldsDotDot 
Instance details

Defined in Language.Haskell.Syntax.Pat

Methods

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

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

toConstr :: RecFieldsDotDot -> Constr #

dataTypeOf :: RecFieldsDotDot -> DataType #

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

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

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

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

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

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

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

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

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

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

Eq RecFieldsDotDot 
Instance details

Defined in Language.Haskell.Syntax.Pat

Ord RecFieldsDotDot 
Instance details

Defined in Language.Haskell.Syntax.Pat

type Anno RecFieldsDotDot 
Instance details

Defined in GHC.Hs.Pat

data HsRecFields p arg #

Haskell Record Fields

HsRecFields is used only for patterns and expressions (not data type declarations)

Constructors

HsRecFields 

type HsConPatDetails p = HsConDetails (HsConPatTyArg (NoGhcTc p)) (LPat p) (HsRecFields p (LPat p)) #

Haskell Constructor Pattern Details

data HsConPatTyArg p #

Type argument in a data constructor pattern, e.g. the @a in f (Just @a x) = ....

Constructors

HsConPatTyArg !(LHsToken "@" p) (HsPatSigType p) 

type family ConLikeP x #

Instances

Instances details
type ConLikeP GhcPs 
Instance details

Defined in GHC.Hs.Pat

type ConLikeP GhcRn 
Instance details

Defined in GHC.Hs.Pat

type ConLikeP GhcTc 
Instance details

Defined in GHC.Hs.Pat

data HsPatSynDir id #

Haskell Pattern Synonym Direction

data RecordPatSynField pass #

Record Pattern Synonym Field

Constructors

RecordPatSynField 

Fields

type HsPatSynDetails pass = HsConDetails Void (LIdP pass) [RecordPatSynField pass] #

Haskell Pattern Synonym Details

data FixitySig pass #

Fixity Signature

Constructors

FixitySig (XFixitySig pass) [LIdP pass] Fixity 
XFixitySig !(XXFixitySig pass) 

Instances

Instances details
type Anno (FixitySig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

type LFixitySig pass = XRec pass (FixitySig pass) #

Located Fixity Signature

data Sig pass #

Signatures and pragmas

Constructors

TypeSig (XTypeSig pass) [LIdP 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) [LIdP pass] (LHsSigType pass)

A pattern synonym type signature

pattern Single :: () => (Show a) => a -> [a]
ClassOpSig (XClassOpSig pass) Bool [LIdP 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

FixSig (XFixSig pass) (FixitySig pass)

An ordinary fixity declaration

    infixl 8 ***
InlineSig (XInlineSig pass) (LIdP pass) InlinePragma

An inline pragma

{#- INLINE f #-}
SpecSig (XSpecSig pass) (LIdP pass) [LHsSigType pass] InlinePragma

A specialisation pragma

{-# SPECIALISE f :: Int -> Int #-}
SpecInstSig (XSpecInstSig pass) (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) (LBooleanFormula (LIdP pass))

A minimal complete definition pragma

{-# MINIMAL a | (b, c | (d | e)) #-}
SCCFunSig (XSCCFunSig pass) (LIdP pass) (Maybe (XRec pass StringLiteral))

A "set cost centre" pragma for declarations

{-# SCC funName #-}

or

{-# SCC funName "cost_centre_name" #-}
CompleteMatchSig (XCompleteMatchSig pass) (XRec pass [LIdP pass]) (Maybe (LIdP 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
type Anno (Sig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

type LSig pass = XRec pass (Sig pass) #

Located Signature

data IPBind id #

Implicit parameter bindings.

Constructors

IPBind (XCIPBind id) (XRec id HsIPName) (LHsExpr id) 
XIPBind !(XXIPBind id) 

Instances

Instances details
type Anno (IPBind (GhcPass p)) 
Instance details

Defined in GHC.Hs.Binds

type LIPBind id = XRec id (IPBind id) #

Located Implicit Parameter Binding

May have AnnKeywordId : AnnSemi when in a list

data HsIPBinds id #

Haskell Implicit Parameter Bindings

Constructors

IPBinds (XIPBinds id) [LIPBind id] 
XHsIPBinds !(XXHsIPBinds id) 

data PatSynBind idL idR #

Pattern Synonym binding

Constructors

PSB 

Fields

XPatSynBind !(XXPatSynBind idL idR) 

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

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

PatSynBind

Patterns Synonym Binding

XHsBindsLR !(XXHsBindsLR idL idR) 

Instances

Instances details
type Anno (HsBindLR (GhcPass idL) (GhcPass idR)) 
Instance details

Defined in GHC.Hs.Binds

type Anno (HsBindLR (GhcPass idL) (GhcPass idR)) = SrcSpanAnnA

type LHsBindLR idL idR = XRec idL (HsBindLR idL idR) #

Located Haskell Binding with separate Left and Right identifier types

type LHsBindsLR idL idR = Bag (LHsBindLR idL idR) #

Located Haskell Bindings with separate Left and Right identifier types

type HsBind id = HsBindLR id id #

Haskell Binding

type LHsBinds id = LHsBindsLR id id #

Located Haskell Bindings

type LHsBind id = LHsBindLR id id #

Located Haskell Binding

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.

type HsValBinds id = HsValBindsLR id id #

Haskell Value Bindings

type LHsLocalBindsLR idL idR = XRec idL (HsLocalBindsLR idL idR) #

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) 

type LHsLocalBinds id = XRec id (HsLocalBinds id) #

Located Haskell local bindings

type HsLocalBinds id = HsLocalBindsLR id id #

Haskell Local Bindings

data RoleAnnotDecl pass #

Role Annotation Declaration

Instances

Instances details
type Anno (RoleAnnotDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LRoleAnnotDecl pass = XRec pass (RoleAnnotDecl pass) #

Located Role Annotation Declaration

data AnnProvenance pass #

Annotation Provenance

type LAnnDecl pass = XRec pass (AnnDecl pass) #

Located Annotation Declaration

data WarnDecl pass #

Warning pragma Declaration

Constructors

Warning (XWarning pass) [LIdP pass] (WarningTxt pass) 
XWarnDecl !(XXWarnDecl pass) 

Instances

Instances details
type Anno (WarnDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LWarnDecl pass = XRec pass (WarnDecl pass) #

Located Warning pragma Declaration

data WarnDecls pass #

Warning pragma Declarations

Constructors

Warnings 

Fields

XWarnDecls !(XXWarnDecls pass) 

Instances

Instances details
type Anno (WarnDecls (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LWarnDecls pass = XRec pass (WarnDecls pass) #

Located Warning Declarations

data DocDecl pass #

Documentation comment Declaration

Instances

Instances details
(Data pass, Data (IdP pass)) => Data (DocDecl pass) 
Instance details

Defined in Language.Haskell.Syntax.Decls

Methods

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

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

toConstr :: DocDecl pass -> Constr #

dataTypeOf :: DocDecl pass -> DataType #

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

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

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

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

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

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

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

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

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

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

type Anno (DocDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LDocDecl pass = XRec pass (DocDecl pass) #

Located Documentation comment Declaration

data RuleBndr pass #

Rule Binder

Instances

Instances details
type Anno (RuleBndr (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LRuleBndr pass = XRec pass (RuleBndr pass) #

Located Rule Binder

data RuleDecl pass #

Rule Declaration

Constructors

HsRule 

Fields

XRuleDecl !(XXRuleDecl pass) 

Instances

Instances details
type Anno (RuleDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LRuleDecl pass = XRec pass (RuleDecl pass) #

Located Rule Declaration

data RuleDecls pass #

Rule Declarations

Constructors

HsRules 

Fields

XRuleDecls !(XXRuleDecls pass) 

Instances

Instances details
type Anno (RuleDecls (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LRuleDecls pass = XRec pass (RuleDecls pass) #

Located Rule Declarations

data ForeignExport pass #

Constructors

CExport (XCExport pass) (XRec pass CExportSpec) 
XForeignExport !(XXForeignExport pass) 

data CImportSpec #

Instances

Instances details
Data CImportSpec 
Instance details

Defined in Language.Haskell.Syntax.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 ForeignDecl pass #

Foreign Declaration

Instances

Instances details
type Anno (ForeignDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LForeignDecl pass = XRec pass (ForeignDecl pass) #

Located Foreign Declaration

data DefaultDecl pass #

Default Declaration

Instances

Instances details
type Anno (DefaultDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LDefaultDecl pass = XRec pass (DefaultDecl pass) #

Located Default Declaration

data DerivStrategy pass #

Which technique the user explicitly requested when deriving an instance.

Constructors

StockStrategy (XStockStrategy pass)

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 (XAnyClassStrategy pass)
-XDeriveAnyClass
NewtypeStrategy (XNewtypeStrategy pass)
-XGeneralizedNewtypeDeriving
ViaStrategy (XViaStrategy pass)
-XDerivingVia

Instances

Instances details
type Anno (DerivStrategy (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LDerivStrategy pass = XRec pass (DerivStrategy pass) #

A Located DerivStrategy.

data DerivDecl pass #

Stand-alone 'deriving instance' declaration

Constructors

DerivDecl 

Fields

XDerivDecl !(XXDerivDecl pass) 

Instances

Instances details
type Anno (DerivDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LDerivDecl pass = XRec pass (DerivDecl pass) #

Located stand-alone 'deriving instance' declaration

data InstDecl pass #

Instance Declaration

Instances

Instances details
type Anno (InstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LInstDecl pass = XRec pass (InstDecl pass) #

Located Instance Declaration

data ClsInstDecl pass #

Class Instance Declaration - AnnKeywordId : AnnInstance, AnnWhere, AnnOpen,AnnClose, For details on above see Note [exact print annotations] in GHC.Parser.Annotation

Instances

Instances details
type Anno (ClsInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LClsInstDecl pass = XRec pass (ClsInstDecl pass) #

Located Class Instance Declaration

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) 

Instances

Instances details
type Anno (FamEqn (GhcPass p) _1) 
Instance details

Defined in GHC.Hs.Decls

type Anno (FamEqn (GhcPass p) _1) = SrcSpanAnnA
type Anno (FamEqn (GhcPass p) _1) 
Instance details

Defined in GHC.Hs.Decls

type Anno (FamEqn (GhcPass p) _1) = SrcSpanAnnA
type Anno (FamEqn p (LocatedA (HsType p))) 
Instance details

Defined in GHC.Hs.Decls

newtype DataFamInstDecl pass #

Data Family Instance Declaration

Instances

Instances details
type Anno (DataFamInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LDataFamInstDecl pass = XRec pass (DataFamInstDecl pass) #

Located Data Family Instance Declaration

data TyFamInstDecl pass #

Type Family Instance Declaration

Instances

Instances details
type Anno (TyFamInstDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LTyFamInstDecl pass = XRec pass (TyFamInstDecl pass) #

Located Type Family Instance Declaration

type LTyFamDefltDecl pass = XRec pass (TyFamDefltDecl pass) #

Located type family default declarations.

type TyFamDefltDecl = TyFamInstDecl #

Type family default declarations. A convenient synonym for TyFamInstDecl. See Note [Type family instance declarations in HsSyn].

type TyFamInstEqn pass = FamEqn pass (LHsType pass) #

Type Family Instance Equation

type HsTyPats pass = [LHsTypeArg pass] #

Haskell Type Patterns

type LTyFamInstEqn pass #

Arguments

 = XRec pass (TyFamInstEqn pass)

May have AnnKeywordId : AnnSemi when in a list

Located Type Family Instance Equation

data HsConDeclGADTDetails pass #

The arguments in a GADT constructor. Unlike Haskell98-style constructors, GADT constructors cannot be declared with infix syntax. As a result, we do not use HsConDetails here, as InfixCon would be an unrepresentable state. (There is a notion of infix GADT constructors for the purposes of derived Show instances—see Note [Infix GADT constructors] in GHC.Tc.TyCl—but that is an orthogonal concern.)

Constructors

PrefixConGADT [HsScaled pass (LBangType pass)] 
RecConGADT (XRec pass [LConDeclField pass]) (LHsUniToken "->" "\8594" pass) 

type HsConDeclH98Details pass = HsConDetails Void (HsScaled pass (LBangType pass)) (XRec pass [LConDeclField pass]) #

The arguments in a Haskell98-style data constructor.

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
type Anno (ConDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LConDecl pass #

Arguments

 = XRec pass (ConDecl pass)

May have AnnKeywordId : AnnSemi when in a GADT constructor list

Located data Constructor Declaration

data DataDefnCons a #

Whether a data-type declaration is data or newtype, and its constructors.

Constructors

NewTypeCon a 
DataTypeCons Bool [a] 

Instances

Instances details
Foldable DataDefnCons 
Instance details

Defined in Language.Haskell.Syntax.Decls

Methods

fold :: Monoid m => DataDefnCons m -> m #

foldMap :: Monoid m => (a -> m) -> DataDefnCons a -> m #

foldMap' :: Monoid m => (a -> m) -> DataDefnCons a -> m #

foldr :: (a -> b -> b) -> b -> DataDefnCons a -> b #

foldr' :: (a -> b -> b) -> b -> DataDefnCons a -> b #

foldl :: (b -> a -> b) -> b -> DataDefnCons a -> b #

foldl' :: (b -> a -> b) -> b -> DataDefnCons a -> b #

foldr1 :: (a -> a -> a) -> DataDefnCons a -> a #

foldl1 :: (a -> a -> a) -> DataDefnCons a -> a #

toList :: DataDefnCons a -> [a] #

null :: DataDefnCons a -> Bool #

length :: DataDefnCons a -> Int #

elem :: Eq a => a -> DataDefnCons a -> Bool #

maximum :: Ord a => DataDefnCons a -> a #

minimum :: Ord a => DataDefnCons a -> a #

sum :: Num a => DataDefnCons a -> a #

product :: Num a => DataDefnCons a -> a #

Traversable DataDefnCons 
Instance details

Defined in Language.Haskell.Syntax.Decls

Methods

traverse :: Applicative f => (a -> f b) -> DataDefnCons a -> f (DataDefnCons b) #

sequenceA :: Applicative f => DataDefnCons (f a) -> f (DataDefnCons a) #

mapM :: Monad m => (a -> m b) -> DataDefnCons a -> m (DataDefnCons b) #

sequence :: Monad m => DataDefnCons (m a) -> m (DataDefnCons a) #

Functor DataDefnCons 
Instance details

Defined in Language.Haskell.Syntax.Decls

Methods

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

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

Data a => Data (DataDefnCons a) 
Instance details

Defined in Language.Haskell.Syntax.Decls

Methods

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

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

toConstr :: DataDefnCons a -> Constr #

dataTypeOf :: DataDefnCons a -> DataType #

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

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

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

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

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

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

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

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

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

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

Eq a => Eq (DataDefnCons a) 
Instance details

Defined in Language.Haskell.Syntax.Decls

data NewOrData #

When we only care whether a data-type declaration is `data` or `newtype`, but not what constructors it has

Constructors

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

Instances

Instances details
Data NewOrData 
Instance details

Defined in Language.Haskell.Syntax.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 #

Eq NewOrData 
Instance details

Defined in Language.Haskell.Syntax.Decls

data StandaloneKindSig pass #

Instances

Instances details
type Anno (StandaloneKindSig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LStandaloneKindSig pass = XRec pass (StandaloneKindSig pass) #

Located Standalone Kind Signature

data DerivClauseTys pass #

The types mentioned in a single deriving clause. This can come in two forms, DctSingle or DctMulti, depending on whether the types are surrounded by enclosing parentheses or not. These parentheses are semantically different than HsParTy. For example, deriving () means "derive zero classes" rather than "derive an instance of the 0-tuple".

DerivClauseTys use LHsSigType because deriving clauses can mention type variables that aren't bound by the datatype, e.g.

data T b = ... deriving (C [a])

should produce a derived instance for C [a] (T b).

Constructors

DctSingle (XDctSingle pass) (LHsSigType pass)

A deriving clause with a single type. Moreover, that type can only be a type constructor without any arguments.

Example: deriving Eq

DctMulti (XDctMulti pass) [LHsSigType pass]

A deriving clause with a comma-separated list of types, surrounded by enclosing parentheses.

Example: deriving (Eq, C a)

XDerivClauseTys !(XXDerivClauseTys pass) 

Instances

Instances details
type Anno (DerivClauseTys (GhcPass _1)) 
Instance details

Defined in GHC.Hs.Decls

type LDerivClauseTys pass = XRec pass (DerivClauseTys pass) #

data HsDerivingClause pass #

A single deriving clause of a data declaration.

Constructors

HsDerivingClause 

Fields

XHsDerivingClause !(XXHsDerivingClause pass) 

Instances

Instances details
type Anno (HsDerivingClause (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LHsDerivingClause pass = XRec pass (HsDerivingClause pass) #

type HsDeriving pass #

Arguments

 = [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 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) 

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 .."

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]"

Instances

Instances details
type Anno (InjectivityAnn (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LInjectivityAnn pass = XRec pass (InjectivityAnn pass) #

Located Injectivity Annotation

data FamilyDecl pass #

type Family Declaration

Instances

Instances details
type Anno (FamilyDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LFamilyDecl pass = XRec pass (FamilyDecl pass) #

Located type Family Declaration

data FamilyResultSig pass #

type Family Result Signature

Instances

Instances details
type Anno (FamilyResultSig (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LFamilyResultSig pass = XRec pass (FamilyResultSig pass) #

Located type Family Result Signature

data TyClGroup pass #

Type or Class Group

type LHsFunDep pass = XRec pass (FunDep pass) #

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
type Anno (TyClDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LTyClDecl pass = XRec pass (TyClDecl pass) #

Located Declaration of a Type or Class

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

DollarSplice

$splice

BareSplice

bare splice

Instances

Instances details
Data SpliceDecoration 
Instance details

Defined in Language.Haskell.Syntax.Decls

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 Language.Haskell.Syntax.Decls

Eq SpliceDecoration 
Instance details

Defined in Language.Haskell.Syntax.Decls

data SpliceDecl p #

Splice Declaration

Instances

Instances details
type Anno (SpliceDecl (GhcPass p)) 
Instance details

Defined in GHC.Hs.Decls

type LSpliceDecl pass = XRec pass (SpliceDecl pass) #

Located Splice Declaration

data HsGroup p #

Haskell Group

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

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 p)

Documentation comment declaration

RoleAnnotD (XRoleAnnotD p) (RoleAnnotDecl p)

Role annotation declaration

XHsDecl !(XXHsDecl p) 

Instances

Instances details
type Anno (HsDecl (GhcPass _1)) 
Instance details

Defined in GHC.Hs.Decls

type LHsDecl p #

Arguments

 = XRec p (HsDecl p)

When in a list this may have

data HsDoFlavour #

Constructors

DoExpr (Maybe ModuleName)
ModuleName.
do { ... }
MDoExpr (Maybe ModuleName)
ModuleName.
mdo { ... } ie recursive do-expression
GhciStmtCtxt

A command-line Stmt in GHCi pat <- rhs

ListComp 
MonadComp 

data HsArrowMatchContext #

Haskell arrow match context.

Constructors

ProcExpr

A proc expression

ArrowCaseAlt

A case alternative inside arrow notation

ArrowLamCaseAlt LamCaseVariant

A case or cases alternative inside arrow notation

KappaExpr

An arrow kappa abstraction

data HsStmtContext p #

Haskell Statement Context.

Constructors

HsDoStmt HsDoFlavour

Context for HsDo (do-notation and comprehensions)

PatGuard (HsMatchContext p)

Pattern guard for specified thing

ParStmtCtxt (HsStmtContext p)

A branch of a parallel stmt

TransStmtCtxt (HsStmtContext p)

A branch of a transform stmt

ArrowExpr

do-notation in an arrow-command context

data HsMatchContext p #

Haskell Match Context

Context of a pattern match. This is more subtle than it would seem. See Note [FunBind vs PatBind].

Constructors

FunRhs

A pattern matching on an argument of a function binding

Fields

LambdaExpr

Patterns of a lambda

CaseAlt

Patterns and guards in a case alternative

LamCaseAlt LamCaseVariant

Patterns and guards in case and cases

IfAlt

Guards of a multi-way if alternative

ArrowMatchCtxt HsArrowMatchContext

A pattern match inside arrow notation

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 GHC.HsToCore.Expr to tell matchWrapper what sort of runtime error message to generate]

StmtCtxt (HsStmtContext p)

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

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) 

data HsQuote p #

Haskell (Untyped) Quote = Expr + Pat + Type + Var

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 (LIdP p) 
XQuote !(XXQuote p) 

data ApplicativeArg idL #

Applicative Argument

Constructors

ApplicativeArgOne 

Fields

  • xarg_app_arg_one :: XApplicativeArgOne idL

    The fail operator, after renaming

    The fail operator is needed if this is a BindStmt where the pattern can fail. E.g.: (Just a) <- stmt The fail operator will be invoked if the pattern match fails. It is also used for guards in MonadComprehensions. The fail operator is Nothing if the pattern match can't fail

  • app_arg_pattern :: LPat idL
     
  • arg_expr :: LHsExpr idL
     
  • is_body_stmt :: Bool

    True = was a BodyStmt, False = was a BindStmt. See Note [Applicative BodyStmt]

ApplicativeArgMany 

Fields

XApplicativeArg !(XXApplicativeArg idL) 

type FailOperator id = Maybe (SyntaxExpr id) #

The fail operator

This is used for `.. <-` "bind statements" in do notation, including non-monadic "binds" in applicative.

The fail operator is 'Just expr' if it potentially fail monadically. if the pattern match cannot fail, or shouldn't fail monadically (regular incomplete pattern exception), it is Nothing.

See Note [Monad fail : Rebindable syntax, overloaded strings] for the type of expression in the Just case, and why it is so.

See Note [Failing pattern matches in Stmts] for which contexts for 'BindStmt's should use the monadic fail and which shouldn't.

data ParStmtBlock idL idR #

Parenthesised Statement Block

Constructors

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

data TransForm #

Constructors

ThenForm 
GroupForm 

Instances

Instances details
Data TransForm 
Instance details

Defined in Language.Haskell.Syntax.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 StmtLR idL idR body #

Exact print annotations when in qualifier lists or guards - AnnKeywordId : AnnVbar, AnnComma,AnnThen, AnnBy,AnnBy, AnnGroup,AnnUsing

Constructors

LastStmt (XLastStmt idL idR body) body (Maybe Bool) (SyntaxExpr idR) 
BindStmt 

Fields

  • (XBindStmt idL idR body)

    Post renaming has optional fail and bind / (>>=) operator. Post typechecking, also has multiplicity of the argument and the result type of the function passed to bind; that is, (P, S) in (>>=) :: Q -> (R % P -> S) -> T See Note [The type of bind in Stmts]

  • (LPat idL)
     
  • body
     
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 GHC.Rename.Expr

BodyStmt (XBodyStmt idL idR body) body (SyntaxExpr idR) (SyntaxExpr idR) 
LetStmt (XLetStmt idL idR body) (HsLocalBindsLR 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
type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsExpr (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr))))] = SrcSpanAnnL
type Anno [LocatedA (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs)))] 
Instance details

Defined in GHC.Parser.Types

type Anno (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (body (GhcPass pr)))) = SrcSpanAnnA
type Anno (StmtLR GhcPs GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (StmtLR GhcRn GhcRn (LocatedA (body GhcRn))) 
Instance details

Defined in GHC.Hs.Expr

type GhciStmt id = Stmt id (LHsExpr id) #

Ghci Statement

type GhciLStmt id = LStmt id (LHsExpr id) #

Ghci Located Statement

type GuardStmt id = Stmt id (LHsExpr id) #

Guard Statement

type GuardLStmt id = LStmt id (LHsExpr id) #

Guard Located Statement

type ExprStmt id = Stmt id (LHsExpr id) #

Expression Statement

type ExprLStmt id = LStmt id (LHsExpr id) #

Expression Located Statement

type CmdStmt id = Stmt id (LHsCmd id) #

Command Statement

type CmdLStmt id = LStmt id (LHsCmd id) #

Command Located Statement

type Stmt id body = StmtLR id id body #

do block Statement

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

Located Statement with separate Left and Right id's

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

Located do block Statement

data GRHS p body #

Guarded Right Hand Side.

Constructors

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

Instances

Instances details
type Anno (GRHS (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (GRHS (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (GRHS GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

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

Located Guarded Right-Hand Side

data Match p body #

Constructors

Match 

Fields

XMatch !(XXMatch p body) 

Instances

Instances details
type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (Match GhcPs (LocatedA (PatBuilder GhcPs)))] 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (Match (GhcPass p) (LocatedA (HsExpr (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (Match GhcPs (LocatedA (PatBuilder GhcPs))) 
Instance details

Defined in GHC.Parser.PostProcess

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

Located Match

May have AnnKeywordId : AnnSemi when in a list

type HsRecordBinds p = HsRecFields p (LHsExpr p) #

Haskell Record Bindings

data HsCmdTop p #

Haskell Top-level Command

Constructors

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

Instances

Instances details
type Anno (HsCmdTop (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type LHsCmdTop p = XRec p (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 HsArrAppType #

Haskell arrow application type.

Constructors

HsHigherOrderApp

First order arrow application -<

HsFirstOrderApp

Higher order arrow application -<<

Instances

Instances details
Data HsArrAppType 
Instance details

Defined in Language.Haskell.Syntax.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 #

data HsCmd id #

Haskell Command (e.g. a "statement" in an Arrow proc block)

Instances

Instances details
DisambECP (HsCmd GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

Associated Types

type Body (HsCmd GhcPs) :: Type -> Type #

type InfixOp (HsCmd GhcPs) #

type FunArg (HsCmd GhcPs) #

Methods

ecpFromCmd' :: LHsCmd GhcPs -> PV (LocatedA (HsCmd GhcPs)) #

ecpFromExp' :: LHsExpr GhcPs -> PV (LocatedA (HsCmd GhcPs)) #

mkHsProjUpdatePV :: SrcSpan -> Located [LocatedAn NoEpAnns (DotFieldOcc GhcPs)] -> LocatedA (HsCmd GhcPs) -> Bool -> [AddEpAnn] -> PV (LHsRecProj GhcPs (LocatedA (HsCmd GhcPs))) #

mkHsLamPV :: SrcSpan -> (EpAnnComments -> MatchGroup GhcPs (LocatedA (HsCmd GhcPs))) -> PV (LocatedA (HsCmd GhcPs)) #

mkHsLetPV :: SrcSpan -> LHsToken "let" GhcPs -> HsLocalBinds GhcPs -> LHsToken "in" GhcPs -> LocatedA (HsCmd GhcPs) -> PV (LocatedA (HsCmd GhcPs)) #

superInfixOp :: (DisambInfixOp (InfixOp (HsCmd GhcPs)) => PV (LocatedA (HsCmd GhcPs))) -> PV (LocatedA (HsCmd GhcPs)) #

mkHsOpAppPV :: SrcSpan -> LocatedA (HsCmd GhcPs) -> LocatedN (InfixOp (HsCmd GhcPs)) -> LocatedA (HsCmd GhcPs) -> PV (LocatedA (HsCmd GhcPs)) #

mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> LocatedL [LMatch GhcPs (LocatedA (HsCmd GhcPs))] -> EpAnnHsCase -> PV (LocatedA (HsCmd GhcPs)) #

mkHsLamCasePV :: SrcSpan -> LamCaseVariant -> LocatedL [LMatch GhcPs (LocatedA (HsCmd GhcPs))] -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

superFunArg :: (DisambECP (FunArg (HsCmd GhcPs)) => PV (LocatedA (HsCmd GhcPs))) -> PV (LocatedA (HsCmd GhcPs)) #

mkHsAppPV :: SrcSpanAnnA -> LocatedA (HsCmd GhcPs) -> LocatedA (FunArg (HsCmd GhcPs)) -> PV (LocatedA (HsCmd GhcPs)) #

mkHsAppTypePV :: SrcSpanAnnA -> LocatedA (HsCmd GhcPs) -> LHsToken "@" GhcPs -> LHsType GhcPs -> PV (LocatedA (HsCmd GhcPs)) #

mkHsIfPV :: SrcSpan -> LHsExpr GhcPs -> Bool -> LocatedA (HsCmd GhcPs) -> Bool -> LocatedA (HsCmd GhcPs) -> AnnsIf -> PV (LocatedA (HsCmd GhcPs)) #

mkHsDoPV :: SrcSpan -> Maybe ModuleName -> LocatedL [LStmt GhcPs (LocatedA (HsCmd GhcPs))] -> AnnList -> PV (LocatedA (HsCmd GhcPs)) #

mkHsParPV :: SrcSpan -> LHsToken "(" GhcPs -> LocatedA (HsCmd GhcPs) -> LHsToken ")" GhcPs -> PV (LocatedA (HsCmd GhcPs)) #

mkHsVarPV :: LocatedN RdrName -> PV (LocatedA (HsCmd GhcPs)) #

mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located (HsCmd GhcPs)) #

mkHsOverLitPV :: LocatedAn a (HsOverLit GhcPs) -> PV (LocatedAn a (HsCmd GhcPs)) #

mkHsWildCardPV :: SrcSpan -> PV (Located (HsCmd GhcPs)) #

mkHsTySigPV :: SrcSpanAnnA -> LocatedA (HsCmd GhcPs) -> LHsType GhcPs -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

mkHsExplicitListPV :: SrcSpan -> [LocatedA (HsCmd GhcPs)] -> AnnList -> PV (LocatedA (HsCmd GhcPs)) #

mkHsSplicePV :: Located (HsUntypedSplice GhcPs) -> PV (Located (HsCmd GhcPs)) #

mkHsRecordPV :: Bool -> SrcSpan -> SrcSpan -> LocatedA (HsCmd GhcPs) -> ([Fbind (HsCmd GhcPs)], Maybe SrcSpan) -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

mkHsNegAppPV :: SrcSpan -> LocatedA (HsCmd GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

mkHsSectionR_PV :: SrcSpan -> LocatedA (InfixOp (HsCmd GhcPs)) -> LocatedA (HsCmd GhcPs) -> PV (Located (HsCmd GhcPs)) #

mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> LocatedA (HsCmd GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

mkHsAsPatPV :: SrcSpan -> LocatedN RdrName -> LHsToken "@" GhcPs -> LocatedA (HsCmd GhcPs) -> PV (LocatedA (HsCmd GhcPs)) #

mkHsLazyPatPV :: SrcSpan -> LocatedA (HsCmd GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

mkHsBangPatPV :: SrcSpan -> LocatedA (HsCmd GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

mkSumOrTuplePV :: SrcSpanAnnA -> Boxity -> SumOrTuple (HsCmd GhcPs) -> [AddEpAnn] -> PV (LocatedA (HsCmd GhcPs)) #

rejectPragmaPV :: LocatedA (HsCmd GhcPs) -> PV () #

type Body (HsCmd GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type FunArg (HsCmd GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type InfixOp (HsCmd GhcPs) 
Instance details

Defined in GHC.Parser.PostProcess

type Anno (HsCmd (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno [LocatedA (StmtLR (GhcPass pl) (GhcPass pr) (LocatedA (HsCmd (GhcPass pr))))] 
Instance details

Defined in GHC.Hs.Expr

type Anno (GRHS (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type Anno (Match (GhcPass p) (LocatedA (HsCmd (GhcPass p)))) 
Instance details

Defined in GHC.Hs.Expr

type LHsCmd id = XRec id (HsCmd id) #

Located Haskell Command (for arrow syntax)

data LamCaseVariant #

Which kind of lambda case are we dealing with?

Constructors

LamCase

`case`

LamCases

`cases`

Instances

Instances details
Data LamCaseVariant 
Instance details

Defined in Language.Haskell.Syntax.Expr

Methods

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

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

toConstr :: LamCaseVariant -> Constr #

dataTypeOf :: LamCaseVariant -> DataType #

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

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

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

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

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

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

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

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

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

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

Eq LamCaseVariant 
Instance details

Defined in Language.Haskell.Syntax.Expr

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)

Extension point; see Note [Trees That Grow] in Language.Haskell.Syntax.Extension

type LHsTupArg id = XRec id (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 HsPragE p #

A pragma, written as {-# ... #-}, that may appear within an expression.

data DotFieldOcc p #

Instances

Instances details
type Anno (DotFieldOcc (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type RecUpdProj p = RecProj p (LHsExpr p) #

type LHsRecProj p arg = XRec p (RecProj p arg) #

newtype FieldLabelStrings p #

Constructors

FieldLabelStrings [XRec p (DotFieldOcc p)] 

Instances

Instances details
type Anno (FieldLabelStrings (GhcPass p)) 
Instance details

Defined in GHC.Hs.Expr

type LFieldLabelStrings p = XRec p (FieldLabelStrings p) #

RecordDotSyntax field updates

data HsModule p #

Haskell Module

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

Constructors

HsModule

AnnKeywordIds

Fields

XModule !(XXModule p) 

data AnnBind bndr annot #

A clone of the Bind type but allowing annotation at every tree node

Constructors

AnnNonRec bndr (AnnExpr bndr annot) 
AnnRec [(bndr, AnnExpr bndr annot)] 

data AnnAlt bndr annot #

A clone of the Alt type but allowing annotation at every tree node

Constructors

AnnAlt AltCon [bndr] (AnnExpr bndr annot) 

data AnnExpr' bndr annot #

A clone of the Expr type but allowing annotation at every tree node

Constructors

AnnVar Id 
AnnLit Literal 
AnnLam bndr (AnnExpr bndr annot) 
AnnApp (AnnExpr bndr annot) (AnnExpr bndr annot) 
AnnCase (AnnExpr bndr annot) bndr Type [AnnAlt bndr annot] 
AnnLet (AnnBind bndr annot) (AnnExpr bndr annot) 
AnnCast (AnnExpr bndr annot) (annot, Coercion) 
AnnTick CoreTickish (AnnExpr bndr annot) 
AnnType Type 
AnnCoercion Coercion 

type AnnExpr bndr annot = (annot, AnnExpr' bndr annot) #

Annotated core: allows annotation at every node in the tree

type TaggedAlt t = Alt (TaggedBndr t) #

type TaggedArg t = Arg (TaggedBndr t) #

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 GHC.Core

Methods

ppr :: TaggedBndr b -> SDoc #

type CoreAlt = Alt CoreBndr #

Case alternatives where binders are CoreBndrs

type CoreBind = Bind CoreBndr #

Binding groups where binders are CoreBndrs

type CoreArg = Arg CoreBndr #

Argument expressions where binders are CoreBndrs

data UnfoldingGuidance #

UnfoldingGuidance says when unfolding should take place

Constructors

UnfWhen 
UnfIfGoodArgs 

Fields

UnfNever 

Instances

Instances details
Eq UnfoldingGuidance 
Instance details

Defined in GHC.Core

data UnfoldingCache #

Properties of a CoreUnfolding that could be computed on-demand from its template. See Note [UnfoldingCache]

Instances

Instances details
Eq UnfoldingCache 
Instance details

Defined in GHC.Core

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 GHC.Core.Unfold

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 GHC.CoreToIface 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 InScopeEnv #

The InScopeSet in the InScopeEnv is a superset of variables that are currently in scope. See Note [The InScopeSet invariant].

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 GHC.Iface.Tidy for the sole purpose of this field.

  • ru_origin :: !Module

    GenModule 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 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 GHC.Core

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 GHC.Core

type OutKind = Kind #

type OutType = Type #

type InArg = CoreArg #

type InAlt = CoreAlt #

type InKind = Kind #

type InType = Type #

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
Data b => Data (Bind b) 
Instance details

Defined in GHC.Core

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) #

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
Data AltCon 
Instance details

Defined in GHC.Core

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 #

Outputable AltCon 
Instance details

Defined in GHC.Core

Methods

ppr :: AltCon -> SDoc #

Eq AltCon 
Instance details

Defined in GHC.Core

Methods

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

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

Ord AltCon 
Instance details

Defined in GHC.Core

data LambdaFormInfo #

Information about an identifier, from the code generator's point of view. Every identifier is bound to a LambdaFormInfo in the environment, which gives the code generator enough info to be able to tail call or return that identifier.

Instances

Instances details
Outputable LambdaFormInfo 
Instance details

Defined in GHC.StgToCmm.Types

Methods

ppr :: LambdaFormInfo -> SDoc #

data TickBoxOp #

Tick box for Hpc-style coverage

Constructors

TickBox Module !TickBoxId 

Instances

Instances details
Outputable TickBoxOp 
Instance details

Defined in GHC.Types.Id.Info

Methods

ppr :: TickBoxOp -> SDoc #

type TickBoxId = Int #

data CafInfo #

Constant applicative form Information

Records whether an Id makes Constant Applicative Form references

Constructors

MayHaveCafRefs

Indicates that the Id is for either:

  1. A function or static constructor that refers to one or more CAFs, or
  2. A real live CAF
NoCafRefs

A function or static constructor that refers to no CAFs.

Instances

Instances details
Outputable CafInfo 
Instance details

Defined in GHC.Types.Id.Info

Methods

ppr :: CafInfo -> SDoc #

Eq CafInfo 
Instance details

Defined in GHC.Types.Id.Info

Methods

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

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

Ord CafInfo 
Instance details

Defined in GHC.Types.Id.Info

data RuleInfo #

Rule Information

Records the specializations of this Id that we know about in the form of rewrite CoreRules that target them

Constructors

RuleInfo [CoreRule] DVarSet 

type InlinePragInfo = InlinePragma #

Inline Pragma Information

Tells when the inlining is active. When it is active the thing may be inlined, depending on how big it is.

If there was an INLINE pragma, then as a separate matter, the RHS will have been made to look small with a Core inline Note

The default InlinePragInfo is AlwaysActive, so the info serves entirely as a way to inhibit inlining until we want it

type ArityInfo = Arity #

Arity Information

An ArityInfo of n tells us that partial application of this Id to up to n-1 value arguments does essentially no work.

That is not necessarily the same as saying that it has n leading lambdas, because coerces may get in the way.

The arity might increase later in the compilation process, if an extra lambda floats up to the binding site.

Invariant: the Arity of an Id must never exceed the number of value arguments that appear in the type of the Id. See Note [Arity and function types].

data RecSelParent #

Recursive Selector Parent

Instances

Instances details
Outputable RecSelParent 
Instance details

Defined in GHC.Types.Id.Info

Methods

ppr :: RecSelParent -> SDoc #

Eq RecSelParent 
Instance details

Defined in GHC.Types.Id.Info

type CoreAltWithFVs = AnnAlt Id FVAnn #

Every node in an expression annotated with its (non-global) free variables, both Ids and TyVars, and type.

type CoreExprWithFVs = AnnExpr Id FVAnn #

Every node in an expression annotated with its (non-global) free variables, both Ids and TyVars, and type. NB: see Note [The FVAnn invariant]

type CoreBindWithFVs = AnnBind Id FVAnn #

Every node in a binding group annotated with its (non-global) free variables, both Ids and TyVars, and type.

type FVAnn = DVarSet #

type CheapAppFun = Id -> Arity -> Bool #

data FloatBind #

Instances

Instances details
Outputable FloatBind 
Instance details

Defined in GHC.Core.Make

Methods

ppr :: FloatBind -> SDoc #

data CompilerInfo #

Instances

Instances details
Eq CompilerInfo 
Instance details

Defined in GHC.Driver.Session

data LinkerInfo #

Instances

Instances details
Eq LinkerInfo 
Instance details

Defined in GHC.Driver.Session

data PkgDbRef #

Instances

Instances details
Eq PkgDbRef 
Instance details

Defined in GHC.Driver.Session

data FlagSpec flag #

Constructors

FlagSpec 

Fields

newtype CmdLineP s a #

Constructors

CmdLineP (forall (m :: Type -> Type). Monad m => StateT s m a) 

Instances

Instances details
Applicative (CmdLineP s) 
Instance details

Defined in GHC.Driver.Session

Methods

pure :: a -> CmdLineP s a #

(<*>) :: CmdLineP s (a -> b) -> CmdLineP s a -> CmdLineP s b #

liftA2 :: (a -> b -> c) -> CmdLineP s a -> CmdLineP s b -> CmdLineP s c #

(*>) :: CmdLineP s a -> CmdLineP s b -> CmdLineP s b #

(<*) :: CmdLineP s a -> CmdLineP s b -> CmdLineP s a #

Functor (CmdLineP s) 
Instance details

Defined in GHC.Driver.Session

Methods

fmap :: (a -> b) -> CmdLineP s a -> CmdLineP s b #

(<$) :: a -> CmdLineP s b -> CmdLineP s a #

Monad (CmdLineP s) 
Instance details

Defined in GHC.Driver.Session

Methods

(>>=) :: CmdLineP s a -> (a -> CmdLineP s b) -> CmdLineP s b #

(>>) :: CmdLineP s a -> CmdLineP s b -> CmdLineP s b #

return :: a -> CmdLineP s a #

data OnOff a #

Constructors

On a 
Off a 

Instances

Instances details
Show a => Show (OnOff a) 
Instance details

Defined in GHC.Driver.Session

Methods

showsPrec :: Int -> OnOff a -> ShowS #

show :: OnOff a -> String #

showList :: [OnOff a] -> ShowS #

Outputable a => Outputable (OnOff a) 
Instance details

Defined in GHC.Driver.Session

Methods

ppr :: OnOff a -> SDoc #

Eq a => Eq (OnOff a) 
Instance details

Defined in GHC.Driver.Session

Methods

(==) :: OnOff a -> OnOff a -> Bool #

(/=) :: OnOff a -> OnOff a -> Bool #

newtype FlushOut #

Constructors

FlushOut (IO ()) 

type FatalMessager = String -> IO () #

data DynamicTooState #

Constructors

DT_Dont

Don't try to build dynamic objects too

DT_OK

Will still try to generate dynamic objects

DT_Dyn

Currently generating dynamic objects (in the backend)

data DynLibLoader #

Instances

Instances details
Eq DynLibLoader 
Instance details

Defined in GHC.Driver.Session

data PackageFlag #

Flags for manipulating packages visibility.

Constructors

ExposePackage String PackageArg ModRenaming

-package, -package-id

HidePackage String
-hide-package

Instances

Instances details
Outputable PackageFlag 
Instance details

Defined in GHC.Driver.Session

Methods

ppr :: PackageFlag -> SDoc #

Eq PackageFlag 
Instance details

Defined in GHC.Driver.Session

data TrustFlag #

Flags for manipulating package trust.

Constructors

TrustPackage String
-trust
DistrustPackage String
-distrust

Instances

Instances details
Eq TrustFlag 
Instance details

Defined in GHC.Driver.Session

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 GHC.Driver.Session

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
Outputable ModRenaming 
Instance details

Defined in GHC.Driver.Session

Methods

ppr :: ModRenaming -> SDoc #

Eq ModRenaming 
Instance details

Defined in GHC.Driver.Session

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 Unit

-package-id, by Unit

Instances

Instances details
Show PackageArg 
Instance details

Defined in GHC.Driver.Session

Outputable PackageArg 
Instance details

Defined in GHC.Driver.Session

Methods

ppr :: PackageArg -> SDoc #

Eq PackageArg 
Instance details

Defined in GHC.Driver.Session

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

LinkMergedObj

Link objects into a merged "GHCi object"

Instances

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 GHC.Unit.Finder: in one-shot mode we look for interface files for imported modules, but in multi-module mode we look for source files in order to check whether they need to be recompiled.

Constructors

CompManager

--make, GHCi, etc.

OneShot
ghc -c Foo.hs
MkDepend

ghc -M, see GHC.Unit.Finder for why we need this

Instances

Instances details
Outputable GhcMode 
Instance details

Defined in GHC.Driver.Session

Methods

ppr :: GhcMode -> SDoc #

Eq GhcMode 
Instance details

Defined in GHC.Driver.Session

Methods

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

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

class ContainsDynFlags t where #

Methods

extractDynFlags :: t -> DynFlags #

Instances

Instances details
ContainsDynFlags HscEnv 
Instance details

Defined in GHC.Driver.Env.Types

ContainsDynFlags (Env gbl lcl) 
Instance details

Defined in GHC.Tc.Types

Methods

extractDynFlags :: Env gbl lcl -> DynFlags #

class HasDynFlags (m :: Type -> Type) where #

Methods

getDynFlags :: m DynFlags #

Instances

Instances details
HasDynFlags CoreM 
Instance details

Defined in GHC.Core.Opt.Monad

HasDynFlags Hsc 
Instance details

Defined in GHC.Driver.Env.Types

HasDynFlags TcS 
Instance details

Defined in GHC.Tc.Solver.Monad

ContainsDynFlags env => HasDynFlags (IOEnv env) 
Instance details

Defined in GHC.Data.IOEnv

Methods

getDynFlags :: IOEnv env DynFlags #

(Monad m, HasDynFlags m) => HasDynFlags (MaybeT m) 
Instance details

Defined in GHC.Driver.Session

(Monad m, HasDynFlags m) => HasDynFlags (ExceptT e m) 
Instance details

Defined in GHC.Driver.Session

(Monad m, HasDynFlags m) => HasDynFlags (ReaderT a m) 
Instance details

Defined in GHC.Driver.Session

(Monoid a, Monad m, HasDynFlags m) => HasDynFlags (WriterT a m) 
Instance details

Defined in GHC.Driver.Session

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.

Constructors

IncludeSpecs 

Fields

Instances

Instances details
Show IncludeSpecs 
Instance details

Defined in GHC.Driver.Session

data HoleFit #

HoleFit is the type we use for valid hole fits. It contains the element that was checked, the Id of that element as found by tcLookup, and the refinement level of the fit, which is the number of extra argument holes that this fit uses (e.g. if hfRefLvl is 2, the fit is for `Id _ _`).

Constructors

HoleFit 

Fields

RawHoleFit SDoc

A fit that is just displayed as is. Here so thatHoleFitPlugins can inject any fit they want.

Instances

Instances details
Outputable HoleFit 
Instance details

Defined in GHC.Tc.Errors.Hole.FitTypes

Methods

ppr :: HoleFit -> SDoc #

Eq HoleFit 
Instance details

Defined in GHC.Tc.Errors.Hole.FitTypes

Methods

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

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

Ord HoleFit 
Instance details

Defined in GHC.Tc.Errors.Hole.FitTypes

data HoleFitPlugin #

A HoleFitPlugin is a pair of candidate and fit plugins.

type ShHoleSubst = ModuleNameEnv Module #

Substitution on module variables, mapping module names to module identifiers.

data UnitErr #

Instances

Instances details
Outputable UnitErr 
Instance details

Defined in GHC.Unit.State

Methods

ppr :: UnitErr -> SDoc #

data LookupResult #

The result of performing a lookup

Constructors

LookupFound Module (UnitInfo, ModuleOrigin)

Found the module uniquely, nothing else to do

LookupMultiple [(Module, ModuleOrigin)]

Multiple modules with the same name in scope

LookupHidden [(Module, ModuleOrigin)] [(Module, ModuleOrigin)]

No modules found, but there were some hidden ones with an exact name match. First is due to package hidden, second is due to module being hidden

LookupUnusable [(Module, ModuleOrigin)]

No modules found, but there were some unusable ones with an exact name match

LookupNotFound [ModuleSuggestion]

Nothing found, here are some suggested different names

data UnusableUnitReason #

The reason why a unit is unusable.

Constructors

IgnoredWithFlag

We ignored it explicitly using -ignore-package.

BrokenDependencies [UnitId]

This unit transitively depends on a unit that was never present in any of the provided databases.

CyclicDependencies [UnitId]

This unit transitively depends on a unit involved in a cycle. Note that the list of UnitId reports the direct dependencies of this unit that (transitively) depended on the cycle, and not the actual cycle itself (which we report separately at high verbosity.)

IgnoredDependencies [UnitId]

This unit transitively depends on a unit which was ignored.

ShadowedDependencies [UnitId]

This unit transitively depends on a unit which was shadowed by an ABI-incompatible unit.

Instances

Instances details
Outputable UnusableUnitReason 
Instance details

Defined in GHC.Unit.State

data UnitDatabase unit #

Unit database

Instances

Instances details
Outputable u => Outputable (UnitDatabase u) 
Instance details

Defined in GHC.Unit.State

Methods

ppr :: UnitDatabase u -> SDoc #

data UnitState #

Constructors

UnitState 

Fields

  • unitInfoMap :: UnitInfoMap

    A mapping of Unit to UnitInfo. This list is adjusted so that only valid units are here. UnitInfo reflects what was stored *on disk*, except for the trusted flag, which is adjusted at runtime. (In particular, some units in this map may have the exposed flag be False.)

  • preloadClosure :: PreloadUnitClosure

    The set of transitively reachable units according to the explicitly provided command line arguments. A fully instantiated VirtUnit may only be replaced by a RealUnit from this set. See Note [VirtUnit to RealUnit improvement]

  • packageNameMap :: UniqFM PackageName UnitId

    A mapping of PackageName to UnitId. If several units have the same package name (e.g. different instantiations), then we return one of them... This is used when users refer to packages in Backpack includes. And also to resolve package qualifiers with the PackageImports extension.

  • wireMap :: Map UnitId UnitId

    A mapping from database unit keys to wired in unit ids.

  • unwireMap :: Map UnitId UnitId

    A mapping from wired in unit ids to unit keys from the database.

  • preloadUnits :: [UnitId]

    The units we're going to link in eagerly. This list should be in reverse dependency order; that is, a unit is always mentioned before the units it depends on.

  • explicitUnits :: [(Unit, Maybe PackageArg)]

    Units which we explicitly depend on (from a command line flag). We'll use this to generate version macros and the unused packages warning. The original flag which was used to bring the unit into scope is recorded for the -Wunused-packages warning.

  • homeUnitDepends :: [UnitId]
     
  • moduleNameProvidersMap :: !ModuleNameProvidersMap

    This is a full map from ModuleName to all modules which may possibly be providing it. These providers may be hidden (but we'll still want to report them in error messages), or it may be an ambiguous import.

  • pluginModuleNameProvidersMap :: !ModuleNameProvidersMap

    A map, like moduleNameProvidersMap, but controlling plugin visibility.

  • requirementContext :: Map ModuleName [InstantiatedModule]

    A map saying, for each requirement, what interfaces must be merged together when we use them. For example, if our dependencies are p[A=<A>] and q[A=<A>,B=r[C=<A>]:B], then the interfaces to merge for A are p[A=<A>]:A, q[A=<A>,B=r[C=<A>]:B]:A and r[C=<A>]:C.

    There's an entry in this map for each hole in our home library.

  • allowVirtualUnits :: !Bool

    Indicate if we can instantiate units on-the-fly.

    This should only be true when we are type-checking an indefinite unit. See Note [About units] in GHC.Unit.

data ModuleOrigin #

Given a module name, there may be multiple ways it came into scope, possibly simultaneously. This data type tracks all the possible ways it could have come into scope. Warning: don't use the record functions, they're partial!

Constructors

ModHidden

Module is hidden, and thus never will be available for import. (But maybe the user didn't realize), so we'll still keep track of these modules.)

ModUnusable UnusableUnitReason

Module is unavailable because the package is unusable.

ModOrigin

Module is public, and could have come from some places.

Fields

  • fromOrigUnit :: Maybe Bool

    Just False means that this module is in someone's exported-modules list, but that package is hidden; Just True means that it is available; Nothing means neither applies.

  • fromExposedReexport :: [UnitInfo]

    Is the module available from a reexport of an exposed package? There could be multiple.

  • fromHiddenReexport :: [UnitInfo]

    Is the module available from a reexport of a hidden package?

  • fromPackageFlag :: Bool

    Did the module export come from a package flag? (ToDo: track more information.

data FinderOpts #

Locations and information the finder cares about.

Should be taken from DynFlags via initFinderOpts.

Constructors

FinderOpts 

Fields

Instances

Instances details
Show FinderOpts 
Instance details

Defined in GHC.Unit.Finder.Types

data FindResult #

The result of searching for an imported module.

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

Constructors

Found ModLocation Module

The module was found

NoPackage Unit

The requested unit was not found

FoundMultiple [(Module, ModuleOrigin)]

_Error_: both in multiple packages

NotFound

Not found

Fields

data HsParsedModule #

Constructors

HsParsedModule 

Fields

  • hpm_module :: Located (HsModule GhcPs)
     
  • hpm_src_files :: [FilePath]

    extra source files (e.g. from #includes). The lexer collects these from '# file line' pragmas, which the C preprocessor leaves behind. These files and their timestamps are stored in the .hi file, so that we can force recompilation if any of them change (#3589)

data CgGuts #

A restricted form of ModGuts for code generation purposes

Constructors

CgGuts 

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 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...) See Note [Orphans] in GHC.Core

type RuleBase = NameEnv [CoreRule] #

Gathers a collection of CoreRules. Maps (the name of) an Id to its rules

type WhetherHasFamInst = Bool #

Does this module define family instances?

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 rewrite rule in a module other than the one defining the function in the head of the rule

type IfaceExport = AvailInfo #

The original names declared of a certain module that are exported

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.

See Note [Strictness in ModIface] to learn about why some fields are strict and others are not.

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 GhcRn

    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_extra_decls :: Maybe [IfaceBindingX IfaceMaybeRhs IfaceTopBndrInfo]

    Extra variable definitions which are **NOT** exposed but when combined with mi_decls allows us to restart code generation. See Note [Interface Files with Core Definitions] and Note [Interface File with Core: Sharing RHSs]

  • mi_globals :: !(Maybe GlobalRdrEnv)

    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 [Trust Own Package] in GHC.Rename.Names

  • mi_complete_matches :: ![IfaceCompleteMatch]
     
  • mi_docs :: !(Maybe Docs)

    Docstrings and related data for use by haddock, the ghci :doc command, and other tools.

    Just _ = the module was built with -haddock.

  • mi_final_exts :: !(IfaceBackendExts phase)

    Either () or ModIfaceBackend for a fully instantiated interface.

  • mi_ext_fields :: !ExtensibleFields

    Additional optional fields, where the Map key represents the field name, resulting in a (size, serialized data) pair. Because the data is intended to be serialized through the internal Binary class (increasing compatibility with types using Name and FastString, such as HIE), this format is chosen over ByteStrings.

  • mi_src_hash :: !Fingerprint

    Hash of the .hs source, used for recompilation checking.

Instances

Instances details
Binary ModIface 
Instance details

Defined in GHC.Unit.Module.ModIface

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

Defined in GHC.Unit.Module.ModIface

Methods

rnf :: ModIface_ phase -> () #

type ModIface = ModIface_ 'ModIfaceFinal #

type family IfaceBackendExts (phase :: ModIfacePhase) = (bk :: Type) | bk -> phase where ... #

Equations

IfaceBackendExts 'ModIfaceCore = () 
IfaceBackendExts 'ModIfaceFinal = ModIfaceBackend 

type family IfaceDeclExts (phase :: ModIfacePhase) = (decl :: Type) | decl -> phase where ... #

Selects a IfaceDecl representation. For fully instantiated interfaces we also maintain a fingerprint, which is used for recompilation checks.

Equations

IfaceDeclExts 'ModIfaceCore = IfaceDecl 
IfaceDeclExts 'ModIfaceFinal = (Fingerprint, IfaceDecl) 

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

Instances

Instances details
NFData ModIfaceBackend 
Instance details

Defined in GHC.Unit.Module.ModIface

Methods

rnf :: ModIfaceBackend -> () #

type PartialModIface = ModIface_ 'ModIfaceCore #

data HscBackendAction #

Action to perform in backend compilation

Constructors

HscUpdate ModIface

Update the boot and signature file results.

HscRecomp

Recompile this module.

Fields

Instances

Instances details
Outputable HscBackendAction 
Instance details

Defined in GHC.Unit.Module.Status

Methods

ppr :: HscBackendAction -> SDoc #

data HscRecompStatus #

Status of a module in incremental compilation

Constructors

HscUpToDate ModIface HomeModLinkable

Nothing to do because code already exists.

HscRecompNeeded (Maybe Fingerprint)

Recompilation of module, or update of interface is required. Optionally pass the old interface hash to avoid updating the existing interface when it has not changed.

data ModSummary #

Data for a module node in a ModuleGraph. Module 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 GHC.Unit.Module.ModSummary

Methods

ppr :: ModSummary -> SDoc #

data TransLayoutReason #

Constructors

TransLayout_Where

"`where' clause at the same depth as implicit layout block"

TransLayout_Pipe

"`|' at the same depth as implicit layout block")

data CmmParserError #

Errors from the Cmm parser

Constructors

CmmUnknownPrimitive !FastString

Unknown Cmm primitive

CmmUnknownMacro !FastString

Unknown macro

CmmUnknownCConv !String

Unknown calling convention

CmmUnrecognisedSafety !String

Unrecognised safety

CmmUnrecognisedHint !String

Unrecognised hint

data LexErr #

Constructors

LexError

Lexical error

LexUnknownPragma

Unknown pragma

LexErrorInPragma

Lexical error in pragma

LexNumEscapeRange

Numeric escape sequence out of range

LexStringCharLit

Lexical error in string/character literal

LexStringCharLitEOF

Unexpected end-of-file in string/character literal

LexUnterminatedComment

Unterminated `{-'

LexUnterminatedOptions

Unterminated OPTIONS pragma

LexUnterminatedQQ

Unterminated quasiquotation

data LexErrKind #

Constructors

LexErrKind_EOF

End of input

LexErrKind_UTF8

UTF-8 decoding error

LexErrKind_Char !Char

Error at given character

data PsErrInPatDetails #

Constructors

PEIP_NegApp

Negative application pattern?

PEIP_TypeArgs [HsConPatTyArg GhcPs]

The list of type arguments for the pattern

PEIP_RecPattern 

Fields

PEIP_OtherPatDetails !ParseContext 

data ParseContext #

Extra information for the expression GHC is currently inspecting/parsing. It can be used to generate more informative parser diagnostics and hints.

Constructors

ParseContext 

Fields

Instances

Instances details
Eq ParseContext 
Instance details

Defined in GHC.Parser.Errors.Types

data PatIsRecursive #

Is the parsed pattern recursive?

data PsErrParseDetails #

Extra details about a parse error, which helps us in determining which should be the hints to suggest.

Constructors

PsErrParseDetails 

Fields

data PsMessage #

Constructors

PsUnknownMessage UnknownDiagnostic

An "unknown" message from the parser. This type constructor allows arbitrary messages to be embedded. The typical use case would be GHC plugins willing to emit custom diagnostics.

PsHeaderMessage !PsHeaderMessage

A group of parser messages emitted in Header. See Note [Messages from GHC.Parser.Header].

PsWarnBidirectionalFormatChars (NonEmpty (PsLoc, Char, String))

PsWarnBidirectionalFormatChars is a warning (controlled by the -Wwarn-bidirectional-format-characters flag) that occurs when unicode bi-directional format characters are found within in a file

The PsLoc contains the exact position in the buffer the character occurred, and the string contains a description of the character.

PsWarnTab

PsWarnTab is a warning (controlled by the -Wwarn-tabs flag) that occurs when tabulations (tabs) are found within a file.

Test case(s): parsershould_failT12610 parsershould_compileT9723b parsershould_compileT9723a parsershould_compileread043 parsershould_failT16270 warningsshould_compileT9230

Fields

  • !Word

    Number of other occurrences other than the first one

PsWarnTransitionalLayout !TransLayoutReason

PsWarnTransitionalLayout is a warning (controlled by the -Walternative-layout-rule-transitional flag) that occurs when pipes ('|') or 'where' are at the same depth of an implicit layout block.

Example(s):

f :: IO () f | True = do let x = () y = () return () | True = return ()

Test case(s): layout/layout006 layout/layout003 layout/layout001

PsWarnUnrecognisedPragma !String ![String]

Unrecognised pragma. First field is the actual pragma name which might be empty. Second field is the set of valid candidate pragmas.

PsWarnMisplacedPragma !FileHeaderPragmaType 
PsWarnHaddockInvalidPos

Invalid Haddock comment position

PsWarnHaddockIgnoreMulti

Multiple Haddock comment for the same entity

PsWarnStarBinder

Found binding occurrence of "*" while StarIsType is enabled

PsWarnStarIsType

Using "*" for Type without StarIsType enabled

PsWarnImportPreQualified

Pre qualified import with WarnPrepositiveQualifiedModule enabled

PsWarnOperatorWhitespaceExtConflict !OperatorWhitespaceSymbol 
PsWarnOperatorWhitespace !FastString !OperatorWhitespaceOccurrence 
PsErrLambdaCase

LambdaCase syntax used without the extension enabled

PsErrEmptyLambda

A lambda requires at least one parameter

PsErrNumUnderscores !NumUnderscoreReason

Underscores in literals without the extension enabled

PsErrPrimStringInvalidChar

Invalid character in primitive string

PsErrMissingBlock

Missing block

PsErrLexer !LexErr !LexErrKind

Lexer error

PsErrSuffixAT

Suffix occurrence of @

PsErrParse !String !PsErrParseDetails

Parse errors

PsErrCmmLexer

Cmm lexer error

PsErrUnsupportedBoxedSumExpr !(SumOrTuple (HsExpr GhcPs))

Unsupported boxed sum in expression

PsErrUnsupportedBoxedSumPat !(SumOrTuple (PatBuilder GhcPs))

Unsupported boxed sum in pattern

PsErrUnexpectedQualifiedConstructor !RdrName

Unexpected qualified constructor

PsErrTupleSectionInPat

Tuple section in pattern context

PsErrIllegalBangPattern !(Pat GhcPs)

Bang-pattern without BangPattterns enabled

PsErrOpFewArgs !StarIsType !RdrName

Operator applied to too few arguments

PsErrImportQualifiedTwice

Import: multiple occurrences of qualified

PsErrImportPostQualified

Post qualified import without ImportQualifiedPost

PsErrIllegalExplicitNamespace

Explicit namespace keyword without ExplicitNamespaces

PsErrVarForTyCon !RdrName

Expecting a type constructor but found a variable

PsErrIllegalPatSynExport

Illegal export form allowed by PatternSynonyms

PsErrMalformedEntityString

Malformed entity string

PsErrDotsInRecordUpdate

Dots used in record update

PsErrPrecedenceOutOfRange !Int

Precedence out of range

PsErrOverloadedRecordDotInvalid

Invalid use of record dot syntax .

PsErrOverloadedRecordUpdateNotEnabled

OverloadedRecordUpdate is not enabled.

PsErrOverloadedRecordUpdateNoQualifiedFields

Can't use qualified fields when OverloadedRecordUpdate is enabled.

PsErrInvalidDataCon !(HsType GhcPs)

Cannot parse data constructor in a data/newtype declaration

PsErrInvalidInfixDataCon !(HsType GhcPs) !RdrName !(HsType GhcPs)

Cannot parse data constructor in a data/newtype declaration

PsErrIllegalPromotionQuoteDataCon !RdrName

Illegal DataKinds quote mark in data/newtype constructor declaration

PsErrUnpackDataCon

UNPACK applied to a data constructor

PsErrUnexpectedKindAppInDataCon !DataConBuilder !(HsType GhcPs)

Unexpected kind application in data/newtype declaration

PsErrInvalidRecordCon !(PatBuilder GhcPs)

Not a record constructor

PsErrIllegalUnboxedStringInPat !(HsLit GhcPs)

Illegal unboxed string literal in pattern

PsErrIllegalUnboxedFloatingLitInPat !(HsLit GhcPs)

Illegal primitive floating point literal in pattern

PsErrDoNotationInPat

Do-notation in pattern

PsErrIfThenElseInPat

If-then-else syntax in pattern

PsErrLambdaCaseInPat LamCaseVariant

Lambda-case in pattern

PsErrCaseInPat

case..of in pattern

PsErrLetInPat

let-syntax in pattern

PsErrLambdaInPat

Lambda-syntax in pattern

PsErrArrowExprInPat !(HsExpr GhcPs)

Arrow expression-syntax in pattern

PsErrArrowCmdInPat !(HsCmd GhcPs)

Arrow command-syntax in pattern

PsErrArrowCmdInExpr !(HsCmd GhcPs)

Arrow command-syntax in expression

PsErrViewPatInExpr !(LHsExpr GhcPs) !(LHsExpr GhcPs)

View-pattern in expression

PsErrTypeAppWithoutSpace !RdrName !(LHsExpr GhcPs)

Type-application without space before @

PsErrLazyPatWithoutSpace !(LHsExpr GhcPs)

Lazy-pattern (~) without space after it

PsErrBangPatWithoutSpace !(LHsExpr GhcPs)

Bang-pattern (!) without space after it

PsErrUnallowedPragma !(HsPragE GhcPs)

Pragma not allowed in this position

PsErrQualifiedDoInCmd !ModuleName

Qualified do block in command

PsErrInvalidInfixHole

Invalid infix hole, expected an infix operator

PsErrSemiColonsInCondExpr

Unexpected semi-colons in conditional expression

Fields

PsErrSemiColonsInCondCmd

Unexpected semi-colons in conditional command

Fields

PsErrAtInPatPos

@-operator in a pattern position

PsErrLambdaCmdInFunAppCmd !(LHsCmd GhcPs)

Unexpected lambda command in function application

PsErrCaseCmdInFunAppCmd !(LHsCmd GhcPs)

Unexpected case command in function application

PsErrLambdaCaseCmdInFunAppCmd !LamCaseVariant !(LHsCmd GhcPs)

Unexpected case(s) command in function application

PsErrIfCmdInFunAppCmd !(LHsCmd GhcPs)

Unexpected if command in function application

PsErrLetCmdInFunAppCmd !(LHsCmd GhcPs)

Unexpected let command in function application

PsErrDoCmdInFunAppCmd !(LHsCmd GhcPs)

Unexpected do command in function application

PsErrDoInFunAppExpr !(Maybe ModuleName) !(LHsExpr GhcPs)

Unexpected do block in function application

PsErrMDoInFunAppExpr !(Maybe ModuleName) !(LHsExpr GhcPs)

Unexpected mdo block in function application

PsErrLambdaInFunAppExpr !(LHsExpr GhcPs)

Unexpected lambda expression in function application

PsErrCaseInFunAppExpr !(LHsExpr GhcPs)

Unexpected case expression in function application

PsErrLambdaCaseInFunAppExpr !LamCaseVariant !(LHsExpr GhcPs)

Unexpected case(s) expression in function application

PsErrLetInFunAppExpr !(LHsExpr GhcPs)

Unexpected let expression in function application

PsErrIfInFunAppExpr !(LHsExpr GhcPs)

Unexpected if expression in function application

PsErrProcInFunAppExpr !(LHsExpr GhcPs)

Unexpected proc expression in function application

PsErrMalformedTyOrClDecl !(LHsType GhcPs)

Malformed head of type or class declaration

PsErrIllegalWhereInDataDecl

Illegal 'where' keyword in data declaration

PsErrIllegalDataTypeContext !(LHsContext GhcPs)

Illegal datatype context

PsErrParseErrorOnInput !OccName

Parse error on input

PsErrMalformedDecl !SDoc !RdrName

Malformed ... declaration for ...

PsErrUnexpectedTypeAppInDecl !(LHsType GhcPs) !SDoc !RdrName

Unexpected type application in a declaration

PsErrNotADataCon !RdrName

Not a data constructor

PsErrRecordSyntaxInPatSynDecl !(LPat GhcPs)

Record syntax used in pattern synonym declaration

PsErrEmptyWhereInPatSynDecl !RdrName

Empty 'where' clause in pattern-synonym declaration

PsErrInvalidWhereBindInPatSynDecl !RdrName !(HsDecl GhcPs)

Invalid binding name in 'where' clause of pattern-synonym declaration

PsErrNoSingleWhereBindInPatSynDecl !RdrName !(HsDecl GhcPs)

Multiple bindings in 'where' clause of pattern-synonym declaration

PsErrDeclSpliceNotAtTopLevel !(SpliceDecl GhcPs)

Declaration splice not a top-level

PsErrInferredTypeVarNotAllowed

Inferred type variables not allowed here

PsErrMultipleNamesInStandaloneKindSignature [LIdP GhcPs]

Multiple names in standalone kind signatures

PsErrIllegalImportBundleForm

Illegal import bundle form

PsErrIllegalRoleName !FastString [Role]

Illegal role name

PsErrInvalidTypeSignature !(LHsExpr GhcPs)

Invalid type signature

PsErrUnexpectedTypeInDecl !(LHsType GhcPs) !SDoc !RdrName [LHsTypeArg GhcPs] !SDoc

Unexpected type in declaration

PsErrExpectedHyphen

Expected a hyphen

PsErrSpaceInSCC

Found a space in a SCC

PsErrEmptyDoubleQuotes

Found two single quotes

Fields

PsErrInvalidPackageName !FastString

Invalid package name

PsErrInvalidRuleActivationMarker

Invalid rule activation marker

PsErrLinearFunction

Linear function found but LinearTypes not enabled

PsErrMultiWayIf

Multi-way if-expression found but MultiWayIf not enabled

PsErrExplicitForall

Explicit forall found but no extension allowing it is enabled

Fields

  • !Bool

    is Unicode forall?

PsErrIllegalQualifiedDo !SDoc

Found qualified-do without QualifiedDo enabled

PsErrCmmParser !CmmParserError

Cmm parser error

PsErrIllegalTraditionalRecordSyntax !SDoc

Illegal traditional record syntax

TODO: distinguish errors without using SDoc

PsErrParseErrorInCmd !SDoc

Parse error in command

TODO: distinguish errors without using SDoc

PsErrInPat !(PatBuilder GhcPs) !PsErrInPatDetails

Parse error in pattern

PsErrParseRightOpSectionInPat !RdrName !(PatBuilder GhcPs)

Parse error in right operator section pattern TODO: embed the proper operator, if possible

PsErrIllegalGadtRecordMultiplicity !(HsArrow GhcPs)

Illegal linear arrow or multiplicity annotation in GADT record syntax

PsErrInvalidCApiImport 
PsErrMultipleConForNewtype !RdrName !Int 
PsErrUnicodeCharLooksLike 

Fields

  • Char

    the problematic character

  • Char

    the character it looks like

  • String

    the name of the character that it looks like

Instances

Instances details
Generic PsMessage 
Instance details

Defined in GHC.Parser.Errors.Types

Associated Types

type Rep PsMessage :: Type -> Type #

type Rep PsMessage 
Instance details

Defined in GHC.Parser.Errors.Types

type Rep PsMessage = D1 ('MetaData "PsMessage" "GHC.Parser.Errors.Types" "ghc" 'False) ((((((C1 ('MetaCons "PsUnknownMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnknownDiagnostic)) :+: (C1 ('MetaCons "PsHeaderMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PsHeaderMessage)) :+: C1 ('MetaCons "PsWarnBidirectionalFormatChars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (PsLoc, Char, String)))))) :+: ((C1 ('MetaCons "PsWarnTab" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word)) :+: C1 ('MetaCons "PsWarnTransitionalLayout" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TransLayoutReason))) :+: (C1 ('MetaCons "PsWarnUnrecognisedPragma" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [String])) :+: C1 ('MetaCons "PsWarnMisplacedPragma" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FileHeaderPragmaType))))) :+: ((C1 ('MetaCons "PsWarnHaddockInvalidPos" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PsWarnHaddockIgnoreMulti" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsWarnStarBinder" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PsWarnStarIsType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsWarnImportPreQualified" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsWarnOperatorWhitespaceExtConflict" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OperatorWhitespaceSymbol)) :+: C1 ('MetaCons "PsWarnOperatorWhitespace" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FastString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OperatorWhitespaceOccurrence)))))) :+: (((C1 ('MetaCons "PsErrLambdaCase" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PsErrEmptyLambda" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrNumUnderscores" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NumUnderscoreReason)))) :+: ((C1 ('MetaCons "PsErrPrimStringInvalidChar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrMissingBlock" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrLexer" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LexErr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LexErrKind)) :+: C1 ('MetaCons "PsErrSuffixAT" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "PsErrParse" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PsErrParseDetails)) :+: C1 ('MetaCons "PsErrCmmLexer" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrUnsupportedBoxedSumExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SumOrTuple (HsExpr GhcPs)))) :+: C1 ('MetaCons "PsErrUnsupportedBoxedSumPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SumOrTuple (PatBuilder GhcPs)))))) :+: ((C1 ('MetaCons "PsErrUnexpectedQualifiedConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "PsErrTupleSectionInPat" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrIllegalBangPattern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Pat GhcPs))) :+: C1 ('MetaCons "PsErrOpFewArgs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StarIsType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName))))))) :+: ((((C1 ('MetaCons "PsErrImportQualifiedTwice" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PsErrImportPostQualified" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrIllegalExplicitNamespace" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PsErrVarForTyCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "PsErrIllegalPatSynExport" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrMalformedEntityString" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrDotsInRecordUpdate" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "PsErrPrecedenceOutOfRange" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int)) :+: (C1 ('MetaCons "PsErrOverloadedRecordDotInvalid" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrOverloadedRecordUpdateNotEnabled" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PsErrOverloadedRecordUpdateNoQualifiedFields" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrInvalidDataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs)))) :+: (C1 ('MetaCons "PsErrInvalidInfixDataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs)))) :+: C1 ('MetaCons "PsErrIllegalPromotionQuoteDataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)))))) :+: (((C1 ('MetaCons "PsErrUnpackDataCon" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PsErrUnexpectedKindAppInDataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataConBuilder) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs))) :+: C1 ('MetaCons "PsErrInvalidRecordCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PatBuilder GhcPs))))) :+: ((C1 ('MetaCons "PsErrIllegalUnboxedStringInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsLit GhcPs))) :+: C1 ('MetaCons "PsErrIllegalUnboxedFloatingLitInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsLit GhcPs)))) :+: (C1 ('MetaCons "PsErrDoNotationInPat" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrIfThenElseInPat" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "PsErrLambdaCaseInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LamCaseVariant)) :+: C1 ('MetaCons "PsErrCaseInPat" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrLetInPat" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrLambdaInPat" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PsErrArrowExprInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs))) :+: C1 ('MetaCons "PsErrArrowCmdInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsCmd GhcPs)))) :+: (C1 ('MetaCons "PsErrArrowCmdInExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsCmd GhcPs))) :+: C1 ('MetaCons "PsErrViewPatInExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))))))))) :+: (((((C1 ('MetaCons "PsErrTypeAppWithoutSpace" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: (C1 ('MetaCons "PsErrLazyPatWithoutSpace" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons "PsErrBangPatWithoutSpace" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))))) :+: ((C1 ('MetaCons "PsErrUnallowedPragma" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsPragE GhcPs))) :+: C1 ('MetaCons "PsErrQualifiedDoInCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName))) :+: (C1 ('MetaCons "PsErrInvalidInfixHole" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrSemiColonsInCondExpr" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs)))))))) :+: ((C1 ('MetaCons "PsErrSemiColonsInCondCmd" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsCmd GhcPs)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsCmd GhcPs))))) :+: (C1 ('MetaCons "PsErrAtInPatPos" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrLambdaCmdInFunAppCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))))) :+: ((C1 ('MetaCons "PsErrCaseCmdInFunAppCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))) :+: C1 ('MetaCons "PsErrLambdaCaseCmdInFunAppCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LamCaseVariant) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs)))) :+: (C1 ('MetaCons "PsErrIfCmdInFunAppCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))) :+: C1 ('MetaCons "PsErrLetCmdInFunAppCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))))))) :+: (((C1 ('MetaCons "PsErrDoCmdInFunAppCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))) :+: (C1 ('MetaCons "PsErrDoInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ModuleName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons "PsErrMDoInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ModuleName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))))) :+: ((C1 ('MetaCons "PsErrLambdaInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons "PsErrCaseInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs)))) :+: (C1 ('MetaCons "PsErrLambdaCaseInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LamCaseVariant) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons "PsErrLetInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs)))))) :+: (((C1 ('MetaCons "PsErrIfInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons "PsErrProcInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs)))) :+: (C1 ('MetaCons "PsErrMalformedTyOrClDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsType GhcPs))) :+: C1 ('MetaCons "PsErrIllegalWhereInDataDecl" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PsErrIllegalDataTypeContext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsContext GhcPs))) :+: C1 ('MetaCons "PsErrParseErrorOnInput" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName))) :+: (C1 ('MetaCons "PsErrMalformedDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "PsErrUnexpectedTypeAppInDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsType GhcPs)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)))))))) :+: ((((C1 ('MetaCons "PsErrNotADataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: (C1 ('MetaCons "PsErrRecordSyntaxInPatSynDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LPat GhcPs))) :+: C1 ('MetaCons "PsErrEmptyWhereInPatSynDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)))) :+: ((C1 ('MetaCons "PsErrInvalidWhereBindInPatSynDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsDecl GhcPs))) :+: C1 ('MetaCons "PsErrNoSingleWhereBindInPatSynDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsDecl GhcPs)))) :+: (C1 ('MetaCons "PsErrDeclSpliceNotAtTopLevel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SpliceDecl GhcPs))) :+: C1 ('MetaCons "PsErrInferredTypeVarNotAllowed" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "PsErrMultipleNamesInStandaloneKindSignature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LIdP GhcPs])) :+: C1 ('MetaCons "PsErrIllegalImportBundleForm" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrIllegalRoleName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FastString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Role])) :+: C1 ('MetaCons "PsErrInvalidTypeSignature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))))) :+: ((C1 ('MetaCons "PsErrUnexpectedTypeInDecl" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsType GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LHsTypeArg GhcPs]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)))) :+: C1 ('MetaCons "PsErrExpectedHyphen" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrSpaceInSCC" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrEmptyDoubleQuotes" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)))))) :+: (((C1 ('MetaCons "PsErrInvalidPackageName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FastString)) :+: (C1 ('MetaCons "PsErrInvalidRuleActivationMarker" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrLinearFunction" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PsErrMultiWayIf" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrExplicitForall" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))) :+: (C1 ('MetaCons "PsErrIllegalQualifiedDo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)) :+: C1 ('MetaCons "PsErrCmmParser" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CmmParserError))))) :+: (((C1 ('MetaCons "PsErrIllegalTraditionalRecordSyntax" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)) :+: C1 ('MetaCons "PsErrParseErrorInCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc))) :+: (C1 ('MetaCons "PsErrInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PatBuilder GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PsErrInPatDetails)) :+: C1 ('MetaCons "PsErrParseRightOpSectionInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PatBuilder GhcPs))))) :+: ((C1 ('MetaCons "PsErrIllegalGadtRecordMultiplicity" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsArrow GhcPs))) :+: C1 ('MetaCons "PsErrInvalidCApiImport" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrMultipleConForNewtype" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int)) :+: C1 ('MetaCons "PsErrUnicodeCharLooksLike" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))))))))
type DiagnosticOpts PsMessage 
Instance details

Defined in GHC.Parser.Errors.Ppr

data PsHeaderMessage #

Constructors

PsErrParseLanguagePragma 
PsErrUnsupportedExt !String ![String] 
PsErrParseOptionsPragma !String 
PsErrUnknownOptionsPragma !String

PsErrUnsupportedOptionsPragma is an error that occurs when an unknown OPTIONS_GHC pragma is supplied is found.

Example(s): {-# OPTIONS_GHC foo #-}

Test case(s):

testssafeHaskellflags/SafeFlags28 testssafeHaskellflags/SafeFlags19 testssafeHaskellflags/SafeFlags29 testsparsershould_fail/T19923c testsparsershould_fail/T19923b testsparsershould_fail/readFail044 testsdriverT2499

Instances

Instances details
Generic PsHeaderMessage 
Instance details

Defined in GHC.Parser.Errors.Types

Associated Types

type Rep PsHeaderMessage :: Type -> Type #

type Rep PsHeaderMessage 
Instance details

Defined in GHC.Parser.Errors.Types

type Rep PsHeaderMessage = D1 ('MetaData "PsHeaderMessage" "GHC.Parser.Errors.Types" "ghc" 'False) ((C1 ('MetaCons "PsErrParseLanguagePragma" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrUnsupportedExt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [String]))) :+: (C1 ('MetaCons "PsErrParseOptionsPragma" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "PsErrUnknownOptionsPragma" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String))))

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

Instances

Instances details
ContainsDynFlags HscEnv 
Instance details

Defined in GHC.Driver.Env.Types

data CoreM a #

The monad used by Core-to-Core passes to register simplification statistics. Also used to have common state (in the form of UniqueSupply) for generating Uniques.

Instances

Instances details
MonadIO CoreM 
Instance details

Defined in GHC.Core.Opt.Monad

Methods

liftIO :: IO a -> CoreM a #

Alternative CoreM 
Instance details

Defined in GHC.Core.Opt.Monad

Methods

empty :: CoreM a #

(<|>) :: CoreM a -> CoreM a -> CoreM a #

some :: CoreM a -> CoreM [a] #

many :: CoreM a -> CoreM [a] #

Applicative CoreM 
Instance details

Defined in GHC.Core.Opt.Monad

Methods

pure :: a -> CoreM a #

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

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

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

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

Functor CoreM 
Instance details

Defined in GHC.Core.Opt.Monad

Methods

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

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

Monad CoreM 
Instance details

Defined in GHC.Core.Opt.Monad

Methods

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

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

return :: a -> CoreM a #

MonadPlus CoreM 
Instance details

Defined in GHC.Core.Opt.Monad

Methods

mzero :: CoreM a #

mplus :: CoreM a -> CoreM a -> CoreM a #

HasDynFlags CoreM 
Instance details

Defined in GHC.Core.Opt.Monad

MonadUnique CoreM 
Instance details

Defined in GHC.Core.Opt.Monad

HasModule CoreM 
Instance details

Defined in GHC.Core.Opt.Monad

HasLogger CoreM 
Instance details

Defined in GHC.Core.Opt.Monad

data MetaResult #

data constructors not exported to ensure correct result type

data MetaRequest #

The supported metaprogramming result types

type CorePluginPass = ModGuts -> CoreM ModGuts #

A description of the plugin pass itself

data HoleFitPluginR #

HoleFitPluginR adds a TcRef to hole fit plugins so that plugins can track internal state. Note the existential quantification, ensuring that the state cannot be modified from outside the plugin.

Constructors

HoleFitPluginR 

Fields

type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit] #

A plugin for modifying hole fits *after* they've been found.

type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate] #

A plugin for modifying the candidate hole fits *before* they're checked.

data TypedHole #

Constructors

TypedHole 

Fields

Instances

Instances details
Outputable TypedHole 
Instance details

Defined in GHC.Tc.Errors.Hole.FitTypes

Methods

ppr :: TypedHole -> SDoc #

data ExternalPlugin #

External plugin loaded directly from a library without loading module interfaces

Constructors

ExternalPlugin 

Fields

data PluginWithArgs #

Constructors

PluginWithArgs 

Fields

data ParsedResult #

Result of running the parser and the parser plugin

Constructors

ParsedResult 

Fields

data PsMessages #

Errors and warnings produced by the parser

type CommandLineOption = String #

Command line options gathered from the -PModule.Name:stuff syntax are given to you as this type

data TcRnExprMode #

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

Constructors

TM_Inst

Instantiate inferred quantifiers only (:type)

TM_Default

Instantiate all quantifiers, and do eager defaulting (:type +d)

data Serialized #

Represents a serialized value of a particular type. Attempts can be made to deserialize it at certain types

Constructors

Serialized TypeRep [Word8] 

Instances

Instances details
Outputable Serialized 
Instance details

Defined in GHC.Utils.Outputable

Methods

ppr :: Serialized -> SDoc #

pattern ManyTy :: Mult #

pattern OneTy :: Mult #

try :: Exception e => IO a -> IO (Either e a) #

Similar to catch, but returns an Either result which is (Right a) if no exception of type e was raised, or (Left ex) if an exception of type e was raised and its value is ex. If any other type of exception is raised then it will be propagated up to the next enclosing exception handler.

 try a = catch (Right `liftM` a) (return . Left)

count :: (a -> Bool) -> [a] -> Int #

double :: IsLine doc => Double -> doc #

space :: IsLine doc => doc #

lengthAtLeast :: [a] -> Int -> Bool #

(lengthAtLeast xs n) = (length xs >= n)

throwTo :: Exception e => ThreadId -> e -> IO () #

throwTo raises an arbitrary exception in the target thread (GHC only).

Exception delivery synchronizes between the source and target thread: throwTo does not return until the exception has been raised in the target thread. The calling thread can thus be certain that the target thread has received the exception. Exception delivery is also atomic with respect to other exceptions. Atomicity is a useful property to have when dealing with race conditions: e.g. if there are two threads that can kill each other, it is guaranteed that only one of the threads will get to kill the other.

Whatever work the target thread was doing when the exception was raised is not lost: the computation is suspended until required by another thread.

If the target thread is currently making a foreign call, then the exception will not be raised (and hence throwTo will not return) until the call has completed. This is the case regardless of whether the call is inside a mask or not. However, in GHC a foreign call can be annotated as interruptible, in which case a throwTo will cause the RTS to attempt to cause the call to return; see the GHC documentation for more details.

Important note: the behaviour of throwTo differs from that described in the paper "Asynchronous exceptions in Haskell" (http://research.microsoft.com/~simonpj/Papers/asynch-exns.htm). In the paper, throwTo is non-blocking; but the library implementation adopts a more synchronous design in which throwTo does not return until the exception is received by the target thread. The trade-off is discussed in Section 9 of the paper. Like any blocking operation, throwTo is therefore interruptible (see Section 5.3 of the paper). Unlike other interruptible operations, however, throwTo is always interruptible, even if it does not actually block.

There is no guarantee that the exception will be delivered promptly, although the runtime will endeavour to ensure that arbitrary delays don't occur. In GHC, an exception can only be raised when a thread reaches a safe point, where a safe point is where memory allocation occurs. Some loops do not perform any memory allocation inside the loop and therefore cannot be interrupted by a throwTo.

If the target of throwTo is the calling thread, then the behaviour is the same as throwIO, except that the exception is thrown as an asynchronous exception. This means that if there is an enclosing pure computation, which would be the case if the current IO operation is inside unsafePerformIO or unsafeInterleaveIO, that computation is not permanently replaced by the exception, but is suspended as if it had received an asynchronous exception.

Note that if throwTo is called with the current thread as the target, the exception will be thrown even if the thread is currently inside mask or uninterruptibleMask.

liftIO :: MonadIO m => IO a -> m a #

Lift a computation from the IO monad. This allows us to run IO computations in any monadic stack, so long as it supports these kinds of operations (i.e. IO is the base monad for the stack).

Example

Expand
import Control.Monad.Trans.State -- from the "transformers" library

printState :: Show s => StateT s IO ()
printState = do
  state <- get
  liftIO $ print state

Had we omitted liftIO, we would have ended up with this error:

• Couldn't match type ‘IO’ with ‘StateT s IO’
 Expected type: StateT s IO ()
   Actual type: IO ()

The important part here is the mismatch between StateT s IO () and IO ().

Luckily, we know of a function that takes an IO a and returns an (m a): liftIO, enabling us to run the program and see the expected results:

> evalStateT printState "hello"
"hello"

> evalStateT printState 3
3

srcLocFile :: RealSrcLoc -> FastString #

Gives the filename of the RealSrcLoc

foldl1' :: HasCallStack => (a -> a -> a) -> [a] -> a #

A strict version of foldl1.

infinity :: IntWithInf #

A representation of infinity

applyWhen :: Bool -> (a -> a) -> a -> a #

Apply a function iff some condition is met.

parens :: IsLine doc => doc -> doc #

funResultTy :: HasDebugCallStack => Type -> Type #

Extract the function result type and panic if that is not possible

mkFunTy :: HasDebugCallStack => FunTyFlag -> Mult -> Type -> Type -> Type infixr 3 #

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

singleton :: a -> [a] #

getFileHash :: FilePath -> IO Fingerprint #

Computes the hash of a given file. This function loops over the handle, running in constant memory.

Since: base-4.7.0.0

sortWith :: Ord b => (a -> b) -> [a] -> [a] #

The sortWith function sorts a list of elements using the user supplied function to project something out of each element

In general if the user supplied function is expensive to compute then you should probably be using sortOn, as it only needs to compute it once for each element. sortWith, on the other hand must compute the mapping function for every comparison that it performs.

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

mkNoRepType :: String -> DataType #

Constructs a non-representation for a non-representable type

spanEnd :: (a -> Bool) -> [a] -> ([a], [a]) #

spanEnd p l == reverse (span p (reverse l)). The first list returns actually comes after the second list (when you look at the input list).

split :: Char -> String -> [String] #

compareLength :: [a] -> [b] -> Ordering #

unzipWith :: (a -> b -> c) -> [(a, b)] -> [c] #

pprWithUnitState :: UnitState -> SDoc -> SDoc #

Print unit-ids with UnitInfo found in the given UnitState

mkTyConTy :: TyCon -> Type #

(mkTyConTy tc) returns (TyConApp tc []) but arranges to share that TyConApp among all calls See Note [Sharing nullary TyConApps] So it's just an alias for tyConNullaryTy!

mkCoreApps infixl 4 #

Arguments

:: CoreExpr

function

-> [CoreExpr]

arguments

-> CoreExpr 

Construct an expression which represents the application of a number of expressions to another. The leftmost expression in the list is applied first

mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr #

Construct an expression which represents the application of a number of expressions to that of a data constructor expression. The leftmost expression in the list is applied first

mkIntExpr :: Platform -> Integer -> CoreExpr #

Create a CoreExpr which will evaluate to the given Int

mkWordExpr :: Platform -> Integer -> CoreExpr #

Create a CoreExpr which will evaluate to a Word with the given value

mkCharExpr :: Char -> CoreExpr #

Create a CoreExpr which will evaluate to the given Char

mkStringExpr :: MonadThings m => String -> m CoreExpr #

Create a CoreExpr which will evaluate to the given String

mkFloatExpr :: Float -> CoreExpr #

Create a CoreExpr which will evaluate to the given Float

mkDoubleExpr :: Double -> CoreExpr #

Create a CoreExpr which will evaluate to the given Double

mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr #

Create a lambda where the given expression has a number of variables bound over it. The leftmost binder is that bound by the outermost lambda in the result

mkCoreLets :: [CoreBind] -> CoreExpr -> CoreExpr #

Bind a list of binding groups over an expression. The leftmost binding group becomes the outermost group in the resulting expression

mkCoreLet :: CoreBind -> CoreExpr -> CoreExpr #

Bind a binding group over an expression, using a let or case as appropriate (see GHC.Core)

typeLevity_maybe :: HasDebugCallStack => Type -> Maybe Levity #

Tries to compute the PromDataConInfo of the given type. Returns either a definite PromDataConInfo, or Nothing if we aren't sure (e.g. the type is representation-polymorphic).

Panics if the kind does not have the shape TYPE r.

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

dropList :: [b] -> [a] -> [a] #

panic :: HasCallStack => String -> a #

Panics and asserts.

sorry :: HasCallStack => String -> a #

Panics and asserts.

pgmError :: HasCallStack => String -> a #

Panics and asserts.

assertPanic :: String -> Int -> a #

Throw a failed assertion exception for a given filename and line number.

nTimes :: Int -> (a -> a) -> a -> a #

Apply a function n times to a given value.

const2 :: a -> b -> c -> a #

fstOf3 :: (a, b, c) -> a #

sndOf3 :: (a, b, c) -> b #

thdOf3 :: (a, b, c) -> c #

fst3 :: (a -> d) -> (a, b, c) -> (d, b, c) #

snd3 :: (b -> d) -> (a, b, c) -> (a, d, c) #

third3 :: (c -> d) -> (a, b, c) -> (a, b, d) #

uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d #

filterOut :: (a -> Bool) -> [a] -> [a] #

Like filter, only it reverses the sense of the test

partitionWith :: (a -> Either b c) -> [a] -> ([b], [c]) #

Uses a function to determine which of two output lists an input element should join

chkAppend :: [a] -> [a] -> [a] #

zipEqual :: HasDebugCallStack => String -> [a] -> [b] -> [(a, b)] #

zipWithEqual :: HasDebugCallStack => String -> (a -> b -> c) -> [a] -> [b] -> [c] #

zipWith3Equal :: HasDebugCallStack => String -> (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] #

zipWith4Equal :: HasDebugCallStack => String -> (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e] #

filterByList :: [Bool] -> [a] -> [a] #

filterByList takes a list of Bools and a list of some elements and filters out these elements for which the corresponding value in the list of Bools is False. This function does not check whether the lists have equal length.

filterByLists :: [Bool] -> [a] -> [a] -> [a] #

filterByLists takes a list of Bools and two lists as input, and outputs a new list consisting of elements from the last two input lists. For each Bool in the list, if it is True, then it takes an element from the former list. If it is False, it takes an element from the latter list. The elements taken correspond to the index of the Bool in its list. For example:

filterByLists [True, False, True, False] "abcd" "wxyz" = "axcz"

This function does not check whether the lists have equal length.

partitionByList :: [Bool] -> [a] -> ([a], [a]) #

partitionByList takes a list of Bools and a list of some elements and partitions the list according to the list of Bools. Elements corresponding to True go to the left; elements corresponding to False go to the right. For example, partitionByList [True, False, True] [1,2,3] == ([1,3], [2]) This function does not check whether the lists have equal length; when one list runs out, the function stops.

stretchZipWith :: (a -> Bool) -> b -> (a -> b -> c) -> [a] -> [b] -> [c] #

stretchZipWith p z f xs ys stretches ys by inserting z in the places where p returns True

mapFst :: Functor f => (a -> c) -> f (a, b) -> f (c, b) #

mapSnd :: Functor f => (b -> c) -> f (a, b) -> f (a, c) #

mapAndUnzip :: (a -> (b, c)) -> [a] -> ([b], [c]) #

mapAndUnzip3 :: (a -> (b, c, d)) -> [a] -> ([b], [c], [d]) #

zipWithAndUnzip :: (a -> b -> (c, d)) -> [a] -> [b] -> ([c], [d]) #

zipAndUnzip :: [a] -> [b] -> ([a], [b]) #

This has the effect of making the two lists have equal length by dropping the tail of the longer one.

atLength :: ([a] -> b) -> b -> [a] -> Int -> b #

atLength atLen atEnd ls n unravels list ls to position n. Precisely:

 atLength atLenPred atEndPred ls n
  | n < 0         = atLenPred ls
  | length ls < n = atEndPred (n - length ls)
  | otherwise     = atLenPred (drop n ls)

lengthExceeds :: [a] -> Int -> Bool #

(lengthExceeds xs n) = (length xs > n)

lengthIs :: [a] -> Int -> Bool #

(lengthIs xs n) = (length xs == n)

lengthIsNot :: [a] -> Int -> Bool #

(lengthIsNot xs n) = (length xs /= n)

lengthAtMost :: [a] -> Int -> Bool #

(lengthAtMost xs n) = (length xs <= n)

lengthLessThan :: [a] -> Int -> Bool #

(lengthLessThan xs n) == (length xs < n)

equalLength :: [a] -> [b] -> Bool #

True if length xs == length ys

leLength :: [a] -> [b] -> Bool #

True if length xs <= length ys

ltLength :: [a] -> [b] -> Bool #

True if length xs < length ys

isSingleton :: [a] -> Bool #

notNull :: Foldable f => f a -> Bool #

only :: [a] -> a #

Utility function to go from a singleton list to it's element.

Wether or not the argument is a singleton list is only checked in debug builds.

expectOnly :: HasCallStack => String -> [a] -> a #

Extract the single element of a list and panic with the given message if there are more elements or the list was empty. Like expectJust, but for lists.

chunkList :: Int -> [a] -> [[a]] #

Split a list into chunks of n elements

holes :: [a] -> [(a, [a])] #

Compute all the ways of removing a single element from a list.

holes [1,2,3] = [(1, [2,3]), (2, [1,3]), (3, [1,2])]

changeLast :: [a] -> a -> [a] #

Replace the last element of a list with another element.

mapLastM :: Functor f => (a -> f a) -> NonEmpty a -> f (NonEmpty a) #

Apply an effectful function to the last list element.

whenNonEmpty :: Applicative m => [a] -> (NonEmpty a -> m ()) -> m () #

mergeListsBy :: (a -> a -> Ordering) -> [[a]] -> [a] #

Merge an unsorted list of sorted lists, for example:

mergeListsBy compare [ [2,5,15], [1,10,100] ] = [1,2,5,10,15,100]

\( O(n \log{} k) \)

isSortedBy :: (a -> a -> Ordering) -> [a] -> Bool #

minWith :: Ord b => (a -> b) -> [a] -> a #

nubSort :: Ord a => [a] -> [a] #

ordNub :: Ord a => [a] -> [a] #

Remove duplicates but keep elements in order. O(n * log n)

ordNubOn :: Ord b => (a -> b) -> [a] -> [a] #

Remove duplicates but keep elements in order. O(n * log n)

transitiveClosure :: (a -> [a]) -> (a -> a -> Bool) -> [a] -> [a] #

foldl2 :: (acc -> a -> b -> acc) -> acc -> [a] -> [b] -> acc #

all2 :: (a -> b -> Bool) -> [a] -> [b] -> Bool #

countWhile :: (a -> Bool) -> [a] -> Int #

takeList :: [b] -> [a] -> [a] #

splitAtList :: [b] -> [a] -> ([a], [a]) #

Given two lists xs and ys, return `splitAt (length xs) ys`.

dropTail :: Int -> [a] -> [a] #

drop from the end of a list

dropWhileEndLE :: (a -> Bool) -> [a] -> [a] #

last2 :: [a] -> Maybe (a, a) #

Get the last two elements in a list.

lastMaybe :: [a] -> Maybe a #

onJust :: b -> Maybe a -> (a -> b) -> b #

onJust x m f applies f to the value inside the Just or returns the default.

snocView :: [a] -> Maybe ([a], a) #

Split a list into its last element and the initial part of the list. snocView xs = Just (init xs, last xs) for non-empty lists. snocView xs = Nothing otherwise. Unless both parts of the result are guaranteed to be used prefer separate calls to last + init. If you are guaranteed to use both, this will be more efficient.

capitalise :: String -> String #

Convert a word to title case by capitalising the first letter

(<&&>) :: Applicative f => f Bool -> f Bool -> f Bool infixr 3 #

(<||>) :: Applicative f => f Bool -> f Bool -> f Bool infixr 2 #

fuzzyLookup :: String -> [(String, a)] -> [a] #

Search for possible matches to the users input in the given list, returning a small number of ranked results

seqList :: [a] -> b -> b #

strictMap :: (a -> b) -> [a] -> [b] #

strictZipWith :: (a -> b -> c) -> [a] -> [b] -> [c] #

strictZipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] #

exactLog2 :: Integer -> Maybe Integer #

Determine the $log_2$ of exact powers of 2

readSignificandExponentPair :: String -> (Integer, Integer) #

Parse a string into a significand and exponent. A trivial example might be: ghci> readSignificandExponentPair "1E2" (1,2) In a more complex case we might return a exponent different than that which the user wrote. This is needed in order to use a Integer significand. ghci> readSignificandExponentPair "-1.11E5" (-111,3)

readHexSignificandExponentPair :: String -> (Integer, Integer) #

Parse a string into a significand and exponent according to the "Hexadecimal Floats in Haskell" proposal. A trivial example might be: ghci> readHexSignificandExponentPair "0x1p+1" (1,1) Behaves similar to readSignificandExponentPair but the base is 16 and numbers are given in hexadecimal: ghci> readHexSignificandExponentPair "0xAp-4" (10,-4) ghci> readHexSignificandExponentPair "0x1.2p3" (18,-1)

withAtomicRename :: MonadIO m => FilePath -> (FilePath -> m a) -> m a #

hashString :: String -> Int32 #

A sample hash function for Strings. We keep multiplying by the golden ratio and adding. The implementation is:

hashString = foldl' f golden
  where f m c = fromIntegral (ord c) * magic + hashInt32 m
        magic = 0xdeadbeef

Where hashInt32 works just as hashInt shown above.

Knuth argues that repeated multiplication by the golden ratio will minimize gaps in the hash space, and thus it's a good choice for combining together multiple keys to form one.

Here we know that individual characters c are often small, and this produces frequent collisions if we use ord c alone. A particular problem are the shorter low ASCII and ISO-8859-1 character strings. We pre-multiply by a magic twiddle factor to obtain a good distribution. In fact, given the following test:

testp :: Int32 -> Int
testp k = (n - ) . length . group . sort . map hs . take n $ ls
  where ls = [] : [c : l | l <- ls, c <- ['\0'..'\xff']]
        hs = foldl' f golden
        f m c = fromIntegral (ord c) * k + hashInt32 m
        n = 100000

We discover that testp magic = 0.

mapMaybe' :: Foldable f => (a -> Maybe b) -> f a -> [b] #

bytesFS :: FastString -> ByteString #

Gives the Modified UTF-8 encoded bytes corresponding to a FastString

fastStringToByteString :: FastString -> ByteString #

Gives the Modified UTF-8 encoded bytes corresponding to a FastString

zStringTakeN :: Int -> FastZString -> String #

zStringTakeN n = take n . zString but is performed in \(O(\min(n,l))\) rather than \(O(l)\), where \(l\) is the length of the FastZString.

lexicalCompareFS :: FastString -> FastString -> Ordering #

Compare FastString lexically

If you don't care about the lexical ordering, use uniqCompareFS instead.

uniqCompareFS :: FastString -> FastString -> Ordering #

Compare FastString by their Unique (not lexically).

Much cheaper than lexicalCompareFS but non-deterministic!

mkFastStringByteString :: ByteString -> FastString #

Create a FastString by copying an existing ByteString

mkFastStringShortByteString :: ShortByteString -> FastString #

Create a FastString from an existing ShortByteString without copying.

mkFastString :: String -> FastString #

Creates a UTF-8 encoded FastString from a String

mkFastStringByteList :: [Word8] -> FastString #

Creates a FastString from a UTF-8 encoded [Word8]

lengthFS :: FastString -> Int #

Returns the length of the FastString in characters

nullFS :: FastString -> Bool #

Returns True if the FastString is empty

unpackFS :: FastString -> String #

Lazily unpacks and decodes the FastString

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.

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.

mkPtrString# :: Addr# -> PtrString #

Wrap an unboxed address into 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.

unpackPtrStringTakeN :: Int -> PtrString -> String #

unpackPtrStringTakeN n = take n . unpackPtrString but is performed in \(O(\min(n,l))\) rather than \(O(l)\), where \(l\) is the length of the PtrString.

lengthPS :: PtrString -> Int #

Return the length of a PtrString

semi :: IsLine doc => doc #

comma :: IsLine doc => doc #

colon :: IsLine doc => doc #

equals :: IsLine doc => doc #

lparen :: IsLine doc => doc #

rparen :: IsLine doc => doc #

lbrack :: IsLine doc => doc #

rbrack :: IsLine doc => doc #

lbrace :: IsLine doc => doc #

rbrace :: IsLine doc => doc #

int :: IsLine doc => Int -> doc #

integer :: IsLine doc => Integer -> doc #

float :: IsLine doc => Float -> doc #

doubleQuotes :: IsLine doc => doc -> doc #

brackets :: IsLine doc => doc -> doc #

braces :: IsLine doc => doc -> doc #

nest :: Int -> SDoc -> SDoc #

Indent SDoc some specified amount

hang #

Arguments

:: SDoc

The header

-> Int

Amount to indent the hung body

-> SDoc

The hung body, indented and placed below the header

-> SDoc 

hangNotEmpty :: SDoc -> Int -> SDoc -> SDoc #

This behaves like hang, but does not indent the second document when the header is empty.

punctuate #

Arguments

:: IsLine doc 
=> doc

The punctuation

-> [doc]

The list that will have punctuation added between every adjacent pair of elements

-> [doc]

Punctuated list

($+$) :: SDoc -> SDoc -> SDoc #

Join two SDoc together vertically

cat :: [SDoc] -> SDoc #

A paragraph-fill combinator. It's much like sep, only it keeps fitting things on one line until it can't fit any more.

fcat :: [SDoc] -> SDoc #

This behaves like fsep, but it uses <> for horizontal composition rather than <+>

noExtField :: NoExtField #

Used when constructing a term with an unused extension point.

dataConCantHappen :: DataConCantHappen -> a #

Eliminate a DataConCantHappen. See Note [Constructor cannot occur].

stableModuleNameCmp :: ModuleName -> ModuleName -> Ordering #

Compares module names lexically, rather than by their Uniques

moduleNameSlashes :: ModuleName -> String #

Returns the string version of the module name, with dots replaced by slashes.

moduleNameColons :: ModuleName -> String #

Returns the string version of the module name, with dots replaced by colons.

alwaysQualifyNames :: QueryQualifyName #

NB: This won't ever show package IDs

defaultErrStyle :: PprStyle #

Default style for error messages, when we don't know NamePprCtx It's a bit of a hack because it doesn't take into account what's in scope Only used for desugarer warnings, and typechecker errors in interface sigs

mkErrStyle :: NamePprCtx -> PprStyle #

Style for printing error messages

defaultSDocContext :: SDocContext #

Default pretty-printing options

pprDeeperList :: ([SDoc] -> SDoc) -> [SDoc] -> SDoc #

Truncate a list that is longer than the current depth.

sdocOption :: (SDocContext -> a) -> (a -> SDoc) -> SDoc #

getPprDebug :: IsOutput doc => (Bool -> doc) -> doc #

Indicate if -dppr-debug mode is enabled

ifPprDebug :: IsOutput doc => doc -> doc -> doc #

Says what to do with and without -dppr-debug

whenPprDebug :: IsOutput doc => doc -> doc #

Says what to do with -dppr-debug; without, return empty

printSDoc :: SDocContext -> Mode -> Handle -> SDoc -> IO () #

The analog of printDoc_ for SDoc, which tries to make sure the terminal doesn't get screwed up by the ANSI color codes if an exception is thrown during pretty-printing.

printSDocLn :: SDocContext -> Mode -> Handle -> SDoc -> IO () #

Like printSDoc but appends an extra newline.

bufLeftRenderSDoc :: SDocContext -> BufHandle -> SDoc -> IO () #

An efficient variant of printSDoc specialized for LeftMode that outputs to a BufHandle.

pprDebugAndThen :: SDocContext -> (String -> a) -> SDoc -> SDoc -> a #

doublePrec :: Int -> Double -> SDoc #

doublePrec p n shows a floating point number n with p digits of precision after the decimal point.

angleBrackets :: IsLine doc => doc -> doc #

cparen :: Bool -> SDoc -> SDoc #

underscore :: IsLine doc => doc #

dot :: IsLine doc => doc #

vbar :: IsLine doc => doc #

ppWhen :: IsOutput doc => Bool -> doc -> doc #

ppUnless :: IsOutput doc => Bool -> doc -> doc #

ppUnlessOption :: IsLine doc => (SDocContext -> Bool) -> doc -> doc #

coloured :: PprColour -> SDoc -> SDoc #

Apply the given colour/style for the argument.

Only takes effect if colours are enabled.

pprModuleName :: IsLine doc => ModuleName -> doc #

pprHsChar :: Char -> SDoc #

Special combinator for showing character literals.

pprHsString :: FastString -> SDoc #

Special combinator for showing string literals.

pprHsBytes :: ByteString -> SDoc #

Special combinator for showing bytestring literals.

pprPrimChar :: Char -> SDoc #

Special combinator for showing unboxed literals.

pprFilePathString :: IsLine doc => FilePath -> doc #

Normalise, escape and render a string representing a path

e.g. "c:\whatever"

pprWithCommas #

Arguments

:: (a -> SDoc)

The pretty printing function to use

-> [a]

The things to be pretty printed

-> SDoc

SDoc where the things have been pretty printed, comma-separated and finally packed into a paragraph.

pprWithBars #

Arguments

:: (a -> SDoc)

The pretty printing function to use

-> [a]

The things to be pretty printed

-> SDoc

SDoc where the things have been pretty printed, bar-separated and finally packed into a paragraph.

interppSP :: Outputable a => [a] -> SDoc #

Returns the separated concatenation of the pretty printed things.

interpp'SP :: Outputable a => [a] -> SDoc #

Returns the comma-separated concatenation of the pretty printed things.

interpp'SP' :: (a -> SDoc) -> [a] -> SDoc #

pprQuotedList :: Outputable a => [a] -> SDoc #

Returns the comma-separated concatenation of the quoted pretty printed things.

[x,y,z]  ==>  `x', `y', `z'

speakNth :: Int -> SDoc #

Converts an integer to a verbal index:

speakNth 1 = text "first"
speakNth 5 = text "fifth"
speakNth 21 = text "21st"

speakN :: Int -> SDoc #

Converts an integer to a verbal multiplicity:

speakN 0 = text "none"
speakN 5 = text "five"
speakN 10 = text "10"

speakNOf :: Int -> SDoc -> SDoc #

Converts an integer and object description to a statement about the multiplicity of those objects:

speakNOf 0 (text "melon") = text "no melons"
speakNOf 1 (text "melon") = text "one melon"
speakNOf 3 (text "melon") = text "three melons"

plural :: [a] -> SDoc #

Determines the pluralisation suffix appropriate for the length of a list:

plural [] = char 's'
plural ["Hello"] = empty
plural ["Hello", "World"] = char 's'

singular :: [a] -> SDoc #

Determines the singular verb suffix appropriate for the length of a list:

singular [] = empty
singular["Hello"] = char 's'
singular ["Hello", "World"] = empty

isOrAre :: [a] -> SDoc #

Determines the form of to be appropriate for the length of a list:

isOrAre [] = text "are"
isOrAre ["Hello"] = text "is"
isOrAre ["Hello", "World"] = text "are"

doOrDoes :: [a] -> SDoc #

Determines the form of to do appropriate for the length of a list:

doOrDoes [] = text "do"
doOrDoes ["Hello"] = text "does"
doOrDoes ["Hello", "World"] = text "do"

itsOrTheir :: [a] -> SDoc #

Determines the form of possessive appropriate for the length of a list:

itsOrTheir [x]   = text "its"
itsOrTheir [x,y] = text "their"
itsOrTheir []    = text "their"  -- probably avoid this

thisOrThese :: [a] -> SDoc #

Determines the form of subject appropriate for the length of a list:

thisOrThese [x]   = text "This"
thisOrThese [x,y] = text "These"
thisOrThese []    = text "These"  -- probably avoid this

hasOrHave :: [a] -> SDoc #

"has" or "have" depending on the length of a list.

showException :: Exception e => e -> String #

Show an exception as a string.

safeShowException :: Exception e => e -> IO String #

Show an exception which can possibly throw other exceptions. Used when displaying exception thrown within TH code.

showGhcExceptionUnsafe :: GhcException -> ShowS #

Append a description of the given exception to this string.

Note that this uses defaultSDocContext, which doesn't use the options set by the user via DynFlags.

showGhcException :: SDocContext -> GhcException -> ShowS #

Append a description of the given exception to this string.

handleGhcException :: ExceptionMonad m => (GhcException -> m a) -> m a -> m a #

pprPanic :: HasCallStack => String -> SDoc -> a #

Throw an exception saying "bug in GHC" with a callstack

panicDoc :: String -> SDoc -> a #

Throw an exception saying "bug in GHC"

sorryDoc :: String -> SDoc -> a #

Throw an exception saying "this isn't finished yet"

pgmErrorDoc :: String -> SDoc -> a #

Throw an exception saying "bug in pgm being compiled" (used for unusual program errors)

tryMost :: IO a -> IO (Either SomeException a) #

Like try, but pass through UserInterrupt and Panic exceptions. Used when we want soft failures when reading interface files, for example. TODO: I'm not entirely sure if this is catching what we really want to catch

withSignalHandlers :: ExceptionMonad m => m a -> m a #

Temporarily install standard signal handlers for catching ^C, which just throw an exception in the current thread.

assertPprPanic :: HasCallStack => SDoc -> a #

Panic with an assertion failure, recording the given file and line number. Should typically be accessed with the ASSERT family of macros

assertPpr :: HasCallStack => Bool -> SDoc -> a -> a #

assertPprM :: (HasCallStack, Monad m) => m Bool -> SDoc -> m () #

coVarDetails :: IdDetails #

Just a synonym for CoVarId. Written separately so it can be exported in the hs-boot file.

vanillaIdInfo :: IdInfo #

Basic IdInfo that carries no useful information whatsoever

idName :: Id -> Name #

mkPrelTyConRepName :: Name -> TyConRepName #

Make a Name for the Typeable representation of the given wired-in type

isUnboxedTupleTyCon :: TyCon -> Bool #

Is this the TyCon for an unboxed tuple?

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.

mkForAllTy :: ForAllTyBinder -> Type -> Type #

Like mkTyCoForAllTy, but does not check the occurrence of the binder See Note [Unused coercion variable in ForAllTy]

emptyUFM :: UniqFM key elt #

isNullUFM :: UniqFM key elt -> Bool #

unitUFM :: Uniquable key => key -> elt -> UniqFM key elt #

unitDirectlyUFM :: Unique -> elt -> UniqFM key elt #

zipToUFM :: Uniquable key => [key] -> [elt] -> UniqFM key elt #

listToUFM :: Uniquable key => [(key, elt)] -> UniqFM key elt #

listToUFM_Directly :: [(Unique, elt)] -> UniqFM key elt #

listToIdentityUFM :: Uniquable key => [key] -> UniqFM key key #

listToUFM_C :: Uniquable key => (elt -> elt -> elt) -> [(key, elt)] -> UniqFM key elt #

addToUFM :: Uniquable key => UniqFM key elt -> key -> elt -> UniqFM key elt #

addListToUFM :: Uniquable key => UniqFM key elt -> [(key, elt)] -> UniqFM key elt #

addListToUFM_Directly :: UniqFM key elt -> [(Unique, elt)] -> UniqFM key elt #

addToUFM_Directly :: UniqFM key elt -> Unique -> elt -> UniqFM key elt #

addToUFM_C :: Uniquable key => (elt -> elt -> elt) -> UniqFM key elt -> key -> elt -> UniqFM key elt #

addToUFM_Acc :: Uniquable key => (elt -> elts -> elts) -> (elt -> elts) -> UniqFM key elts -> key -> elt -> UniqFM key elts #

addToUFM_L :: Uniquable key => (key -> elt -> elt -> elt) -> key -> elt -> UniqFM key elt -> (Maybe elt, UniqFM key elt) #

Add an element, returns previous lookup result and new map. If old element doesn't exist, add the passed element directly, otherwise compute the element to add using the passed function.

alterUFM :: Uniquable key => (Maybe elt -> Maybe elt) -> UniqFM key elt -> key -> UniqFM key elt #

addListToUFM_C :: Uniquable key => (elt -> elt -> elt) -> UniqFM key elt -> [(key, elt)] -> UniqFM key elt #

Add elements to the map, combining existing values with inserted ones using the given function.

adjustUFM :: Uniquable key => (elt -> elt) -> UniqFM key elt -> key -> UniqFM key elt #

adjustUFM_Directly :: (elt -> elt) -> UniqFM key elt -> Unique -> UniqFM key elt #

delFromUFM :: Uniquable key => UniqFM key elt -> key -> UniqFM key elt #

delListFromUFM :: Uniquable key => UniqFM key elt -> [key] -> UniqFM key elt #

delListFromUFM_Directly :: UniqFM key elt -> [Unique] -> UniqFM key elt #

delFromUFM_Directly :: UniqFM key elt -> Unique -> UniqFM key elt #

plusUFM :: UniqFM key elt -> UniqFM key elt -> UniqFM key elt #

plusUFM_C :: (elt -> elt -> elt) -> UniqFM key elt -> UniqFM key elt -> UniqFM key elt #

plusUFM_CD :: (elta -> eltb -> eltc) -> UniqFM key elta -> elta -> UniqFM key eltb -> eltb -> UniqFM key eltc #

`plusUFM_CD f m1 d1 m2 d2` merges the maps using f as the combinding function and d1 resp. d2 as the default value if there is no entry in m1 reps. m2. The domain is the union of the domains of m1 and m2.

IMPORTANT NOTE: This function strictly applies the modification function and forces the result unlike most the other functions in this module.

Representative example:

plusUFM_CD f {A: 1, B: 2} 23 {B: 3, C: 4} 42
   == {A: f 1 42, B: f 2 3, C: f 23 4 }

plusUFM_CD2 :: (Maybe elta -> Maybe eltb -> eltc) -> UniqFM key elta -> UniqFM key eltb -> UniqFM key eltc #

`plusUFM_CD2 f m1 m2` merges the maps using f as the combining function. Unlike plusUFM_CD, a missing value is not defaulted: it is instead passed as Nothing to f. f can never have both its arguments be Nothing.

IMPORTANT NOTE: This function strictly applies the modification function and forces the result.

`plusUFM_CD2 f m1 m2` is the same as `plusUFM_CD f (mapUFM Just m1) Nothing (mapUFM Just m2) Nothing`.

mergeUFM :: (elta -> eltb -> Maybe eltc) -> (UniqFM key elta -> UniqFM key eltc) -> (UniqFM key eltb -> UniqFM key eltc) -> UniqFM key elta -> UniqFM key eltb -> UniqFM key eltc #

plusMaybeUFM_C :: (elt -> elt -> Maybe elt) -> UniqFM key elt -> UniqFM key elt -> UniqFM key elt #

plusUFMList :: [UniqFM key elt] -> UniqFM key elt #

sequenceUFMList :: [UniqFM key elt] -> UniqFM key [elt] #

minusUFM :: UniqFM key elt1 -> UniqFM key elt2 -> UniqFM key elt1 #

minusUFM_C :: (elt1 -> elt2 -> Maybe elt1) -> UniqFM key elt1 -> UniqFM key elt2 -> UniqFM key elt1 #

minusUFC_C f map1 map2 returns map1, except that every mapping key |-> value1 in map1 that shares a key with a mapping key |-> value2 in map2 is altered by f: value1 is replaced by f value1 value2, where Just means that the new value is used and Nothing means that the mapping is deleted.

intersectUFM :: UniqFM key elt1 -> UniqFM key elt2 -> UniqFM key elt1 #

intersectUFM_C :: (elt1 -> elt2 -> elt3) -> UniqFM key elt1 -> UniqFM key elt2 -> UniqFM key elt3 #

disjointUFM :: UniqFM key elt1 -> UniqFM key elt2 -> Bool #

foldUFM :: (elt -> a -> a) -> a -> UniqFM key elt -> a #

mapUFM :: (elt1 -> elt2) -> UniqFM key elt1 -> UniqFM key elt2 #

mapMaybeUFM :: (elt1 -> Maybe elt2) -> UniqFM key elt1 -> UniqFM key elt2 #

mapUFM_Directly :: (Unique -> elt1 -> elt2) -> UniqFM key elt1 -> UniqFM key elt2 #

filterUFM :: (elt -> Bool) -> UniqFM key elt -> UniqFM key elt #

filterUFM_Directly :: (Unique -> elt -> Bool) -> UniqFM key elt -> UniqFM key elt #

partitionUFM :: (elt -> Bool) -> UniqFM key elt -> (UniqFM key elt, UniqFM key elt) #

sizeUFM :: UniqFM key elt -> Int #

elemUFM :: Uniquable key => key -> UniqFM key elt -> Bool #

lookupUFM :: Uniquable key => UniqFM key elt -> key -> Maybe elt #

lookupUFM_Directly :: UniqFM key elt -> Unique -> Maybe elt #

lookupWithDefaultUFM :: Uniquable key => UniqFM key elt -> elt -> key -> elt #

lookupWithDefaultUFM_Directly :: UniqFM key elt -> elt -> Unique -> elt #

anyUFM :: (elt -> Bool) -> UniqFM key elt -> Bool #

allUFM :: (elt -> Bool) -> UniqFM key elt -> Bool #

seqEltsUFM :: (elt -> ()) -> UniqFM key elt -> () #

nonDetEltsUFM :: UniqFM key elt -> [elt] #

nonDetKeysUFM :: UniqFM key elt -> [Unique] #

nonDetStrictFoldUFM :: (elt -> a -> a) -> a -> UniqFM key elt -> a #

nonDetStrictFoldUFM_DirectlyM :: Monad m => (Unique -> b -> elt -> m b) -> b -> UniqFM key elt -> m b #

In essence foldM See Note [Deterministic UniqFM] to learn about nondeterminism. If you use this please provide a justification why it doesn't introduce nondeterminism.

nonDetStrictFoldUFM_Directly :: (Unique -> elt -> a -> a) -> a -> UniqFM key elt -> a #

nonDetUFMToList :: UniqFM key elt -> [(Unique, elt)] #

ufmToIntMap :: UniqFM key elt -> IntMap elt #

unsafeIntMapToUFM :: IntMap elt -> UniqFM key elt #

unsafeCastUFMKey :: UniqFM key1 elt -> UniqFM key2 elt #

Cast the key domain of a UniqFM.

As long as the domains don't overlap in their uniques this is safe.

equalKeysUFM :: UniqFM key a -> UniqFM key b -> Bool #

pprUniqFM :: (a -> SDoc) -> UniqFM key a -> SDoc #

pprUFM #

Arguments

:: UniqFM key a

The things to be pretty printed

-> ([a] -> SDoc)

The pretty printing function to use on the elements

-> SDoc

SDoc where the things have been pretty printed

Pretty-print a non-deterministic set. The order of variables is non-deterministic and for pretty-printing that shouldn't be a problem. Having this function helps contain the non-determinism created with nonDetEltsUFM.

pprUFMWithKeys #

Arguments

:: UniqFM key a

The things to be pretty printed

-> ([(Unique, a)] -> SDoc)

The pretty printing function to use on the elements

-> SDoc

SDoc where the things have been pretty printed

Pretty-print a non-deterministic set. The order of variables is non-deterministic and for pretty-printing that shouldn't be a problem. Having this function helps contain the non-determinism created with nonDetUFMToList.

pluralUFM :: UniqFM key a -> SDoc #

Determines the pluralisation suffix appropriate for the length of a set in the same way that plural from Outputable does for lists.

insertList :: Ord key => [(key, elt)] -> Map key elt -> Map key elt #

insertListWith :: Ord key => (elt -> elt -> elt) -> [(key, elt)] -> Map key elt -> Map key elt #

deleteList :: Ord key => [key] -> Map key elt -> Map key elt #

foldRight :: (elt -> a -> a) -> a -> Map key elt -> a #

foldRightWithKey :: (key -> elt -> a -> a) -> a -> Map key elt -> a #

mkSplitUniqSupply :: Char -> IO UniqSupply #

Create a unique supply out of thin air. The "mask" (Char) supplied is purely cosmetic, making it easier to figure out where a Unique was born. See Note [Uniques and masks].

The payload part of the Uniques allocated from this UniqSupply are guaranteed distinct wrt all other supplies, regardless of their "mask". This is achieved by allocating the payload part from a single source of Uniques, namely genSym, shared across all UniqSupply's.

initUniqSupply :: Word -> Int -> IO () #

splitUniqSupply :: UniqSupply -> (UniqSupply, UniqSupply) #

Build two UniqSupply from a single one, each of which can supply its own Unique.

listSplitUniqSupply :: UniqSupply -> [UniqSupply] #

Create an infinite list of UniqSupply from a single one

uniqFromSupply :: UniqSupply -> Unique #

Obtain the Unique from this particular UniqSupply

uniqsFromSupply :: UniqSupply -> [Unique] #

Obtain an infinite list of Unique that can be generated by constant splitting of the supply

takeUniqFromSupply :: UniqSupply -> (Unique, UniqSupply) #

Obtain the Unique from this particular UniqSupply, and a new supply

initUs :: UniqSupply -> UniqSM a -> (a, UniqSupply) #

Run the UniqSM action, returning the final UniqSupply

initUs_ :: UniqSupply -> UniqSM a -> a #

Run the UniqSM action, discarding the final UniqSupply

leftmostColumn :: Int #

Indentation level is 1-indexed, so the leftmost column is 1.

noSrcLoc :: SrcLoc #

Built-in "bad" RealSrcLoc values for particular locations

generatedSrcLoc :: SrcLoc #

Built-in "bad" RealSrcLoc values for particular locations

interactiveSrcLoc :: SrcLoc #

Built-in "bad" RealSrcLoc values for particular locations

mkGeneralSrcLoc :: FastString -> SrcLoc #

Creates a "bad" RealSrcLoc that has no detailed information about its location

srcLocLine :: RealSrcLoc -> Int #

Raises an error when used on a "bad" RealSrcLoc

srcLocCol :: RealSrcLoc -> Int #

Raises an error when used on a "bad" RealSrcLoc

advanceSrcLoc :: RealSrcLoc -> Char -> RealSrcLoc #

Move the RealSrcLoc 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

noSrcSpan :: SrcSpan #

Built-in "bad" SrcSpans for common sources of location uncertainty

wiredInSrcSpan :: SrcSpan #

Built-in "bad" SrcSpans for common sources of location uncertainty

interactiveSrcSpan :: SrcSpan #

Built-in "bad" SrcSpans for common sources of location uncertainty

generatedSrcSpan :: SrcSpan #

Built-in "bad" SrcSpans for common sources of location uncertainty

mkGeneralSrcSpan :: FastString -> SrcSpan #

Create a "bad" SrcSpan that has not location information

srcLocSpan :: SrcLoc -> SrcSpan #

Create a SrcSpan corresponding to a single point

mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan #

Create a SrcSpan between two points in a file

mkSrcSpan :: SrcLoc -> SrcLoc -> SrcSpan #

Create a SrcSpan between two points in a file

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.

combineRealSrcSpans :: RealSrcSpan -> RealSrcSpan -> RealSrcSpan #

Combines two SrcSpan into one that spans at least all the characters within both spans. Assumes the "file" part is the same in both inputs

srcSpanFirstCharacter :: SrcSpan -> SrcSpan #

Convert a SrcSpan into one that represents only its first character

isGoodSrcSpan :: SrcSpan -> Bool #

Test if a SrcSpan is "good", i.e. has precise location information

isOneLineSpan :: SrcSpan -> Bool #

True if the span is known to straddle only one line. For "bad" SrcSpan, it returns False

isZeroWidthSpan :: SrcSpan -> Bool #

True if the span has a width of zero, as returned for "virtual" semicolons in the lexer. For "bad" SrcSpan, it returns False

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.

srcSpanStart :: SrcSpan -> SrcLoc #

Returns the location at the start of the SrcSpan or a "bad" SrcSpan if that is unavailable

srcSpanEnd :: SrcSpan -> SrcLoc #

Returns the location at the end of the SrcSpan or a "bad" SrcSpan if that is unavailable

srcSpanFileName_maybe :: SrcSpan -> Maybe FastString #

Obtains the filename for a SrcSpan if it is "good"

unLoc :: GenLocated l e -> e #

getLoc :: GenLocated l e -> l #

noLoc :: e -> Located e #

addCLoc :: Located a -> Located b -> c -> Located c #

Combine locations from two Located things and add them to a third thing

eqLocated :: Eq a => GenLocated l a -> GenLocated l a -> Bool #

Tests whether the two located things are equal

cmpLocated :: Ord a => GenLocated l a -> GenLocated l a -> Ordering #

Tests the ordering of the two located things

cmpBufSpan :: HasDebugCallStack => Located a -> Located a -> Ordering #

Compare the BufSpan of two located things.

Precondition: both operands have an associated BufSpan.

pprLocatedAlways :: (Outputable l, Outputable e) => GenLocated l e -> SDoc #

Always prints the location, even without -dppr-debug

rightmost_smallest :: SrcSpan -> SrcSpan -> Ordering #

Strategies for ordering SrcSpans

leftmost_smallest :: SrcSpan -> SrcSpan -> Ordering #

Strategies for ordering SrcSpans

leftmost_largest :: SrcSpan -> SrcSpan -> Ordering #

Strategies for ordering SrcSpans

spans :: SrcSpan -> (Int, Int) -> Bool #

Determines whether a span encloses a given line and column index

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

isRealSubspanOf #

Arguments

:: RealSrcSpan

The span that may be enclosed by the other

-> RealSrcSpan

The span it may be enclosed by

-> Bool 

Determines whether a span is enclosed by another one

mkUniqSet :: Uniquable a => [a] -> UniqSet a #

uniqSetMinusUFM :: UniqSet key -> UniqFM key b -> UniqSet key #

uniqSetMinusUDFM :: UniqSet key -> UniqDFM key b -> UniqSet key #

filterUniqSet :: (a -> Bool) -> UniqSet a -> UniqSet a #

filterUniqSet_Directly :: (Unique -> elt -> Bool) -> UniqSet elt -> UniqSet elt #

partitionUniqSet :: (a -> Bool) -> UniqSet a -> (UniqSet a, UniqSet a) #

uniqSetAny :: (a -> Bool) -> UniqSet a -> Bool #

uniqSetAll :: (a -> Bool) -> UniqSet a -> Bool #

lookupUniqSet :: Uniquable key => UniqSet key -> key -> Maybe key #

What's the point you might ask? We might have changed an object without it's key changing. In which case this lookup makes sense.

nonDetEltsUniqSet :: UniqSet elt -> [elt] #

nonDetStrictFoldUniqSet :: (elt -> a -> a) -> a -> UniqSet elt -> a #

mapUniqSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b #

unsafeUFMToUniqSet :: UniqFM a a -> UniqSet a #

unsafeUFMToUniqSet converts a UniqFM a into a UniqSet a assuming, without checking, that it maps each Unique to a value that has that Unique. See Note [UniqSet invariant].

pprUniqSet :: (a -> SDoc) -> UniqSet a -> SDoc #

pprWithSourceText :: SourceText -> SDoc -> SDoc #

Special combinator for showing string literals.

integralFractionalLit :: Bool -> Integer -> FractionalLit #

The integer should already be negated if it's negative.

mkSourceFractionalLit :: String -> Bool -> Integer -> Integer -> FractionalExponentBase -> FractionalLit #

The arguments should already be negated if they are negative.

optimisationFlags :: EnumSet GeneralFlag #

The set of flags which affect optimisation for the purposes of recompilation avoidance. Specifically, these include flags which affect code generation but not the semantics of the program.

See Note [Ignoring some flag changes] in GHC.Iface.Recomp.Flags)

codeGenFlags :: EnumSet GeneralFlag #

The set of flags which affect code generation and can change a program's runtime behavior (other than performance). These include flags which affect:

  • user visible debugging information (e.g. info table provenance)
  • the ability to catch runtime errors (e.g. -fignore-asserts)
  • the runtime result of the program (e.g. -fomit-yields)
  • which code or interface file declarations are emitted

We also considered placing flags which affect asympototic space behavior (e.g. -ffull-laziness) however this would mean that changing optimisation levels would trigger recompilation even with -fignore-optim-changes, regressing #13604.

Also, arguably Opt_IgnoreAsserts should be here as well; however, we place it instead in optimisationFlags since it is implied by -O[12] and therefore would also break #13604.

See #23369.

pprModule :: IsLine doc => Module -> doc #

stableUnitCmp :: Unit -> Unit -> Ordering #

Compares unit ids lexically, rather than by their Uniques

pprUnit :: IsLine doc => Unit -> doc #

unitFreeModuleHoles :: GenUnit u -> UniqDSet ModuleName #

Retrieve the set of free module holes of a Unit.

moduleFreeHoles :: GenModule (GenUnit u) -> UniqDSet ModuleName #

Calculate the free holes of a GenModule. 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.

mkInstantiatedUnit :: IsUnitId u => u -> GenInstantiations u -> GenInstantiatedUnit u #

Create a new GenInstantiatedUnit given an explicit module substitution.

mkVirtUnit :: IsUnitId u => u -> [(ModuleName, GenModule (GenUnit u))] -> GenUnit u #

Smart constructor for instantiated GenUnit

mkInstantiatedUnitHash :: IsUnitId u => u -> [(ModuleName, GenModule (GenUnit u))] -> FastString #

Generate a uniquely identifying hash (internal unit-id) for an instantiated unit.

This is a one-way function. If the indefinite unit has not been instantiated at all, we return its unit-id.

This hash is completely internal to GHC and is not used for symbol names or file paths. It is different from the hash Cabal would produce for the same instantiated unit.

fsToUnit :: FastString -> Unit #

Create a new simple unit identifier from a FastString. Internally, this is primarily used to specify wired-in unit identifiers.

mapGenUnit :: IsUnitId v => (u -> v) -> GenUnit u -> GenUnit v #

Map over the unit type of a GenUnit

mapInstantiations :: IsUnitId v => (u -> v) -> GenInstantiations u -> GenInstantiations v #

Map over the unit identifier of unit instantiations.

toUnitId :: Unit -> UnitId #

Return the UnitId of the Unit. For on-the-fly instantiated units, return the UnitId of the indefinite unit this unit is an instance of.

virtualUnitId :: InstantiatedUnit -> UnitId #

Return the virtual UnitId of an on-the-fly instantiated unit.

unitIsDefinite :: Unit -> Bool #

A Unit is definite if it has no free holes.

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.

addBootSuffix :: FilePath -> FilePath #

Add the -boot suffix to .hs, .hi and .o files

removeBootSuffix :: FilePath -> FilePath #

Remove the -boot suffix to .hs, .hi and .o files

addBootSuffix_maybe :: IsBootInterface -> FilePath -> FilePath #

Add the -boot suffix if the Bool argument is True

addBootSuffixLocn :: ModLocation -> ModLocation #

Add the -boot suffix to all file paths associated with the module

addBootSuffixLocnOut :: ModLocation -> ModLocation #

Add the -boot suffix to all output file paths associated with the module, not including the input file itself

extendModuleEnvWith :: (a -> a -> a) -> ModuleEnv a -> Module -> a -> ModuleEnv a #

extendModuleEnvList_C :: (a -> a -> a) -> ModuleEnv a -> [(Module, a)] -> ModuleEnv a #

plusModuleEnv_C :: (a -> a -> a) -> ModuleEnv a -> ModuleEnv a -> ModuleEnv a #

mapModuleEnv :: (a -> b) -> ModuleEnv a -> ModuleEnv b #

mkModuleEnv :: [(Module, a)] -> ModuleEnv a #

moduleIsDefinite :: Module -> Bool #

A GenModule is definite if it has no free holes.

moduleStableString :: Module -> String #

Get a string representation of a GenModule that's unique and stable across recompilations. eg. "$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal"

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.

installedModuleEq :: InstalledModule -> Module -> Bool #

Test if a GenModule corresponds to a given InstalledModule, modulo instantiation.

getModuleInstantiation :: Module -> (InstalledModule, Maybe InstantiatedModule) #

Given a possibly on-the-fly instantiated module, split it into a GenModule 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.

getUnitInstantiations :: Unit -> (UnitId, Maybe InstantiatedUnit) #

Return the unit-id this unit is an instance of and the module instantiations (if any).

uninstantiateInstantiatedUnit :: InstantiatedUnit -> InstantiatedUnit #

Remove instantiations of the given instantiated unit

uninstantiateInstantiatedModule :: InstantiatedModule -> InstantiatedModule #

Remove instantiations of the given module instantiated unit

isHoleModule :: GenModule (GenUnit u) -> Bool #

Test if a Module is not instantiated

mkHoleModule :: ModuleName -> GenModule (GenUnit u) #

Create a hole Module

homeUnitId :: GenHomeUnit u -> UnitId #

Return home unit id

homeUnitInstantiations :: GenHomeUnit u -> GenInstantiations u #

Return home unit instantiations

homeUnitInstanceOf :: HomeUnit -> UnitId #

Return the unit id of the unit that is instantiated by the home unit.

E.g. if home unit = q[A=p:B,...] we return q.

If the home unit is not an instance of another unit, we return its own unit id (it is an instance of itself if you will).

homeUnitInstanceOfMaybe :: GenHomeUnit u -> Maybe u #

Return the unit id of the unit that is instantiated by the home unit.

E.g. if home unit = q[A=p:B,...] we return (Just q).

If the home unit is not an instance of another unit, we return Nothing.

homeUnitAsUnit :: HomeUnit -> Unit #

Return the home unit as a normal unit.

We infer from the home unit itself the kind of unit we create: 1. If the home unit is definite, we must be compiling so we return a real unit. The definite home unit may be the result of a unit instantiation, say `p = q[A=r:X]`. In this case we could have returned a virtual unit `q[A=r:X]` but it's not what the clients of this function expect, especially because p is lost when we do this. The unit id of a virtual unit is made up internally so `unitId(q[A=r:X])` is not equal to p.

  1. If the home unit is indefinite we can only create a virtual unit from it. It's ok because we must be only typechecking the home unit so we won't produce any code object that rely on the unit id of this virtual unit.

homeUnitMap :: IsUnitId v => (u -> v) -> GenHomeUnit u -> GenHomeUnit v #

Map over the unit identifier for instantiating units

isHomeUnitIndefinite :: GenHomeUnit u -> Bool #

Test if we are type-checking an indefinite unit

(if it is not, we should never use on-the-fly renaming)

isHomeUnitDefinite :: GenHomeUnit u -> Bool #

Test if we are compiling a definite unit

(if it is, we should never use on-the-fly renaming)

isHomeUnitInstantiating :: GenHomeUnit u -> Bool #

Test if we are compiling by instantiating a definite unit

isHomeUnit :: HomeUnit -> Unit -> Bool #

Test if the unit is the home unit

isHomeUnitId :: GenHomeUnit u -> UnitId -> Bool #

Test if the unit-id is the home unit-id

notHomeUnitId :: Maybe (GenHomeUnit u) -> UnitId -> Bool #

Test if the unit-id is not the home unit-id

isHomeUnitInstanceOf :: HomeUnit -> UnitId -> Bool #

Test if the home unit is an instance of the given unit-id

isHomeModule :: HomeUnit -> Module -> Bool #

Test if the module comes from the home unit

isHomeInstalledModule :: GenHomeUnit u -> InstalledModule -> Bool #

Test if the module comes from the home unit

notHomeInstalledModule :: GenHomeUnit u -> InstalledModule -> Bool #

Test if a module doesn't come from the given home unit

notHomeInstalledModuleMaybe :: Maybe (GenHomeUnit u) -> InstalledModule -> Bool #

Test if a module doesn't come from the given home unit

notHomeModule :: HomeUnit -> Module -> Bool #

Test if a module doesn't come from the given home unit

notHomeModuleMaybe :: Maybe HomeUnit -> Module -> Bool #

Test if a module doesn't come from the given home unit

mkHomeModule :: HomeUnit -> ModuleName -> Module #

Make a module in home unit

mkHomeInstalledModule :: GenHomeUnit u -> ModuleName -> InstalledModule #

Make a module in home unit

homeModuleNameInstantiation :: HomeUnit -> ModuleName -> Module #

Return the module that is used to instantiate the given home module name. If the ModuleName doesn't refer to a signature, return the actual home module.

E.g., the instantiating module of A in p[A=q[]:B] is q[]:B. the instantiating module of A in p is p:A.

homeModuleInstantiation :: Maybe HomeUnit -> Module -> Module #

Return the module that is used to instantiate the given home module.

If the given module isn't a module hole, return the actual home module.

E.g., the instantiating module of p:A in p[A=q[]:B] is q[]:B. the instantiating module of r:A in p[A=q[]:B] is r:A. the instantiating module of p:A in p is p:A. the instantiating module of r:A in p is r:A.

pickLR :: LeftOrRight -> (a, a) -> a #

fIRST_TAG :: ConTag #

Tags are allocated from here for real constructors or for superclass selectors

noOneShotInfo :: OneShotInfo #

It is always safe to assume that an Id has no lambda-bound variable information

unSwap :: SwapFlag -> (a -> a -> b) -> a -> a -> b #

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 | |".

inlinePragmaName :: InlineSpec -> SDoc #

Outputs string for pragma name for any of INLINEINLINABLENOINLINE. This differs from the Outputable instance for the InlineSpec type where the pragma name string as well as the accompanying SourceText (if any) is printed.

pprInline :: InlinePragma -> SDoc #

Pretty-print without displaying the user-specified InlineSpec.

pprInlineDebug :: InlinePragma -> SDoc #

Pretty-print including the user-specified InlineSpec.

treatZeroAsInf :: Int -> IntWithInf #

Turn a positive number into an IntWithInf, where 0 represents infinity

mkIntWithInf :: Int -> IntWithInf #

Inject any integer into an IntWithInf

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)

isTypeDataCon :: DataCon -> Bool #

Is this data constructor in a "type data" declaration? See Note [Type data declarations] in GHC.Rename.Module.

dataConFullSig :: DataCon -> ([TyVar], [TyCoVar], [EqSpec], ThetaType, [Scaled 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) with linearity annotations

6) The original result type of the DataCon

dataConStupidTheta :: DataCon -> ThetaType #

The "stupid theta" of the DataCon, such as data Eq a in:

data Eq a => T a = ...

See Note [The stupid context].

dataConInstOrigArgTys :: DataCon -> [Type] -> [Scaled Type] #

Returns just the instantiated value argument types of a DataCon, (excluding dictionary args)

dataConFieldLabels :: DataCon -> [FieldLabel] #

The labels for the fields of this particular DataCon

dataConSourceArity :: DataCon -> Arity #

Source-level arity of the data constructor

dataConUserTyVarBinders :: DataCon -> [InvisTVBinder] #

InvisTVBinders for the type variables of the constructor, in the order the user wrote them

dataConUserTyVars :: DataCon -> [TyVar] #

The type variables of the constructor, in the order the user wrote them

dataConExTyCoVars :: DataCon -> [TyCoVar] #

The existentially-quantified type/coercion variables of the constructor including dependent (kind-) GADT equalities

dataConTyCon :: DataCon -> TyCon #

The type constructor that we are building via this data constructor

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

dataConName :: DataCon -> Name #

The Name of the DataCon, giving it a unique, rooted identification

sumTyCon :: Arity -> TyCon #

Type constructor for n-ary unboxed sum.

sumDataCon :: ConTag -> Arity -> DataCon #

Data constructor for i-th alternative of a n-ary unboxed sum.

unboxedTupleKind :: [Type] -> Kind #

Specialization of unboxedTupleSumKind for tuples

liftedRepTyCon :: TyCon #

type LiftedRep = 'BoxedRep 'Lifted

unliftedRepTyCon :: TyCon #

type UnliftedRep = 'BoxedRep 'Unlifted

mkBoxedTupleTy :: [Type] -> Type #

Build the type of a small tuple that holds the specified type of thing Flattens 1-tuples. See Note [One-tuples].

pprOccName :: IsLine doc => OccName -> doc #

unitOccEnv :: OccName -> a -> OccEnv a #

extendOccEnv :: OccEnv a -> OccName -> a -> OccEnv a #

extendOccEnvList :: OccEnv a -> [(OccName, a)] -> OccEnv a #

mkOccEnv :: [(OccName, a)] -> OccEnv a #

foldOccEnv :: (a -> b -> b) -> b -> OccEnv a -> b #

plusOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccEnv a -> OccEnv a #

extendOccEnv_C :: (a -> a -> a) -> OccEnv a -> OccName -> a -> OccEnv a #

extendOccEnv_Acc :: (a -> b -> b) -> (a -> b) -> OccEnv b -> OccName -> a -> OccEnv b #

mapOccEnv :: (a -> b) -> OccEnv a -> OccEnv b #

mkOccEnv_C :: (a -> a -> a) -> [(OccName, a)] -> OccEnv a #

filterOccEnv :: (elt -> Bool) -> OccEnv elt -> OccEnv elt #

alterOccEnv :: (Maybe elt -> Maybe elt) -> OccEnv elt -> OccName -> OccEnv elt #

minusOccEnv_C :: (a -> b -> Maybe a) -> OccEnv a -> OccEnv b -> OccEnv a #

Alters (replaces or removes) those elements of the map that are mentioned in the second map

pprOccEnv :: (a -> SDoc) -> OccEnv a -> SDoc #

occSetToEnv :: OccSet -> OccEnv OccName #

Converts an OccSet to an OccEnv (operationally the identity)

isValOcc :: OccName -> Bool #

Value OccNamess are those that are either in the variable or data constructor namespaces

isDataSymOcc :: OccName -> Bool #

Test if the OccName is a data constructor that starts with a symbol (e.g. :, or [])

isSymOcc :: OccName -> Bool #

Test if the OccName is that for any operator (whether it is a data constructor or variable or whatever)

parenSymOcc :: OccName -> SDoc -> SDoc #

Wrap parens around an operator

startsWithUnderscore :: OccName -> Bool #

Haskell 98 encourages compilers to suppress warnings about unused names in a pattern if they start with _: this implements that test

isDerivedOccName :: OccName -> Bool #

Test for definitions internally generated by GHC. This predicate is used to suppress printing of internal definitions in some debug prints

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 GHC.Tc.Instance.Typeable.

mkSuperDictSelOcc #

Arguments

:: Int

Index of superclass, e.g. 3

-> OccName

Class, e.g. Ord

-> OccName

Derived Occname, e.g. $p3Ord

mkLocalOcc #

Arguments

:: Unique

Unique to combine with the OccName

-> OccName

Local name, e.g. sat

-> OccName

Nice unique version, e.g. $L23sat

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.

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

isWiredIn :: NamedThing thing => thing -> Bool #

isDynLinkName :: Platform -> Module -> Name -> Bool #

Will the Name come from a dynamically linked 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 GHC.Runtime.Context

nameIsExternalOrFrom :: Module -> Name -> Bool #

Returns True if the name is external or from the interactive package See documentation of nameIsLocalOrFrom function

nameIsFromExternalPackage :: HomeUnit -> Name -> Bool #

Returns True if the Name comes from some other package: neither this package nor the interactive package.

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 GenModule to disambiguate it from other Names

mkExternalName :: Unique -> Module -> OccName -> SrcSpan -> Name #

Create a name which definitely originates in the given module

mkWiredInName :: Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name #

Create a name which is actually defined by the compiler itself

mkSystemName :: Unique -> OccName -> Name #

Create a name brought into being by the compiler

mkFCallName :: Unique -> FastString -> Name #

Make a name for a foreign call

localiseName :: Name -> Name #

Make the Name into an internal name, regardless of what it was to begin with

stableNameCmp :: Name -> Name -> Ordering #

Compare Names lexicographically This only works for Names that originate in the source code or have been tidied.

pprName :: IsLine doc => Name -> doc #

pprFullName :: Module -> Name -> SDoc #

Print fully qualified name (with unit-id, module and unique)

pprTickyName :: Module -> Name -> SDoc #

Print a ticky ticky styled name

Module argument is the module to use for internal and system names. When printing the name in a ticky profile, the module name is included even for local things. However, ticky uses the format "x (M)" rather than "M.x". Hence, this function provides a separation from normal styling.

pprNameUnqualified :: Name -> SDoc #

Print the string of Name unqualifiedly directly.

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"

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]

updateVarType :: (Type -> Type) -> Var -> Var #

Update a Vars type. Does not update the multiplicity stored in an Var, if any. Because of the possibility for abuse, ASSERTs that there is no multiplicity to update.

updateVarTypeM :: Monad m => (Type -> m Type) -> Var -> m Var #

Update a Vars type monadically. Does not update the multiplicity stored in an Var, if any. Because of the possibility for abuse, ASSERTs that there is no multiplicity to update.

isVisibleForAllTyFlag :: ForAllTyFlag -> Bool #

Does this ForAllTyFlag classify an argument that is written in Haskell?

isInvisibleForAllTyFlag :: ForAllTyFlag -> Bool #

Does this ForAllTyFlag classify an argument that is not written in Haskell?

binderVar :: VarBndr tv argf -> tv #

binderVars :: [VarBndr tv argf] -> [tv] #

binderFlag :: VarBndr tv argf -> argf #

binderFlags :: [VarBndr tv argf] -> [argf] #

mkForAllTyBinder :: vis -> TyCoVar -> VarBndr TyCoVar vis #

Make a named binder

mkTyVarBinder :: vis -> TyVar -> VarBndr TyVar vis #

Make a named binder var should be a type variable

mkForAllTyBinders :: vis -> [TyCoVar] -> [VarBndr TyCoVar vis] #

Make many named binders

mkTyVarBinders :: vis -> [TyVar] -> [VarBndr TyVar vis] #

Make many named binders Input vars should be type variables

mapVarBndr :: (var -> var') -> VarBndr var flag -> VarBndr var' flag #

mapVarBndrs :: (var -> var') -> [VarBndr var flag] -> [VarBndr var' flag] #

isInvisiblePiTyBinder :: PiTyBinder -> Bool #

Does this binder bind an invisible argument?

isVisiblePiTyBinder :: PiTyBinder -> Bool #

Does this binder bind a visible argument?

isAnonPiTyBinder :: PiTyBinder -> Bool #

Does this binder bind a variable that is not erased? Returns True for anonymous binders.

anonPiTyBinderType_maybe :: PiTyBinder -> Maybe Type #

Extract a relevant type, if there is one.

isTyBinder :: PiTyBinder -> 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.

updateTyVarKindM :: Monad m => (Kind -> m Kind) -> TyVar -> m TyVar #

mkExportedLocalVar :: IdDetails -> Name -> Type -> IdInfo -> Id #

Exported Vars will not be removed as dead code

globaliseId :: Id -> Id #

If it's a local, make it global

setIdExported :: Id -> Id #

Exports the given local Var. Can also be called on global Vars, such as data constructors and class operations, which are born as global Vars and automatically exported

setIdNotExported :: Id -> Id #

We can only do this to LocalIds

updateIdTypeAndMultM :: Monad m => (Type -> m Type) -> Id -> m Id #

setIdMult :: Id -> Mult -> Id #

isTyVar :: Var -> Bool #

Is this a type-level (i.e., computationally irrelevant, thus erasable) variable? Satisfies isTyVar = not . isId.

isId :: Var -> Bool #

Is this a value-level (i.e., computationally relevant) Varentifier? Satisfies isId = not . isTyVar.

isCoVar :: Var -> Bool #

Is this a coercion variable? Satisfies isId v ==> isCoVar v == not (isNonCoVarId v).

isNonCoVarId :: Var -> Bool #

Is this a term variable (Var) that is not a coercion variable? Satisfies isId v ==> isCoVar v == not (isNonCoVarId v).

isLocalVar :: Var -> Bool #

isLocalVar returns True for type variables as well as local Vars These are the variables that we need to pay attention to when finding free variables, or doing dependency analysis.

mustHaveLocalBinding :: Var -> Bool #

mustHaveLocalBinding returns True of Vars and Vars that must have a binding in this module. The converse is not quite right: there are some global Vars that must have bindings, such as record selectors. But that doesn't matter, because it's only used for assertions

isExportedId :: Var -> Bool #

isExportedIdVar means "don't throw this away"

chooseFunTyFlag :: HasDebugCallStack => Type -> Type -> FunTyFlag #

See GHC.Types.Var Note [FunTyFlag]

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

getLevity :: HasDebugCallStack => Type -> Type #

Extract the PromDataConInfo of a type. For example, getLevity Int = Lifted, or getLevity (Array# Int) = Unlifted.

Panics if this is not possible. Does not look through type family applications.

getTyVar_maybe :: Type -> Maybe TyVar #

Attempts to obtain the type variable underlying a Type

tyConAppTyCon_maybe :: Type -> Maybe TyCon #

The same as fst . splitTyConApp We can short-cut the FunTy case

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

isLiftedTypeKind :: Kind -> Bool #

Returns True if the argument is (lifted) Type or Constraint See Note [TYPE and CONSTRAINT] in GHC.Builtin.Types.Prim

isMultiplicityTy :: Type -> Bool #

Is this the type Multiplicity?

isLevityTy :: Type -> Bool #

Is this the type PromDataConInfo?

isRuntimeRepTy :: Type -> Bool #

Is this the type RuntimeRep?

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 does not look through type family applications.

By being non-recursive and inlined, this case analysis gets efficiently joined onto the case analysis that the caller is already doing

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.

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 GHC.Core.TyCo.Rep

mkAppTy :: Type -> Type -> Type #

Applies a type to another, as in e.g. k a

mapUnionVarSet :: (a -> VarSet) -> [a] -> VarSet #

map the function over the list, and union the results

anyVarSet :: (Var -> Bool) -> VarSet -> Bool #

allVarSet :: (Var -> Bool) -> VarSet -> Bool #

mapVarSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b #

nonDetStrictFoldVarSet :: (Var -> a -> a) -> a -> VarSet -> a #

seqVarSet :: VarSet -> () #

pluralVarSet :: VarSet -> SDoc #

Determines the pluralisation suffix appropriate for the length of a set in the same way that plural from Outputable does for lists.

pprVarSet #

Arguments

:: VarSet

The things to be pretty printed

-> ([Var] -> SDoc)

The pretty printing function to use on the elements

-> SDoc

SDoc where the things have been pretty printed

Pretty-print a non-deterministic set. The order of variables is non-deterministic and for pretty-printing that shouldn't be a problem. Having this function helps contain the non-determinism created with nonDetEltsUFM. Passing a list to the pretty-printing function allows the caller to decide on the order of Vars (eg. toposort them) without them having to use nonDetEltsUFM at the call site. This prevents from let-binding non-deterministically ordered lists and reusing them where determinism matters.

mapUnionDVarSet :: (a -> DVarSet) -> [a] -> DVarSet #

Map the function over the list, and union the results

disjointDVarSet :: DVarSet -> DVarSet -> Bool #

True if empty intersection

intersectsDVarSet :: DVarSet -> DVarSet -> Bool #

True if non-empty intersection

nonDetStrictFoldDVarSet :: (Var -> a -> a) -> a -> DVarSet -> a #

mapDVarSet :: Uniquable b => (a -> b) -> UniqDSet a -> UniqDSet b #

partitionDVarSet :: (Var -> Bool) -> DVarSet -> (DVarSet, DVarSet) #

Partition DVarSet according to the predicate given

delDVarSetList :: DVarSet -> [Var] -> DVarSet #

Delete a list of variables from DVarSet

extendDVarSetList :: DVarSet -> [Var] -> DVarSet #

Add a list of variables to DVarSet

dVarSetToVarSet :: DVarSet -> VarSet #

Convert a DVarSet to a VarSet by forgetting the order of insertion

transCloDVarSet :: (DVarSet -> DVarSet) -> DVarSet -> DVarSet #

transCloVarSet for DVarSet

lookupInScope :: InScopeSet -> Var -> Maybe Var #

Look up a variable the InScopeSet. This lets you map from the variable's identity (unique) to its full value.

uniqAway :: InScopeSet -> Var -> Var #

uniqAway in_scope v finds a unique that is not used in the in-scope set, and gives that to v. See Note [Local uniques] and Note [The InScopeSet invariant].

unsafeGetFreshLocalUnique :: InScopeSet -> Unique #

unsafeGetFreshUnique in_scope finds a unique that is not in-scope in the given InScopeSet. This must be used very carefully since one can very easily introduce non-unique Uniques this way. See Note [Local uniques].

rnEnvL :: RnEnv2 -> VarEnv Var #

Retrieve the left mapping

rnEnvR :: RnEnv2 -> VarEnv Var #

Retrieve the right mapping

rnBndrs2 :: RnEnv2 -> [Var] -> [Var] -> RnEnv2 #

Applies rnBndr2 to several variables: the two variable lists must be of equal length

rnBndr2 :: RnEnv2 -> Var -> Var -> RnEnv2 #

rnBndr2 env bL bR goes under a binder bL in the Left term, and binder bR in the Right term. It finds a new binder, new_b, and returns an environment mapping bL -> new_b and bR -> new_b

rnBndr2_var :: RnEnv2 -> Var -> Var -> (RnEnv2, Var) #

Similar to rnBndr2 but returns the new variable as well as the new environment

rnBndrL :: RnEnv2 -> Var -> (RnEnv2, Var) #

Similar to rnBndr2 but used when there's a binder on the left side only.

rnBndrR :: RnEnv2 -> Var -> (RnEnv2, Var) #

Similar to rnBndr2 but used when there's a binder on the right side only.

rnEtaL :: RnEnv2 -> Var -> (RnEnv2, Var) #

Similar to rnBndrL but used for eta expansion See Note [Eta expansion]

rnEtaR :: RnEnv2 -> Var -> (RnEnv2, Var) #

Similar to rnBndr2 but used for eta expansion See Note [Eta expansion]

rnOccL :: RnEnv2 -> Var -> Var #

Look up the renaming of an occurrence in the left or right term

rnOccR :: RnEnv2 -> Var -> Var #

Look up the renaming of an occurrence in the left or right term

rnOccL_maybe :: RnEnv2 -> Var -> Maybe Var #

Look up the renaming of an occurrence in the left or right term

rnOccR_maybe :: RnEnv2 -> Var -> Maybe Var #

Look up the renaming of an occurrence in the left or right term

inRnEnvL :: RnEnv2 -> Var -> Bool #

Tells whether a variable is locally bound

inRnEnvR :: RnEnv2 -> Var -> Bool #

Tells whether a variable is locally bound

anyInRnEnvR :: RnEnv2 -> VarSet -> Bool #

`anyInRnEnvR env set` == `any (inRnEnvR rn_env) (toList set)` but lazy in the second argument if the right side of the env is empty.

nukeRnEnvL :: RnEnv2 -> RnEnv2 #

Wipe the left or right side renaming

nukeRnEnvR :: RnEnv2 -> RnEnv2 #

Wipe the left or right side renaming

rnSwap :: RnEnv2 -> RnEnv2 #

swap the meaning of left and right

alterVarEnv :: (Maybe a -> Maybe a) -> VarEnv a -> Var -> VarEnv a #

extendVarEnv :: VarEnv a -> Var -> a -> VarEnv a #

extendVarEnv_C :: (a -> a -> a) -> VarEnv a -> Var -> a -> VarEnv a #

extendVarEnv_Acc :: (a -> b -> b) -> (a -> b) -> VarEnv b -> Var -> a -> VarEnv b #

extendVarEnvList :: VarEnv a -> [(Var, a)] -> VarEnv a #

plusVarEnv_C :: (a -> a -> a) -> VarEnv a -> VarEnv a -> VarEnv a #

plusVarEnv_CD :: (a -> a -> a) -> VarEnv a -> a -> VarEnv a -> a -> VarEnv a #

plusMaybeVarEnv_C :: (a -> a -> Maybe a) -> VarEnv a -> VarEnv a -> VarEnv a #

delVarEnv :: VarEnv a -> Var -> VarEnv a #

filterVarEnv :: (a -> Bool) -> VarEnv a -> VarEnv a #

anyVarEnv :: (elt -> Bool) -> UniqFM key elt -> Bool #

mapVarEnv :: (a -> b) -> VarEnv a -> VarEnv b #

mkVarEnv :: [(Var, a)] -> VarEnv a #

unitVarEnv :: Var -> a -> VarEnv a #

partitionVarEnv :: (a -> Bool) -> VarEnv a -> (VarEnv a, VarEnv a) #

restrictVarEnv :: VarEnv a -> VarSet -> VarEnv a #

Only keep variables contained in the VarSet

zipVarEnv :: [Var] -> [a] -> VarEnv a #

modifyVarEnv :: (a -> a) -> VarEnv a -> Var -> VarEnv a #

modifyVarEnv_Directly :: (a -> a) -> UniqFM key a -> Unique -> UniqFM key a #

dVarEnvElts :: DVarEnv a -> [a] #

mkDVarEnv :: [(Var, a)] -> DVarEnv a #

extendDVarEnv :: DVarEnv a -> Var -> a -> DVarEnv a #

foldDVarEnv :: (a -> b -> b) -> b -> DVarEnv a -> b #

nonDetStrictFoldDVarEnv :: (a -> b -> b) -> b -> DVarEnv a -> b #

mapDVarEnv :: (a -> b) -> DVarEnv a -> DVarEnv b #

filterDVarEnv :: (a -> Bool) -> DVarEnv a -> DVarEnv a #

alterDVarEnv :: (Maybe a -> Maybe a) -> DVarEnv a -> Var -> DVarEnv a #

plusDVarEnv_C :: (a -> a -> a) -> DVarEnv a -> DVarEnv a -> DVarEnv a #

unitDVarEnv :: Var -> a -> DVarEnv a #

extendDVarEnv_C :: (a -> a -> a) -> DVarEnv a -> Var -> a -> DVarEnv a #

modifyDVarEnv :: (a -> a) -> DVarEnv a -> Var -> DVarEnv a #

partitionDVarEnv :: (a -> Bool) -> DVarEnv a -> (DVarEnv a, DVarEnv a) #

extendDVarEnvList :: DVarEnv a -> [(Var, a)] -> DVarEnv a #

anyDVarEnv :: (a -> Bool) -> DVarEnv a -> Bool #

disjointNameSet :: NameSet -> NameSet -> Bool #

True if there is a non-empty intersection. s1 intersectsNameSet s2 doesn't compute s2 if s1 is empty

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

mkDUs :: [(Defs, Uses)] -> DefUses #

allUses :: DefUses -> Uses #

Just like duUses, but Defs are not eliminated from the Uses returned

duUses :: DefUses -> Uses #

Collect all Uses, regardless of whether the group is itself used, but remove Defs on the way

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)

depAnal :: (node -> [Name]) -> (node -> [Name]) -> [node] -> [SCC node] #

unitNameEnv :: Name -> a -> NameEnv a #

extendNameEnv :: NameEnv a -> Name -> a -> NameEnv a #

extendNameEnvList :: NameEnv a -> [(Name, a)] -> NameEnv a #

alterNameEnv :: (Maybe a -> Maybe a) -> NameEnv a -> Name -> NameEnv a #

mkNameEnv :: [(Name, a)] -> NameEnv a #

mkNameEnvWith :: (a -> Name) -> [a] -> NameEnv a #

plusNameEnv_C :: (a -> a -> a) -> NameEnv a -> NameEnv a -> NameEnv a #

plusNameEnv_CD :: (a -> a -> a) -> NameEnv a -> a -> NameEnv a -> a -> NameEnv a #

plusNameEnv_CD2 :: (Maybe a -> Maybe a -> a) -> NameEnv a -> NameEnv a -> NameEnv a #

extendNameEnv_C :: (a -> a -> a) -> NameEnv a -> Name -> a -> NameEnv a #

mapNameEnv :: (elt1 -> elt2) -> NameEnv elt1 -> NameEnv elt2 #

extendNameEnv_Acc :: (a -> b -> b) -> (a -> b) -> NameEnv b -> Name -> a -> NameEnv b #

extendNameEnvList_C :: (a -> a -> a) -> NameEnv a -> [(Name, a)] -> NameEnv a #

filterNameEnv :: (elt -> Bool) -> NameEnv elt -> NameEnv elt #

mapMaybeNameEnv :: (a -> Maybe b) -> NameEnv a -> NameEnv b #

anyNameEnv :: (elt -> Bool) -> NameEnv elt -> Bool #

seqEltsNameEnv :: (elt -> ()) -> NameEnv elt -> () #

filterDNameEnv :: (a -> Bool) -> DNameEnv a -> DNameEnv a #

mapDNameEnv :: (a -> b) -> DNameEnv a -> DNameEnv b #

adjustDNameEnv :: (a -> a) -> DNameEnv a -> Name -> DNameEnv a #

alterDNameEnv :: (Maybe a -> Maybe a) -> DNameEnv a -> Name -> DNameEnv a #

extendDNameEnv_C :: (a -> a -> a) -> DNameEnv a -> Name -> a -> DNameEnv a #

eltsDNameEnv :: DNameEnv a -> [a] #

foldDNameEnv :: (a -> b -> b) -> b -> DNameEnv a -> b #

plusDNameEnv_C :: (elt -> elt -> elt) -> DNameEnv elt -> DNameEnv elt -> DNameEnv elt #

nonDetStrictFoldDNameEnv :: (a -> b -> b) -> b -> DNameEnv a -> b #

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

getRdrName :: NamedThing thing => thing -> RdrName #

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).

greOccName :: GlobalRdrElt -> OccName #

See Note [GreNames]

greMangledName :: GlobalRdrElt -> Name #

A Name for the GRE for internal use. Careful: the OccName of this Name is not necessarily the same as the greOccName (see Note [GreNames]).

grePrintableName :: GlobalRdrElt -> Name #

A Name for the GRE suitable for output to the user. Its OccName will be the greOccName (see Note [GreNames]).

greDefinitionSrcSpan :: GlobalRdrElt -> SrcSpan #

The SrcSpan of the name pointed to by the GRE.

greDefinitionModule :: GlobalRdrElt -> Maybe Module #

The module in which the name pointed to by the GRE is defined.

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.

lookupGRE_RdrName :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt] #

Look for this RdrName in the global environment. Omits record fields without selector functions (see Note [NoFieldSelectors] in GHC.Rename.Env).

lookupGRE_RdrName' :: RdrName -> GlobalRdrEnv -> [GlobalRdrElt] #

Look for this RdrName in the global environment. Includes record fields without selector functions (see Note [NoFieldSelectors] in GHC.Rename.Env).

lookupGRE_Name :: GlobalRdrEnv -> Name -> Maybe GlobalRdrElt #

Look for precisely this Name in the environment. This tests whether it is in scope, ignoring anything else that might be in scope with the same OccName.

lookupGRE_GreName :: GlobalRdrEnv -> GreName -> Maybe GlobalRdrElt #

Look for precisely this GreName in the environment. This tests whether it is in scope, ignoring anything else that might be in scope with the same OccName.

lookupGRE_FieldLabel :: GlobalRdrEnv -> FieldLabel -> Maybe GlobalRdrElt #

Look for a particular record field selector in the environment, where the selector name and field label may be different: the GlobalRdrEnv is keyed on the label. See Note [GreNames] for why this happens.

lookupGRE_Name_OccName :: GlobalRdrEnv -> Name -> OccName -> Maybe GlobalRdrElt #

Look for precisely this Name in the environment, but with an OccName that might differ from that of the Name. See lookupGRE_FieldLabel and Note [GreNames].

isDuplicateRecFldGRE :: GlobalRdrElt -> Bool #

Is this a record field defined with DuplicateRecordFields? (See Note [GreNames])

isNoFieldSelectorGRE :: GlobalRdrElt -> Bool #

Is this a record field defined with NoFieldSelectors? (See Note [NoFieldSelectors] in GHC.Rename.Env)

isFieldSelectorGRE :: GlobalRdrElt -> Bool #

Is this a record field defined with FieldSelectors? (See Note [NoFieldSelectors] in GHC.Rename.Env)

greFieldLabel :: GlobalRdrElt -> Maybe FieldLabel #

Returns the field label of this GRE, if it has one

unQualOK :: GlobalRdrElt -> Bool #

Test if an unqualified version of this thing would be in scope

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]

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 exports_from_avail

transformGREs :: (GlobalRdrElt -> GlobalRdrElt) -> [OccName] -> GlobalRdrEnv -> GlobalRdrEnv #

Apply a transformation function to the GREs for these OccNames

unQualSpecOK :: ImportSpec -> Bool #

Is in scope unqualified?

qualSpecOK :: ModuleName -> ImportSpec -> Bool #

Is in scope qualified with the given module?

pprNameProvenance :: GlobalRdrElt -> SDoc #

Print out one place where the name was define/imported (With -dppr-debug, print them all)

opIsAt :: RdrName -> Bool #

Indicate if the given name is the "@" operator

noAnn :: EpAnn a #

Short form for EpAnnNotUsed

pprIfPs :: forall (p :: Pass). IsPass p => (p ~ 'Parsed => SDoc) -> SDoc #

pprIfRn :: forall (p :: Pass). IsPass p => (p ~ 'Renamed => SDoc) -> SDoc #

pprIfTc :: forall (p :: Pass). IsPass p => (p ~ 'Typechecked => SDoc) -> SDoc #

noHsTok :: forall (tok :: Symbol). GenLocated TokenLocation (HsToken tok) #

noHsUniTok :: forall (tok :: Symbol) (utok :: Symbol). GenLocated TokenLocation (HsUniToken tok utok) #

emptyAnnEnv :: AnnEnv #

An empty annotation environment.

mkAnnEnv :: [Annotation] -> AnnEnv #

Construct a new annotation environment that contains the list of annotations provided.

extendAnnEnvList :: AnnEnv -> [Annotation] -> AnnEnv #

Add the given annotation to the environment.

plusAnnEnv :: AnnEnv -> AnnEnv -> AnnEnv #

Union two annotation environments.

findAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> CoreAnnTarget -> [a] #

Find the annotations attached to the given target as Typeable values of your choice. If no deserializer is specified, only transient annotations will be returned.

findAnnsByTypeRep :: AnnEnv -> CoreAnnTarget -> TypeRep -> [[Word8]] #

Find the annotations attached to the given target as Typeable values of your choice. If no deserializer is specified, only transient annotations will be returned.

deserializeAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> (ModuleEnv [a], NameEnv [a]) #

Deserialize all annotations of a given type. This happens lazily, that is no deserialization will take place until the [a] is actually demanded and the [a] can also be empty (the UniqFM is not filtered).

mkUnitKeyInfo :: DbUnitInfo -> UnitKeyInfo #

Convert a DbUnitInfo (read from a package database) into UnitKeyInfo

mapUnitInfo :: IsUnitId v => (u -> v) -> GenUnitInfo u -> GenUnitInfo v #

Map over the unit parameter

mkUnit :: UnitInfo -> Unit #

Make a Unit from a UnitInfo

If the unit is definite, make a RealUnit from unitId field.

If the unit is indefinite, make a VirtUnit from unitInstanceOf and unitInstantiations fields. Note that in this case we don't keep track of unitId. It can be retrieved later with "improvement", i.e. matching on `unitInstanceOf/unitInstantiations` fields (see Note [About units] in GHC.Unit).

mkUnitPprInfo :: (u -> FastString) -> GenUnitInfo u -> UnitPprInfo #

Create a UnitPprInfo from a UnitInfo

collectIncludeDirs :: [UnitInfo] -> [FilePath] #

Find all the include directories in the given units

collectExtraCcOpts :: [UnitInfo] -> [String] #

Find all the C-compiler options in the given units

collectLibraryDirs :: Ways -> [UnitInfo] -> [FilePath] #

Find all the library directories in the given units for the given ways

collectFrameworks :: [UnitInfo] -> [String] #

Find all the frameworks in the given units

collectFrameworksDirs :: [UnitInfo] -> [String] #

Find all the package framework paths in these and the preload packages

topNormaliseNewType_maybe :: Type -> Maybe (Coercion, Type) #

Sometimes we want to look through a newtype and get its associated coercion. This function strips off newtype layers enough to reveal something that isn't a newtype. Specifically, here's the invariant:

topNormaliseNewType_maybe rec_nts ty = Just (co, ty')

then (a) co : ty ~R ty'. (b) ty' is not a newtype.

The function returns Nothing for non-newtypes, or unsaturated applications

This function does *not* look through type families, because it has no access to the type family environment. If you do have that at hand, consider to use topNormaliseType_maybe, which should be a drop-in replacement for topNormaliseNewType_maybe If topNormliseNewType_maybe ty = Just (co, ty'), then co : ty ~R ty'

coercionKind :: Coercion -> Pair Type #

If it is the case that

c :: (t1 ~ t2)

i.e. the kind of c relates t1 and t2, then coercionKind c = Pair t1 t2.

seqCo :: Coercion -> () #

liftCoSubst :: HasDebugCallStack => Role -> LiftingContext -> Type -> Coercion #

liftCoSubst role lc ty produces a coercion (at role role) that coerces between lc_left(ty) and lc_right(ty), where lc_left is a substitution mapping type variables to the left-hand types of the mapped coercions in lc, and similar for lc_right.

mkCoercionType :: Role -> Type -> Type -> Type #

Makes a coercion type from two types: the types whose equality is proven by the relevant Coercion

isReflexiveCo :: Coercion -> Bool #

Slowly checks if the coercion is reflexive. Don't call this in a loop, as it walks over the entire coercion.

isReflCo :: Coercion -> Bool #

Tests if this coercion is obviously reflexive. Guaranteed to work very quickly. Sometimes a coercion can be reflexive, but not obviously so. c.f. isReflexiveCo

isGReflCo :: Coercion -> Bool #

Tests if this coercion is obviously a generalized reflexive coercion. Guaranteed to work very quickly.

mkProofIrrelCo #

Arguments

:: Role

role of the created coercion, "r"

-> CoercionN

:: phi1 ~N phi2

-> Coercion

g1 :: phi1

-> Coercion

g2 :: phi2

-> Coercion

:: g1 ~r g2

Make a "coercion between coercions".

mkKindCo :: Coercion -> Coercion #

Given co :: (a :: k) ~ (b :: k') produce co' :: k ~ k'.

mkNomReflCo :: Type -> Coercion #

Make a nominal reflexive coercion

mkGReflCo :: Role -> Type -> MCoercionN -> Coercion #

Make a generalized reflexive coercion

mkInstCo :: Coercion -> CoercionN -> Coercion #

Instantiates a Coercion.

mkTransCo :: Coercion -> Coercion -> Coercion #

Create a new Coercion by composing the two given Coercions transitively. (co1 ; co2)

mkSymCo :: Coercion -> Coercion #

Create a symmetric version of the given Coercion that asserts equality between the same types but in the other "direction", so a kind of t1 ~ t2 becomes the kind t2 ~ t1.

mkUnivCo #

Arguments

:: UnivCoProvenance 
-> Role

role of the built coercion, "r"

-> Type

t1 :: k1

-> Type

t2 :: k2

-> Coercion

:: t1 ~r t2

Make a universal coercion between two arbitrary types.

mkPhantomCo :: Coercion -> Type -> Type -> Coercion #

Make a phantom coercion between two types. The coercion passed in must be a nominal coercion between the kinds of the types.

mkFunCo1 :: HasDebugCallStack => Role -> FunTyFlag -> CoercionN -> Coercion -> Coercion -> Coercion #

Build a function Coercion from two other Coercions. That is, given co1 :: a ~ b and co2 :: x ~ y produce co :: (a -> x) ~ (b -> y) or (a => x) ~ (b => y), depending on the kind of a/b. This (most common) version takes a single FunTyFlag, which is used for both fco_afl and ftf_afr of the FunCo

mkForAllCo :: TyCoVar -> CoercionN -> Coercion -> Coercion #

Make a Coercion from a tycovar, a kind coercion, and a body coercion. The kind of the tycovar should be the left-hand kind of the kind coercion. See Note [Unused coercion variable in ForAllCo]

mkAppCo #

Arguments

:: Coercion

:: t1 ~r t2

-> Coercion

:: s1 ~N s2, where s1 :: k1, s2 :: k2

-> Coercion

:: t1 s1 ~r t2 s2

Apply a Coercion to another Coercion. The second coercion must be Nominal, unless the first is Phantom. If the first is Phantom, then the second can be either Phantom or Nominal.

mkTyConAppCo :: HasDebugCallStack => Role -> TyCon -> [Coercion] -> Coercion #

Apply a type constructor to a list of coercions. It is the caller's responsibility to get the roles correct on argument coercions.

mkReflCo :: Role -> Type -> Coercion #

Make a reflexive coercion

algTcFields :: TyConDetails -> FieldLabelEnv #

Maps a label to information about the field

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

mkLevPolyDataTyConRhs #

Arguments

:: Bool

whether the DataCon has a fixed levity

-> Bool

True if this is a "type data" declaration See Note [Type data declarations] in GHC.Rename.Module

-> [DataCon] 
-> AlgTyConRhs 

Create an AlgTyConRhs from the data constructors, for a potentially levity-polymorphic datatype (with UnliftedDatatypes).

mkDataTyConRhs :: [DataCon] -> AlgTyConRhs #

Create an AlgTyConRhs from the data constructors.

Use mkLevPolyDataConRhs if the datatype can be levity-polymorphic or if it comes from a "data type" declaration

visibleDataCons :: AlgTyConRhs -> [DataCon] #

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!

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 GHC.Tc.Instance.Typeable.

primRepSizeB :: Platform -> 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# 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 laid out.

primRepIsFloat :: PrimRep -> Maybe Bool #

Return if Rep stands for floating type, returns Nothing for vector types.

tyConFieldLabels :: TyCon -> [FieldLabel] #

The labels for the fields of this particular TyCon

lookupTyConFieldLabel :: FieldLabelString -> TyCon -> Maybe FieldLabel #

Look up a field label belonging to this TyCon

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.

mkClassTyCon :: Name -> [TyConBinder] -> [Role] -> AlgTyConRhs -> Class -> Name -> TyCon #

Simpler specialization of mkAlgTyCon for classes

mkTupleTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

Result kind of the TyCon

-> DataCon 
-> TupleSort

Whether the tuple is boxed or unboxed

-> AlgTyConFlav 
-> TyCon 

mkSumTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

Kind of the resulting TyCon

-> [DataCon] 
-> AlgTyConFlav 
-> TyCon 

mkTcTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

result kind only

-> [(Name, TcTyVar)]

Scoped type variables; see Note [How TcTyCons work] in GHC.Tc.TyCl

-> Bool

Is this TcTyCon generalised already?

-> TyConFlavour

What sort of TyCon this represents

-> 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 GHC.Tc.TyCl.

noTcTyConScopedTyVars :: [(Name, TcTyVar)] #

No scoped type variables (to be used with mkTcTyCon).

mkPrimTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

result kind Must answer True to isFixedRuntimeRepKind (i.e., no representation polymorphism). (If you need a representation-polymorphic PrimTyCon, change tcHasFixedRuntimeRep, marshalablePrimTyCon, reifyTyCon for PrimTyCons.)

-> [Role] 
-> TyCon 

Create an primitive TyCon, such as Int#, Type or RealWorld# Primitive TyCons are marshalable iff not lifted. If you'd like to change this, modify marshalablePrimTyCon.

mkSynonymTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

result kind

-> [Role] 
-> Type 
-> Bool 
-> Bool 
-> Bool 
-> TyCon 

Create a type synonym TyCon

mkFamilyTyCon #

Arguments

:: Name 
-> [TyConBinder] 
-> Kind

result kind

-> Maybe Name 
-> FamTyConFlav 
-> Maybe Class 
-> Injectivity 
-> TyCon 

Create a type family TyCon

mkPromotedDataCon :: DataCon -> Name -> TyConRepName -> [TyConPiTyBinder] -> Kind -> [Role] -> PromDataConInfo -> 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

isAbstractTyCon :: TyCon -> Bool #

Test if the TyCon is algebraic but abstract (invisible data constructors)

isPrimTyCon :: TyCon -> Bool #

Does this TyCon represent something that cannot be defined in Haskell?

isAlgTyCon :: TyCon -> Bool #

Returns True if the supplied TyCon resulted from either a data or newtype declaration

isVanillaAlgTyCon :: TyCon -> Bool #

Returns True for vanilla AlgTyCons -- that is, those created with a data or newtype declaration.

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

isTypeDataTyCon :: TyCon -> Bool #

Was this TyCon declared as "type data"? See Note [Type data declarations] in GHC.Rename.Module.

isInjectiveTyCon :: TyCon -> Role -> Bool #

isInjectiveTyCon is true of TyCons for which this property holds (where r is the role passed in): If (T a1 b1 c1) ~r (T a2 b2 c2), then (a1 ~r1 a2), (b1 ~r2 b2), and (c1 ~r3 c2) (where r1, r2, and r3, are the roles given by tyConRolesX tc r) See also Note [Decomposing TyConApp equalities] in GHC.Tc.Solver.Canonical

isGenerativeTyCon :: TyCon -> Role -> Bool #

isGenerativeTyCon is true of TyCons for which this property holds (where r is the role passed in): If (T tys ~r t), then (t's head ~r T). See also Note [Decomposing TyConApp equalities] in GHC.Tc.Solver.Canonical

isGenInjAlgRhs :: AlgTyConRhs -> Bool #

Is this an AlgTyConRhs of a TyCon that is generative and injective with respect to representational equality?

isNewTyCon :: TyCon -> Bool #

Is this TyCon that for a newtype

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.

isTypeSynonymTyCon :: TyCon -> Bool #

Is this a TyCon representing a regular H98 type synonym (type)?

isFamFreeTyCon :: TyCon -> Bool #

Is this tycon neither a type family nor a synonym that expands to a type family?

isForgetfulSynTyCon :: TyCon -> Bool #

Is this a forgetful type synonym? If this is a type synonym whose RHS does not mention one (or more) of its bound variables, returns True. Thus, False means that all bound variables appear on the RHS; True may not mean anything, as the test to set this flag is conservative.

tyConMustBeSaturated :: 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 tyConMustBeSaturated on a regular H98 type synonym, because you should probably have expanded it first But regardless, it's not decomposable

isGadtSyntaxTyCon :: TyCon -> Bool #

Is this an algebraic TyCon declared with the GADT syntax?

isEnumerationTyCon :: TyCon -> Bool #

Is this an algebraic TyCon which is just an enumeration of values?

isFamilyTyCon :: TyCon -> Bool #

Is this a TyCon, synonym or otherwise, that defines a family?

isOpenFamilyTyCon :: TyCon -> Bool #

Is this a TyCon, synonym or otherwise, that defines a family with instances?

isTypeFamilyTyCon :: TyCon -> Bool #

Is this a synonym TyCon that can have may have further instances appear?

isDataFamilyTyCon :: TyCon -> Bool #

Is this a synonym TyCon that can have may have further instances appear?

isOpenTypeFamilyTyCon :: TyCon -> Bool #

Is this an open type family TyCon?

isClosedSynFamilyTyConWithAxiom_maybe :: TyCon -> Maybe (CoAxiom Branched) #

Is this a non-empty closed type family? Returns Nothing for abstract or empty closed families.

tyConFamilyResVar_maybe :: TyCon -> Maybe Name #

Extract type variable naming the result of injective type family

tyConInjectivityInfo :: TyCon -> Injectivity #

tyConInjectivityInfo tc returns Injective is if tc is an injective tycon (where is states for which tyConBinders tc is injective), or NotInjective otherwise.

isTyConAssoc :: TyCon -> Bool #

Is this TyCon for an associated type?

tyConAssoc_maybe :: TyCon -> Maybe TyCon #

Get the enclosing class TyCon (if there is one) for the given TyCon.

tyConFlavourAssoc_maybe :: TyConFlavour -> Maybe TyCon #

Get the enclosing class TyCon (if there is one) for the given TyConFlavour

isBoxedTupleTyCon :: TyCon -> Bool #

Is this the TyCon for a boxed tuple?

isUnboxedSumTyCon :: TyCon -> Bool #

Is this the TyCon for an unboxed sum?

isPromotedDataCon_maybe :: TyCon -> Maybe DataCon #

Retrieves the promoted DataCon if this is a PromotedDataCon;

isPromotedTupleTyCon :: TyCon -> Bool #

Is this the TyCon for a promoted tuple?

isPromotedDataCon :: TyCon -> Bool #

Is this a PromotedDataCon?

isDataKindsPromotedDataCon :: TyCon -> Bool #

This function identifies PromotedDataCon's from data constructors in `data T = K1 | K2`, promoted by -XDataKinds. These type constructors are printed with a tick mark 'K1 and 'K2, and similarly have a tick mark added to their OccName's.

In contrast, constructors in `type data T = K1 | K2` are printed and represented with their original undecorated names. See Note [Type data declarations] in GHC.Rename.Module

isKindTyCon :: TyCon -> Bool #

Is this tycon really meant for use at the kind level? That is, should it be permitted without -XDataKinds?

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)

tcHasFixedRuntimeRep :: TyCon -> Bool #

Does this TyCon have a syntactically fixed RuntimeRep when fully applied, as per Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete?

False is safe. True means we're sure. Does only a quick check, based on the TyCon's category.

See Note [Representation-polymorphic TyCons]

isConcreteTyCon :: TyCon -> Bool #

Is this TyCon concrete (i.e. not a synonym/type family)?

Used for representation polymorphism checks.

isTcTyCon :: TyCon -> Bool #

Is this a TcTyCon? (That is, one only used during type-checking?)

expandSynTyCon_maybe #

Arguments

:: TyCon 
-> [tyco]

Arguments to TyCon

-> ExpandSynResult 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 Return Nothing if the TyCon is not a synonym, or if not enough arguments are supplied

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.

tyConDataCons :: TyCon -> [DataCon] #

As tyConDataCons_maybe, but returns the empty list of constructors if no constructors could be found

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)

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.

tyConAlgDataCons_maybe :: TyCon -> Maybe [DataCon] #

Returns Just dcs if the given TyCon is a data type, a tuple type or a sum type with data constructors dcs. If the TyCon has more than one constructor, or represents a primitive or function type constructor then Nothing is returned.

Like tyConDataCons_maybe, but returns Nothing for newtypes.

tyConFamilySize :: TyCon -> Int #

Determine the number of value constructors a TyCon has. Panics if the TyCon is not algebraic or a tuple

algTyConRhs :: TyCon -> AlgTyConRhs #

Extract an AlgTyConRhs with information about data constructors from an algebraic or tuple TyCon. Panics for any other sort of TyCon

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

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.

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

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

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 .... See Note [The stupid context] in GHC.Core.DataCon.

synTyConDefn_maybe :: TyCon -> Maybe ([TyVar], Type) #

Extract the TyVars bound by a vanilla type synonym and the corresponding (unsubstituted) right hand side.

synTyConRhs_maybe :: TyCon -> Maybe Type #

Extract the information pertaining to the right hand side of a type synonym (type) declaration.

famTyConFlav_maybe :: TyCon -> Maybe FamTyConFlav #

Extract the flavour of a type family (with all the extra information that it carries)

isClassTyCon :: TyCon -> Bool #

Is this TyCon that for a class instance?

tyConClass_maybe :: TyCon -> Maybe Class #

If this TyCon is that for a class instance, return the class it is for. Otherwise returns Nothing

tyConATs :: TyCon -> [TyCon] #

Return the associated types of the TyCon, if any

isFamInstTyCon :: TyCon -> Bool #

Is this TyCon that for a data family instance?

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

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

tyConPromDataConInfo :: TyCon -> PromDataConInfo #

Extract any RuntimeRepInfo from this TyCon

tcFlavourIsOpen :: TyConFlavour -> Bool #

Is this flavour of TyCon an open type family or a data family?

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]

mkVisFunTyMany :: HasDebugCallStack => Type -> Type -> Type infixr 3 #

Make nested arrow types | Special, common, case: Arrow type with mult Many

mkForAllTys :: [ForAllTyBinder] -> Type -> Type #

Wraps foralls over the type using the provided TyCoVars from left to right

mkInvisForAllTys :: [InvisTVBinder] -> Type -> Type #

Wraps foralls over the type using the provided InvisTVBinders from left to right

foldTyCo :: Monoid a => TyCoFolder env a -> env -> (Type -> a, [Type] -> a, Coercion -> a, [Coercion] -> a) #

noView :: Type -> Maybe Type #

A view function that looks through nothing.

closeOverKindsList :: [TyVar] -> [TyVar] #

Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministically ordered list.

closeOverKindsDSet :: DTyVarSet -> DTyVarSet #

Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministic set.

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 GHC.Utils.FV.

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 GHC.Utils.FV.

Eta-expanded because that makes it run faster (apparently) See Note [FV eta expansion] in GHC.Utils.FV for explanation.

tyCoVarsOfCoDSet :: Coercion -> DTyCoVarSet #

Get a deterministic set of the vars free in a coercion

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 GHC.Rename.HsType

tyCoVarsOfTypeWellScoped :: Type -> [TyVar] #

Get the free vars of a type in scoped order

tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar] #

Get the free vars of types in scoped order

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.

composeTCvSubst :: Subst -> Subst -> Subst #

Composes two substitutions, applying the second one provided first, like in function composition. This function leaves IdSubstEnv untouched because IdSubstEnv is not used during substitution for types.

isEmptyTCvSubst :: Subst -> Bool #

Checks whether the tyvar and covar environments are empty. This function should be used over isEmptySubst when substituting for types, because types currently do not contain expressions; we can safely disregard the expression environment when deciding whether to skip a substitution. Using isEmptyTCvSubst gives us a non-trivial performance boost (up to 70% less allocation for T18223)

getSubstInScope :: Subst -> InScopeSet #

Find the in-scope set: see Note [The substitution invariant]

getSubstRangeTyCoFVs :: Subst -> VarSet #

Returns the free variables of the types in the range of a substitution as a non-deterministic set.

zapSubst :: Subst -> Subst #

Remove all substitutions that might have been built up while preserving the in-scope set originally called zapSubstEnv

extendSubstInScope :: Subst -> Var -> Subst #

Add the Var to the in-scope set

extendSubstInScopeList :: Subst -> [Var] -> Subst #

Add the Vars to the in-scope set: see also extendInScope

extendSubstInScopeSet :: Subst -> VarSet -> Subst #

Add the Vars to the in-scope set: see also extendInScope

extendTvSubst :: Subst -> TyVar -> Type -> Subst #

Add a substitution for a TyVar to the Subst The TyVar *must* be a real TyVar, and not a CoVar You must ensure that the in-scope set is such that Note [The substitution invariant] holds after extending the substitution like this.

extendCvSubst :: Subst -> CoVar -> Coercion -> Subst #

Add a substitution from a CoVar to a Coercion to the Subst: you must ensure that the in-scope set satisfies Note [The substitution invariant] after extending the substitution like this

extendTvSubstList :: Subst -> [(TyVar, Type)] -> Subst #

Adds multiple TyVar substitutions to the Subst: see also extendTvSubst

zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> Subst #

Generates the in-scope set for the Subst from the types in the incoming environment. No CoVars or Ids, please!

mkTvSubstPrs :: [(TyVar, Type)] -> Subst #

Generates the in-scope set for the TCvSubst from the types in the incoming environment. No CoVars, please! The InScopeSet is just a thunk so with a bit of luck it'll never be evaluated

zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv #

The InScopeSet is just a thunk so with a bit of luck it'll never be evaluated

substTyWith :: HasDebugCallStack => [TyVar] -> [Type] -> Type -> Type #

Type substitution, see zipTvSubst

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.

substCoWith :: HasDebugCallStack => [TyVar] -> [Type] -> Coercion -> Coercion #

Coercion 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.

substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type] #

Type substitution, see zipTvSubst

substTyAddInScope :: Subst -> 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].

substTyUnchecked :: Subst -> 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.

substTys :: HasDebugCallStack => Subst -> [Type] -> [Type] #

Substitute within several Types The substitution has to satisfy the invariants described in Note [The substitution invariant].

substTysUnchecked :: Subst -> [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.

substTheta :: HasDebugCallStack => Subst -> ThetaType -> ThetaType #

Substitute within a ThetaType The substitution has to satisfy the invariants described in Note [The substitution invariant].

substThetaUnchecked :: Subst -> 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.

substCo :: HasDebugCallStack => Subst -> Coercion -> Coercion #

Substitute within a Coercion The substitution has to satisfy the invariants described in Note [The substitution invariant].

substCoUnchecked :: Subst -> 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.

substCos :: HasDebugCallStack => Subst -> [Coercion] -> [Coercion] #

Substitute within several Coercions The substitution has to satisfy the invariants described in Note [The substitution invariant].

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.

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

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

tidyTypes :: TidyEnv -> [Type] -> [Type] #

Tidy a list of Types

See Note [Strictness in tidyType and friends]

tidyType :: TidyEnv -> Type -> Type #

Tidy a Type

See Note [Strictness in tidyType and friends]

tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type]) #

Grabs the free type variables, tidies them and then uses tidyType to work over the type itself

tidyTopType :: Type -> Type #

Calls tidyType on a top-level type (i.e. with an empty tidying environment)

tidyCo :: TidyEnv -> Coercion -> Coercion #

Tidy a Coercion

See Note [Strictness in tidyType and friends]

kindRep :: HasDebugCallStack => Kind -> RuntimeRepType #

Extract the RuntimeRep classifier of a type from its kind. For example, kindRep * = LiftedRep; Panics if this is not possible. Treats * and Constraint as the same

kindRep_maybe :: HasDebugCallStack => Kind -> Maybe RuntimeRepType #

Given a kind (TYPE rr) or (CONSTRAINT rr), extract its RuntimeRep classifier rr. For example, kindRep_maybe * = Just LiftedRep Returns Nothing if the kind is not of form (TYPE rr)

isUnliftedTypeKind :: Kind -> Bool #

Returns True if the kind classifies unlifted types (like 'Int#') and False otherwise. Note that this returns False for representation-polymorphic kinds, which may be specialized to a kind that classifies unlifted types.

kindBoxedRepLevity_maybe :: Type -> Maybe Levity #

Check whether a kind is of the form `TYPE (BoxedRep Lifted)` or `TYPE (BoxedRep Unlifted)`.

Returns:

  • `Just Lifted` for `TYPE (BoxedRep Lifted)` and Type,
  • `Just Unlifted` for `TYPE (BoxedRep Unlifted)` and UnliftedType,
  • Nothing for anything else, e.g. `TYPE IntRep`, `TYPE (BoxedRep l)`, etc.

isLiftedRuntimeRep :: RuntimeRepType -> Bool #

Check whether a type of kind RuntimeRep is lifted.

isLiftedRuntimeRep is:

  • True of LiftedRep :: RuntimeRep
  • False of type variables, type family applications, and of other reps such as IntRep :: RuntimeRep.

isUnliftedRuntimeRep :: RuntimeRepType -> Bool #

Check whether a type of kind RuntimeRep is unlifted.

isRuntimeRepVar :: TyVar -> Bool #

Is a tyvar of type RuntimeRep?

isLevityVar :: TyVar -> Bool #

Is a tyvar of type PromDataConInfo?

isMultiplicityVar :: TyVar -> Bool #

Is a tyvar of type Multiplicity?

splitRuntimeRep_maybe :: RuntimeRepType -> Maybe (TyCon, [Type]) #

(splitRuntimeRep_maybe rr) takes a Type rr :: RuntimeRep, and returns the (TyCon,[Type]) for the RuntimeRep, if possible, where the TyCon is one of the promoted DataCons of RuntimeRep. Remember: the unique on TyCon that is a a promoted DataCon is the same as the unique on the DataCon See Note [Promoted data constructors] in GHC.Core.TyCon May not be possible if rr is a type variable or type family application

isBoxedRuntimeRep :: RuntimeRepType -> Bool #

See isBoxedRuntimeRep_maybe.

runtimeRepLevity_maybe :: RuntimeRepType -> Maybe Levity #

Check whether a type of kind RuntimeRep is lifted, unlifted, or unknown.

`isLiftedRuntimeRep rr` returns:

  • `Just Lifted` if rr is `LiftedRep :: RuntimeRep`
  • `Just Unlifted` if rr is definitely unlifted, e.g. IntRep
  • Nothing if not known (e.g. it's a type variable or a type family application).

levityType_maybe :: LevityType -> Maybe Levity #

levity_maybe takes a Type of kind Levity, and returns its levity May not be possible for a type variable or type family application

mapTyCo :: Monad m => TyCoMapper () m -> (Type -> m Type, [Type] -> m [Type], Coercion -> m Coercion, [Coercion] -> m [Coercion]) #

mapTyCoX :: Monad m => TyCoMapper env m -> (env -> Type -> m Type, env -> [Type] -> m [Type], env -> Coercion -> m Coercion, env -> [Coercion] -> m [Coercion]) #

getTyVar :: HasDebugCallStack => 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

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

mkAppTys :: Type -> [Type] -> Type #

splitAppTy_maybe :: Type -> Maybe (Type, Type) #

Attempt to take a type application apart, whether it is a function, type constructor, or plain type application. Note that type family applications are NEVER unsaturated by this!

splitAppTy :: Type -> (Type, Type) #

Attempts to take a type application apart, as in splitAppTy_maybe, and panics if this is not possible

splitAppTyNoView_maybe :: HasDebugCallStack => Type -> Maybe (Type, Type) #

Does the AppTy split as in splitAppTy_maybe, but assumes that any coreView stuff is already done

tcSplitAppTyNoView_maybe :: Type -> Maybe (Type, Type) #

Just like splitAppTyNoView_maybe, but does not split (c => t) See Note [Decomposing fat arrow c=>t]

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.

splitAppTysNoView :: HasDebugCallStack => Type -> (Type, [Type]) #

Like splitAppTys, but doesn't look through type synonyms

isNumLitTy :: Type -> Maybe Integer #

Is this a numeric literal. We also look through type synonyms.

isStrLitTy :: Type -> Maybe FastString #

Is this a symbol literal. We also look through type synonyms.

isCharLitTy :: Type -> Maybe Char #

Is this a char literal? We also look through type synonyms.

isLitTy :: Type -> Maybe TyLit #

Is this a type literal (symbol, numeric, or char)?

userTypeError_maybe :: Type -> Maybe Type #

Is this type a custom user error? If so, give us the kind and the error message.

pprUserTypeErrorTy :: Type -> SDoc #

Render a type corresponding to a user type error into a SDoc.

funTyConAppTy_maybe :: FunTyFlag -> Type -> Type -> Type -> Maybe (TyCon, [Type]) #

Given the components of a FunTy figure out the corresponding TyConApp.

tyConAppFunTy_maybe :: HasDebugCallStack => TyCon -> [Type] -> Maybe Type #

Return Just if this TyConApp should be represented as a FunTy

tyConAppFunCo_maybe :: HasDebugCallStack => Role -> TyCon -> [Coercion] -> Maybe Coercion #

Return Just if this TyConAppCo should be represented as a FunCo

mkFunctionType :: HasDebugCallStack => Mult -> Type -> Type -> Type #

This one works out the FunTyFlag from the argument type See GHC.Types.Var Note [FunTyFlag]

mkScaledFunctionTys :: [Scaled Type] -> Type -> Type #

Like mkFunctionType, compute the FunTyFlag from the arguments

splitFunTy :: Type -> (Mult, Type, Type) #

Attempts to extract the multiplicity, argument and result types from a type, and panics if that is not possible. See also splitFunTy_maybe

splitFunTy_maybe :: Type -> Maybe (FunTyFlag, Mult, Type, Type) #

Attempts to extract the multiplicity, argument and result types from a 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

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.

tyConAppTyConPicky_maybe :: Type -> Maybe TyCon #

Retrieve the tycon heading this type, if there is one. Does not look through synonyms.

tyConAppArgs_maybe :: Type -> Maybe [Type] #

The same as snd . splitTyConApp

tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type]) #

tcSplitTyConApp_maybe splits a type constructor application into its type constructor and applied types.

Differs from splitTyConApp_maybe in that it does *not* split types headed with (=>), as that's not a TyCon in the type-checker.

Note that this may fail (in funTyConAppTy_maybe) 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`. This isn't usually a problem but may be temporarily the cas during canonicalization: see Note [Decomposing FunTy] in GHC.Tc.Solver.Canonical and Note [The Purely Kinded Type Invariant (PKTI)] in GHC.Tc.Gen.HsType, Wrinkle around FunTy

Consequently, you may need to zonk your type before using this function.

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.

mkTyCoInvForAllTy :: TyCoVar -> Type -> Type #

Make a dependent forall over an Inferred variable

mkInfForAllTy :: TyVar -> Type -> Type #

Like mkTyCoInvForAllTy, but tv should be a tyvar

mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type #

Like mkForAllTys, but assumes all variables are dependent and Inferred, a common case

mkInfForAllTys :: [TyVar] -> Type -> Type #

Like mkTyCoInvForAllTys, but tvs should be a list of tyvar

mkSpecForAllTy :: TyVar -> Type -> Type #

Like mkForAllTy, but assumes the variable is dependent and Specified, a common case

mkSpecForAllTys :: [TyVar] -> Type -> Type #

Like mkForAllTys, but assumes all variables are dependent and Specified, a common case

mkVisForAllTys :: [TyVar] -> Type -> Type #

Like mkForAllTys, but assumes all variables are dependent and visible

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 PiTyBinders, 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.

splitForAllForAllTyBinders :: Type -> ([ForAllTyBinder], Type) #

Take a ForAllTy apart, returning the binders and result type

splitForAllTyCoVars :: 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.

splitForAllTyVars :: Type -> ([TyVar], Type) #

Like splitForAllTyCoVars, but split only for tyvars. This always succeeds, even if it returns only an empty list. Note that the result type returned may have free variables that were bound by a forall.

splitForAllReqTyBinders :: Type -> ([ReqTyBinder], Type) #

Like splitForAllTyCoVars, but only splits ForAllTys with Required type variable binders. Furthermore, each returned tyvar is annotated with ().

splitForAllInvisTyBinders :: Type -> ([InvisTyBinder], Type) #

Like splitForAllTyCoVars, but only splits ForAllTys with Invisible type variable binders. Furthermore, each returned tyvar is annotated with its Specificity.

isForAllTy :: Type -> Bool #

Checks whether this is a proper forall (with a named binder)

isForAllTy_ty :: Type -> Bool #

Like isForAllTy, but returns True only if it is a tyvar binder

isForAllTy_co :: Type -> Bool #

Like isForAllTy, but returns True only if it is a covar binder

isPiTy :: Type -> Bool #

Is this a function or forall?

isFunTy :: Type -> Bool #

Is this a function?

splitForAllTyCoVar :: Type -> (TyCoVar, Type) #

Take a forall type apart, or panics if that is not possible.

dropForAlls :: Type -> Type #

Drops all ForAllTys

splitForAllTyCoVar_maybe :: Type -> Maybe (TyCoVar, Type) #

Attempts to take a forall type apart, but only if it's a proper forall, with a named binder

splitForAllTyVar_maybe :: Type -> Maybe (TyVar, Type) #

Like splitForAllTyCoVar_maybe, but only returns Just if it is a tyvar binder.

splitForAllCoVar_maybe :: Type -> Maybe (CoVar, Type) #

Like splitForAllTyCoVar_maybe, but only returns Just if it is a covar binder.

splitPiTy_maybe :: Type -> Maybe (PiTyBinder, Type) #

Attempts to take a forall type apart; works with proper foralls and functions

splitPiTy :: Type -> (PiTyBinder, Type) #

Takes a forall type apart, or panics

splitPiTys :: Type -> ([PiTyBinder], Type) #

Split off all PiTyBinders to a type, splitting both proper foralls and functions

getRuntimeArgTys :: Type -> [(Scaled Type, FunTyFlag)] #

Extracts a list of run-time arguments from a function type, looking through newtypes to the right of arrows.

Examples:

   newtype Identity a = I a

   getRuntimeArgTys (Int -> Bool -> Double) == [(Int, FTF_T_T), (Bool, FTF_T_T)]
   getRuntimeArgTys (Identity Int -> Bool -> Double) == [(Identity Int, FTF_T_T), (Bool, FTF_T_T)]
   getRuntimeArgTys (Int -> Identity (Bool -> Identity Double)) == [(Int, FTF_T_T), (Bool, FTF_T_T)]
   getRuntimeArgTys (forall a. Show a => Identity a -> a -> Int -> Bool)
            == [(Show a, FTF_C_T), (Identity a, FTF_T_T),(a, FTF_T_T),(Int, FTF_T_T)]

Note that, in the last case, the returned types might mention an out-of-scope type variable. This function is used only when we really care about the kinds of the returned types, so this is OK.

  • *Warning**: this function can return an infinite list. For example:
  newtype N a = MkN (a -> N a)
  getRuntimeArgTys (N a) == repeat (a, FTF_T_T)

splitInvisPiTys :: Type -> ([PiTyBinder], Type) #

Like splitPiTys, but returns only *invisible* binders, including constraints. Stops at the first visible binder.

splitInvisPiTysN :: Int -> Type -> ([PiTyBinder], Type) #

Same as splitInvisPiTys, but stop when - you have found n PiTyBinders, - or you run out of invisible binders

filterOutInvisibleTypes :: TyCon -> [Type] -> [Type] #

Given a TyCon and a list of argument types, filter out any invisible (i.e., Inferred or Specified) arguments.

filterOutInferredTypes :: TyCon -> [Type] -> [Type] #

Given a TyCon and a list of argument types, filter out any Inferred arguments.

partitionInvisibles :: [(a, ForAllTyFlag)] -> ([a], [a]) #

Given a list of things paired with their visibilities, partition the things into (invisible things, visible things).

tyConForAllTyFlags :: TyCon -> [Type] -> [ForAllTyFlag] #

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
tyConForAllTyFlags 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.

appTyForAllTyFlags :: Type -> [Type] -> [ForAllTyFlag] #

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 appTyForAllTyFlags comes in handy, since f Type Bool would be represented in Core using AppTys. (See also #15792).

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)

coAxNthLHS :: forall (br :: BranchFlag). CoAxiom br -> Int -> Type #

Get the type on the LHS of a coercion induced by a type/data family instance.

isCoVarType :: Type -> Bool #

Does this type classify a core (unlifted) Coercion? At either role nominal or representational (t1 ~# t2) or (t1 ~R# t2) See Note [Types for coercions, predicates, and evidence] in GHC.Core.TyCo.Rep

buildSynTyCon #

Arguments

:: Name 
-> [KnotTied TyConBinder] 
-> Kind

result kind

-> [Role] 
-> KnotTied Type 
-> TyCon 

isUnliftedType :: HasDebugCallStack => Type -> Bool #

Is the given type definitely unlifted? See Type for what an unlifted type is.

Panics on representation-polymorphic types; See mightBeUnliftedType for a more approximate predicate that behaves better in the presence of representation polymorphism.

mightBeLiftedType :: Type -> Bool #

Returns:

  • False if the type is guaranteed unlifted or
  • True if it lifted, OR we aren't sure (e.g. in a representation-polymorphic case)

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 representation-polymorphic case)

isBoxedType :: Type -> Bool #

See Type for what a boxed type is. Panics on representation-polymorphic types; See mightBeUnliftedType for a more approximate predicate that behaves better in the presence of representation polymorphism.

isRuntimeRepKindedTy :: Type -> Bool #

Is this a type of kind RuntimeRep? (e.g. LiftedRep)

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# ] == [String, Int#]

getRuntimeRep :: HasDebugCallStack => Type -> RuntimeRepType #

Extract the RuntimeRep classifier of a type. For instance, getRuntimeRep_maybe Int = LiftedRep. Panics if this is not possible.

isDataFamilyAppType :: Type -> Bool #

Check whether a type is a data family type

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 representation-polymorphic types.

isPrimitiveType :: Type -> Bool #

Returns true of types that are opaque to Haskell.

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 GHC.Core.) 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]

seqType :: Type -> () #

seqTypes :: [Type] -> () #

isTYPEorCONSTRAINT :: Kind -> Bool #

Does this classify a type allowed to have values? Responds True to things like *, TYPE Lifted, TYPE IntRep, TYPE v, Constraint.

True of a kind `TYPE _` or `CONSTRAINT _`

tcIsLiftedTypeKind :: Kind -> Bool #

Is this kind equivalent to Type i.e. TYPE LiftedRep?

tcIsBoxedTypeKind :: Kind -> Bool #

Is this kind equivalent to TYPE (BoxedRep l) for some l :: Levity?

isTypeLikeKind :: Kind -> Bool #

Is this kind equivalent to TYPE r (for some unknown r)?

This considers Constraint to be distinct from *.

typeHasFixedRuntimeRep :: HasDebugCallStack => Type -> Bool #

Returns True if a type has a syntactically fixed runtime rep, as per Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete.

This function is equivalent to `isFixedRuntimeRepKind . typeKind` but much faster.

Precondition: The type has kind (TYPE blah)

argsHaveFixedRuntimeRep :: Type -> Bool #

True if the argument types of this function type all have a fixed-runtime-rep

isFixedRuntimeRepKind :: HasDebugCallStack => Kind -> Bool #

Checks that a kind of the form Type, Constraint or 'TYPE r is concrete. See isConcrete.

Precondition: The type has kind `TYPE blah` or `CONSTRAINT blah`

isConcrete :: Type -> Bool #

Tests whether the given type is concrete, i.e. it whether it consists only of concrete type constructors, concrete type variables, and applications.

See Note [Concrete types] in GHC.Tc.Utils.Concrete.

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.)

unrestricted :: a -> Scaled a #

Scale a payload by Many

linear :: a -> Scaled a #

Scale a payload by One

tymult :: a -> Scaled a #

Scale a payload by Many; used for type arguments in core

mkScaled :: Mult -> a -> Scaled a #

scaledSet :: Scaled a -> b -> Scaled b #

isLinearType :: Type -> Bool #

isLinear t returns True of a if t is a type of (curried) function where at least one argument is linear (or otherwise non-unrestricted). We use this function to check whether it is safe to eta reduce an Id in CorePrep. It is always safe to return True, because True deactivates the optimisation.

mkTYPEapp_maybe :: RuntimeRepType -> Maybe Type #

Given a RuntimeRep, applies TYPE to it. On the fly it rewrites TYPE LiftedRep --> liftedTypeKind (a synonym) TYPE UnliftedRep --> unliftedTypeKind (ditto) TYPE ZeroBitRep --> zeroBitTypeKind (ditto) NB: no need to check for TYPE (BoxedRep Lifted), TYPE (BoxedRep Unlifted) because those inner types should already have been rewritten to LiftedRep and UnliftedRep respectively, by mkTyConApp

see Note [TYPE and CONSTRAINT] in GHC.Builtin.Types.Prim. See Note [Using synonyms to compress types] in GHC.Core.Type

mkCONSTRAINTapp :: RuntimeRepType -> Type #

Just like mkTYPEapp

mkCONSTRAINTapp_maybe :: RuntimeRepType -> Maybe Type #

Just like mkTYPEapp_maybe

mkBoxedRepApp_maybe :: LevityType -> Maybe Type #

Given a PromDataConInfo, apply BoxedRep to it On the fly, rewrite BoxedRep Lifted --> liftedRepTy (a synonym) BoxedRep Unlifted --> unliftedRepTy (ditto) See Note [TYPE and CONSTRAINT] in GHC.Builtin.Types.Prim. See Note [Using synonyms to compress types] in GHC.Core.Type

mkTupleRepApp_maybe :: Type -> Maybe Type #

Given a `[RuntimeRep]`, apply TupleRep to it On the fly, rewrite TupleRep [] -> zeroBitRepTy (a synonym) See Note [TYPE and CONSTRAINT] in GHC.Builtin.Types.Prim. See Note [Using synonyms to compress types] in GHC.Core.Type

litNumIsSigned :: LitNumType -> Bool #

Indicate if a numeric literal type supports negative numbers

litNumBitSize :: Platform -> LitNumType -> Maybe Word #

Number of bits

mkLitNumberWrap :: Platform -> LitNumType -> Integer -> Literal #

Make a literal number using wrapping semantics if the value is out of bound.

litNumWrap :: Platform -> Literal -> Literal #

Wrap a literal number according to its type using wrapping semantics.

litNumCoerce :: LitNumType -> Platform -> Literal -> Literal #

Coerce a literal number into another using wrapping semantics.

litNumNarrow :: LitNumType -> Platform -> Literal -> Literal #

Narrow a literal number by converting it into another number type and then converting it back to its original type.

litNumCheckRange :: Platform -> LitNumType -> Integer -> Bool #

Check that a given number is in the range of a numeric literal

litNumRange :: Platform -> LitNumType -> (Maybe Integer, Maybe Integer) #

Get the literal range

mkLitNumber :: Platform -> LitNumType -> Integer -> Literal #

Create a numeric Literal of the given type

mkLitInt :: Platform -> Integer -> Literal #

Creates a Literal of type Int#

mkLitIntWrap :: Platform -> 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]

mkLitIntUnchecked :: Integer -> Literal #

Creates a Literal of type Int# without checking its range.

mkLitIntWrapC :: Platform -> 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]

mkLitWord :: Platform -> Integer -> Literal #

Creates a Literal of type Word#

mkLitWordWrap :: Platform -> 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]

mkLitWordUnchecked :: Integer -> Literal #

Creates a Literal of type Word# without checking its range.

mkLitWordWrapC :: Platform -> 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]

mkLitInt8 :: Integer -> Literal #

Creates a Literal of type Int8#

mkLitInt8Wrap :: Integer -> Literal #

Creates a Literal of type Int8#. If the argument is out of the range, it is wrapped.

mkLitInt8Unchecked :: Integer -> Literal #

Creates a Literal of type Int8# without checking its range.

mkLitWord8 :: Integer -> Literal #

Creates a Literal of type Word8#

mkLitWord8Wrap :: Integer -> Literal #

Creates a Literal of type Word8#. If the argument is out of the range, it is wrapped.

mkLitWord8Unchecked :: Integer -> Literal #

Creates a Literal of type Word8# without checking its range.

mkLitInt16 :: Integer -> Literal #

Creates a Literal of type Int16#

mkLitInt16Wrap :: Integer -> Literal #

Creates a Literal of type Int16#. If the argument is out of the range, it is wrapped.

mkLitInt16Unchecked :: Integer -> Literal #

Creates a Literal of type Int16# without checking its range.

mkLitWord16 :: Integer -> Literal #

Creates a Literal of type Word16#

mkLitWord16Wrap :: Integer -> Literal #

Creates a Literal of type Word16#. If the argument is out of the range, it is wrapped.

mkLitWord16Unchecked :: Integer -> Literal #

Creates a Literal of type Word16# without checking its range.

mkLitInt32 :: Integer -> Literal #

Creates a Literal of type Int32#

mkLitInt32Wrap :: Integer -> Literal #

Creates a Literal of type Int32#. If the argument is out of the range, it is wrapped.

mkLitInt32Unchecked :: Integer -> Literal #

Creates a Literal of type Int32# without checking its range.

mkLitWord32 :: Integer -> Literal #

Creates a Literal of type Word32#

mkLitWord32Wrap :: Integer -> Literal #

Creates a Literal of type Word32#. If the argument is out of the range, it is wrapped.

mkLitWord32Unchecked :: Integer -> Literal #

Creates a Literal of type Word32# without checking its range.

mkLitInt64 :: Integer -> Literal #

Creates a Literal of type Int64#

mkLitInt64Wrap :: Integer -> Literal #

Creates a Literal of type Int64#. If the argument is out of the range, it is wrapped.

mkLitInt64Unchecked :: Integer -> Literal #

Creates a Literal of type Int64# without checking its range.

mkLitWord64 :: Integer -> Literal #

Creates a Literal of type Word64#

mkLitWord64Wrap :: Integer -> Literal #

Creates a Literal of type Word64#. If the argument is out of the range, it is wrapped.

mkLitWord64Unchecked :: Integer -> Literal #

Creates a Literal of type Word64# without checking its range.

mkLitFloat :: Rational -> Literal #

Creates a Literal of type Float#

mkLitDouble :: Rational -> Literal #

Creates a Literal of type Double#

mkLitChar :: Char -> Literal #

Creates a Literal of type Char#

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

isZeroLit :: Literal -> Bool #

Tests whether the literal represents a zero of whatever type it is

isOneLit :: Literal -> Bool #

Tests whether the literal represents a one of whatever type it is

litValue :: Literal -> Integer #

Returns the Integer contained in the Literal, for when that makes sense, i.e. for Char and numbers.

isLitValue_maybe :: Literal -> Maybe Integer #

Returns the Integer contained in the Literal, for when that makes sense, i.e. for Char and numbers.

mapLitValue :: Platform -> (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]

convertToWordLit :: Platform -> Literal -> Literal #

Extend or narrow a fixed-width literal (e.g. Int16#) to a target word-sized literal (Int# or Word#). Narrowing can only happen on 32-bit architectures when we convert a 64-bit literal into a 32-bit one.

convertToIntLit :: Platform -> Literal -> Literal #

Extend or narrow a fixed-width literal (e.g. Int16#) to a target word-sized literal (Int# or Word#). Narrowing can only happen on 32-bit architectures when we convert a 64-bit literal into a 32-bit one.

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# -> 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# (indexInt8OffAddr# 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"# ("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.

litIsDupable :: Platform -> Literal -> Bool #

True if code space does not go bad if we duplicate this literal

literalType :: Literal -> Type #

Find the Haskell Type the literal occupies

pprCoAxiom :: forall (br :: BranchFlag). CoAxiom br -> SDoc #

isGReflMCo :: MCoercion -> Bool #

Tests if this MCoercion is obviously generalized reflexive Guaranteed to work very quickly.

mkTransMCo :: MCoercion -> MCoercion -> MCoercion #

Compose two MCoercions via transitivity

mkSymMCo :: MCoercion -> MCoercion #

Get the reverse of an MCoercion

mkCastTyMCo :: Type -> MCoercion -> Type #

Cast a type by an MCoercion

decomposeCo :: Arity -> Coercion -> Infinite Role -> [Coercion] #

This breaks a Coercion with type T A B C ~ T D E F into a list of Coercions of kinds A ~ D, B ~ E and E ~ F. Hence:

decomposeCo 3 c [r1, r2, r3] = [nth r1 0 c, nth r2 1 c, nth r3 2 c]

getCoVar_maybe :: Coercion -> Maybe CoVar #

Extract a covar, if possible. This check is dirty. Be ashamed of yourself. (It's dirty because it cares about the structure of a coercion, which is morally reprehensible.)

splitAppCo_maybe :: Coercion -> Maybe (Coercion, Coercion) #

Attempt to take a coercion application apart.

splitForAllCo_ty_maybe :: Coercion -> Maybe (TyVar, Coercion, Coercion) #

Like splitForAllCo_maybe, but only returns Just for tyvar binder

splitForAllCo_co_maybe :: Coercion -> Maybe (CoVar, Coercion, Coercion) #

Like splitForAllCo_maybe, but only returns Just for covar binder

mkRuntimeRepCo :: HasDebugCallStack => Coercion -> Coercion #

Given a coercion `co :: (t1 :: TYPE r1) ~ (t2 :: TYPE r2)` produce a coercion `rep_co :: r1 ~ r2` But actually it is possible that co :: (t1 :: CONSTRAINT r1) ~ (t2 :: CONSTRAINT r2) or co :: (t1 :: TYPE r1) ~ (t2 :: CONSTRAINT r2) or co :: (t1 :: CONSTRAINT r1) ~ (t2 :: TYPE r2) See Note [mkRuntimeRepCo]

isGReflCo_maybe :: Coercion -> Maybe (Type, Role) #

Returns the type coerced if this coercion is a generalized reflexive coercion. Guaranteed to work very quickly.

isReflCo_maybe :: Coercion -> Maybe (Type, Role) #

Returns the type coerced if this coercion is reflexive. Guaranteed to work very quickly. Sometimes a coercion can be reflexive, but not obviously so. c.f. isReflexiveCo_maybe

isReflexiveCo_maybe :: Coercion -> Maybe (Type, Role) #

Extracts the coerced type from a reflexive coercion. This potentially walks over the entire coercion, so avoid doing this in a loop.

mkRepReflCo :: Type -> Coercion #

Make a representational reflexive coercion

mkAppCos :: Coercion -> [Coercion] -> Coercion #

Applies multiple Coercions to another Coercion, from left to right. See also mkAppCo.

mkForAllCos :: [(TyCoVar, CoercionN)] -> Coercion -> Coercion #

Make nested ForAllCos

mkHomoForAllCos :: [TyCoVar] -> Coercion -> Coercion #

Make a Coercion quantified over a type/coercion variable; the variable has the same type in both sides of the coercion

mkAxInstCo :: forall (br :: BranchFlag). Role -> CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Coercion #

mkAxInstRHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type #

mkAxInstLHS :: forall (br :: BranchFlag). CoAxiom br -> BranchIndex -> [Type] -> [Coercion] -> Type #

Return the left-hand type of the axiom, when the axiom is instantiated at the types given.

mkUnbranchedAxInstLHS :: CoAxiom Unbranched -> [Type] -> [Coercion] -> Type #

Instantiate the left-hand side of an unbranched axiom

mkHoleCo :: CoercionHole -> Coercion #

Make a coercion from a coercion hole

getNthFun #

Arguments

:: FunSel 
-> a

multiplicity

-> a

argument

-> a

result

-> a

One of the above three

Extract the nth field of a FunCo

mkGReflRightCo :: Role -> Type -> CoercionN -> Coercion #

Given ty :: k1, co :: k1 ~ k2, produces co' :: ty ~r (ty |> co)

mkGReflLeftCo :: Role -> Type -> CoercionN -> Coercion #

Given r, ty :: k1, and co :: k1 ~N k2, produces co' :: (ty |> co) ~r ty

mkCoherenceLeftCo :: Role -> Type -> CoercionN -> Coercion -> Coercion #

Given ty :: k1, co :: k1 ~ k2, co2:: ty ~r ty', produces @co' :: (ty |> co) ~r ty' It is not only a utility function, but it saves allocation when co is a GRefl coercion.

mkCoherenceRightCo :: Role -> Type -> CoercionN -> Coercion -> Coercion #

Given ty :: k1, co :: k1 ~ k2, co2:: ty' ~r ty, produces @co' :: ty' ~r (ty |> co) It is not only a utility function, but it saves allocation when co is a GRefl coercion.

downgradeRole :: Role -> Role -> Coercion -> Coercion #

Like downgradeRole_maybe, but panics if the change isn't a downgrade. See Note [Role twiddling functions]

setNominalRole_maybe :: Role -> Coercion -> Maybe CoercionN #

Converts a coercion to be nominal, if possible. See Note [Role twiddling functions]

ltRole :: Role -> Role -> Bool #

promoteCoercion :: Coercion -> CoercionN #

like mkKindCo, but aggressively & recursively optimizes to avoid using a KindCo constructor. The output role is nominal.

castCoercionKind2 :: Coercion -> Role -> Type -> Type -> CoercionN -> CoercionN -> Coercion #

Creates a new coercion with both of its types casted by different casts castCoercionKind2 g r t1 t2 h1 h2, where g :: t1 ~r t2, has type (t1 |> h1) ~r (t2 |> h2). h1 and h2 must be nominal.

castCoercionKind1 :: Coercion -> Role -> Type -> Type -> CoercionN -> Coercion #

castCoercionKind1 g r t1 t2 h = coercionKind g r t1 t2 h h That is, it's a specialised form of castCoercionKind, where the two kind coercions are identical castCoercionKind1 g r t1 t2 h, where g :: t1 ~r t2, has type (t1 |> h) ~r (t2 |> h). h must be nominal. See Note [castCoercionKind1]

castCoercionKind :: Coercion -> CoercionN -> CoercionN -> Coercion #

Creates a new coercion with both of its types casted by different casts castCoercionKind g h1 h2, where g :: t1 ~r t2, has type (t1 |> h1) ~r (t2 |> h2). h1 and h2 must be nominal. It calls coercionKindRole, so it's quite inefficient (which I stands for) Use castCoercionKind2 instead if t1, t2, and r are known beforehand.

mkPiCo :: Role -> Var -> Coercion -> Coercion #

Make a forall Coercion, where both types related by the coercion are quantified over the same variable.

instNewTyCon_maybe :: TyCon -> [Type] -> Maybe (Type, Coercion) #

If `instNewTyCon_maybe T ts = Just (rep_ty, co)` then `co :: T ts ~R# rep_ty`

Checks for a newtype, and for being saturated

composeSteppers :: NormaliseStepper ev -> NormaliseStepper ev -> NormaliseStepper ev #

Try one stepper and then try the next, if the first doesn't make progress. So if it returns NS_Done, it means that both steppers are satisfied

unwrapNewTypeStepper :: NormaliseStepper Coercion #

A NormaliseStepper that unwraps newtypes, careful not to fall into a loop. If it would fall into a loop, it produces NS_Abort.

topNormaliseTypeX :: NormaliseStepper ev -> (ev -> ev -> ev) -> Type -> Maybe (ev, Type) #

A general function for normalising the top-level of a type. It continues to use the provided NormaliseStepper until that function fails, and then this function returns. The roles of the coercions produced by the NormaliseStepper must all be the same, which is the role returned from the call to topNormaliseTypeX.

Typically ev is Coercion.

If topNormaliseTypeX step plus ty = Just (ev, ty') then ty ~ev1~ t1 ~ev2~ t2 ... ~evn~ ty' and ev = ev1 plus ev2 plus ... plus evn If it returns Nothing then no newtype unwrapping could happen

eqCoercion :: Coercion -> Coercion -> Bool #

Syntactic equality of coercions

eqCoercionX :: RnEnv2 -> Coercion -> Coercion -> Bool #

Compare two Coercions, with respect to an RnEnv2

liftCoSubstWithEx :: Role -> [TyVar] -> [Coercion] -> [TyCoVar] -> [Type] -> (Type -> Coercion, [Type]) #

extendLiftingContext #

Arguments

:: LiftingContext

original LC

-> TyCoVar

new variable to map...

-> Coercion

...to this lifted version

-> LiftingContext 

Extend a lifting context with a new mapping.

extendLiftingContextAndInScope #

Arguments

:: LiftingContext

Original LC

-> TyCoVar

new variable to map...

-> Coercion

to this coercion

-> LiftingContext 

Extend a lifting context with a new mapping, and extend the in-scope set

zapLiftingContext :: LiftingContext -> LiftingContext #

Erase the environments in a lifting context

liftCoSubstVarBndrUsing #

Arguments

:: (r -> CoercionN)

coercion getter

-> (LiftingContext -> Type -> r)

callback

-> LiftingContext 
-> TyCoVar 
-> (LiftingContext, TyCoVar, r) 

isMappedByLC :: TyCoVar -> LiftingContext -> Bool #

Is a var in the domain of a lifting context?

swapLiftCoEnv :: LiftCoEnv -> LiftCoEnv #

Apply "sym" to all coercions in a LiftCoEnv

lcSubst :: LiftingContext -> Subst #

Extract the underlying substitution from the LiftingContext

coercionKinds :: [Coercion] -> Pair [Type] #

Apply coercionKind to multiple Coercions

coercionKindRole :: Coercion -> (Pair Type, Role) #

Get a coercion's kind and role.

coercionRole :: Coercion -> Role #

Retrieve the role from a coercion.

mkPrimEqPred :: Type -> Type -> Type #

Creates a primitive type equality predicate. Invariant: the types are not Coercions

mkPrimEqPredRole :: Role -> Type -> Type -> PredType #

Makes a lifted equality predicate at the given role

mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type #

Creates a primitive type equality predicate with explicit kinds

mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type #

Creates a primitive representational type equality predicate with explicit kinds

buildCoercion :: Type -> Type -> CoercionN #

Assuming that two types are the same, ignoring coercions, find a nominal coercion between the types. This is useful when optimizing transitivity over coercion applications, where splitting two AppCos might yield different kinds. See Note [EtaAppCo] in GHC.Core.Coercion.Opt.

hasCoercionHoleTy :: Type -> Bool #

Is there a coercion hole in this type?

hasCoercionHoleCo :: Coercion -> Bool #

Is there a coercion hole in this coercion?

suggestExtension :: Extension -> GhcHint #

Suggests a single extension without extra user info.

suggestExtensionWithInfo :: SDoc -> Extension -> GhcHint #

Like suggestExtension but allows supplying extra info for the user.

suggestExtensions :: [Extension] -> GhcHint #

Suggests to enable every extension in the list.

suggestExtensionsWithInfo :: SDoc -> [Extension] -> GhcHint #

Like suggestExtensions but allows supplying extra info for the user.

suggestAnyExtension :: [Extension] -> GhcHint #

Suggests to enable any extension in the list.

suggestAnyExtensionWithInfo :: SDoc -> [Extension] -> GhcHint #

Like suggestAnyExtension but allows supplying extra info for the user.

addMessage :: MsgEnvelope e -> Messages e -> Messages e #

Adds a Message to the input collection of messages. See Note [Discarding Messages].

unionMessages :: Messages e -> Messages e -> Messages e #

Joins two collections of messages together. See Note [Discarding Messages].

unionManyMessages :: Foldable f => f (Messages e) -> Messages e #

Joins many Messagess together

mkDecorated :: [SDoc] -> DecoratedSDoc #

Creates a new DecoratedSDoc out of a list of SDoc.

mkSimpleDecorated :: SDoc -> DecoratedSDoc #

Creates a new DecoratedSDoc out of a single SDoc

unionDecoratedSDoc :: DecoratedSDoc -> DecoratedSDoc -> DecoratedSDoc #

Joins two DecoratedSDoc together. The resulting DecoratedSDoc will have a number of entries which is the sum of the lengths of the input.

mapDecoratedSDoc :: (SDoc -> SDoc) -> DecoratedSDoc -> DecoratedSDoc #

Apply a transformation function to all elements of a DecoratedSDoc.

noHints :: [GhcHint] #

Helper function to use when no hints can be provided. Currently this function can be used to construct plain DiagnosticMessage and add hints to them, but once #18516 will be fully executed, the main usage of this function would be in the implementation of the diagnosticHints typeclass method, to report the fact that a particular Diagnostic has no hints.

mkPlainError :: [GhcHint] -> SDoc -> DiagnosticMessage #

Create an error DiagnosticMessage holding just a single SDoc

mkDecoratedDiagnostic :: DiagnosticReason -> [GhcHint] -> [SDoc] -> DiagnosticMessage #

Create a DiagnosticMessage from a list of bulleted SDocs and a DiagnosticReason

mkDecoratedError :: [GhcHint] -> [SDoc] -> DiagnosticMessage #

Create an error DiagnosticMessage from a list of bulleted SDocs

mkLocMessage #

Arguments

:: MessageClass

What kind of message?

-> SrcSpan

location

-> SDoc

message

-> SDoc 

mkLocMessageWarningGroups #

Arguments

:: Bool

Print warning groups (if applicable)?

-> MessageClass

What kind of message?

-> SrcSpan

location

-> SDoc

message

-> SDoc 

Make an error message with location info, specifying whether to show warning groups (if applicable).

isIntrinsicErrorMessage :: Diagnostic e => MsgEnvelope e -> Bool #

Returns True if this is, intrinsically, a failure. See Note [Intrinsic And Extrinsic Failures].

errorsFound :: Diagnostic e => Messages e -> Bool #

Are there any hard errors here? -Werror warnings are not detected. If you want to check for -Werror warnings, use errorsOrFatalWarningsFound.

isExtrinsicErrorMessage :: MsgEnvelope e -> Bool #

Returns True if the envelope contains a message that will stop compilation: either an intrinsic error or a fatal (-Werror) warning

errorsOrFatalWarningsFound :: Messages e -> Bool #

Are there any errors or -Werror warnings here?

partitionMessages :: Diagnostic e => Messages e -> (Messages e, Messages e) #

Partitions the Messages and returns a tuple which first element are the warnings, and the second the errors.

diagReasonSeverity :: DiagOpts -> DiagnosticReason -> Severity #

Computes the right Severity for the input DiagnosticReason out of the 'DiagOpts. This function has to be called when a diagnostic is constructed, i.e. with a 'DiagOpts "snapshot" taken as close as possible to where a particular diagnostic message is built, otherwise the computed Severity might not be correct, due to the mutable nature of the DynFlags in GHC.

errorDiagnostic :: MessageClass #

Varation of mkMCDiagnostic which can be used when we are sure the input DiagnosticReason is ErrorWithoutFlag and there is no diagnostic code.

mkMsgEnvelope :: Diagnostic e => DiagOpts -> SrcSpan -> NamePprCtx -> e -> MsgEnvelope e #

Wrap a Diagnostic in a MsgEnvelope, recording its location. If you know your Diagnostic is an error, consider using mkErrorMsgEnvelope, which does not require looking at the DiagOpts

mkErrorMsgEnvelope :: Diagnostic e => SrcSpan -> NamePprCtx -> e -> MsgEnvelope e #

Wrap a Diagnostic in a MsgEnvelope, recording its location. Precondition: the diagnostic is, in fact, an error. That is, diagnosticReason msg == ErrorWithoutFlag.

mkPlainMsgEnvelope :: Diagnostic e => DiagOpts -> SrcSpan -> e -> MsgEnvelope e #

Variant that doesn't care about qualified/unqualified names.

mkPlainErrorMsgEnvelope :: Diagnostic e => SrcSpan -> e -> MsgEnvelope e #

Variant of mkPlainMsgEnvelope which can be used when we are sure we are constructing a diagnostic with a ErrorWithoutFlag reason.

allValid :: [Validity' a] -> Validity' a #

If they aren't all valid, return the first

getInvalids :: [Validity' a] -> [a] #

formatBulleted :: SDocContext -> DecoratedSDoc -> SDoc #

Formats the input list of structured document, where each element of the list gets a bullet.

pprMsgEnvelopeBagWithLocDefault :: Diagnostic e => Bag (MsgEnvelope e) -> [SDoc] #

Print the messages with the suitable default configuration, usually not what you want but sometimes you don't really care about what the configuration is (for example, if the message is in a panic).

ghcExit :: Logger -> Int -> IO () #

errorMsg :: Logger -> SDoc -> IO () #

showPass :: Logger -> String -> IO () #

withTiming #

Arguments

:: MonadIO m 
=> Logger 
-> 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.

withTimingSilent #

Arguments

:: MonadIO m 
=> Logger 
-> 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.

debugTraceMsg :: Logger -> Int -> SDoc -> IO () #

putMsg :: Logger -> SDoc -> IO () #

logInfo :: Logger -> SDoc -> IO () #

logOutput :: Logger -> SDoc -> IO () #

Like logInfo but with SevOutput rather then SevInfo

traceCmd :: Logger -> String -> String -> IO a -> IO a #

Trace a command (when verbosity level >= 3)

traceSystoolCommand :: Logger -> String -> IO a -> IO a #

Record in the eventlog when the given tool command starts and finishes, prepending the given String with "systool:", to easily be able to collect and process all the systool events.

For those events to show up in the eventlog, you need to run GHC with -v2 or -ddump-timings.

zeroSimplCount #

Arguments

:: Bool
  • ddump-simpl-stats
-> SimplCount 

doSimplTick #

Arguments

:: Int

History size of the elaborate counter

-> Tick 
-> SimplCount 
-> SimplCount 

mkEqSpec :: TyVar -> Type -> EqSpec #

Make a non-dependent EqSpec

eqHsBang :: HsImplBang -> HsImplBang -> Bool #

Compare strictness annotations

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.

-> [InvisTVBinder]

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 (Scaled Type)]

Original argument types

-> KnotTied Type

Original result type

-> PromDataConInfo

See comments on PromDataConInfo

-> 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

dataConTag :: DataCon -> ConTag #

The tag used for ordering DataCons

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.

dataConRepType :: DataCon -> Type #

The representation type of the data constructor, i.e. the sort type that will represent values of this type at runtime

dataConIsInfix :: DataCon -> Bool #

Should the DataCon be presented infix?

dataConUnivTyVars :: DataCon -> [TyVar] #

The universally-quantified type variables of the constructor

dataConUnivAndExTyCoVars :: DataCon -> [TyCoVar] #

Both the universal and existential type/coercion variables of the constructor

dataConTheta :: DataCon -> ThetaType #

The *full* constraints on the constructor type, including dependent GADT equalities.

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)

dataConImplicitTyThings :: DataCon -> [TyThing] #

Find all the Ids implicitly brought into scope by the data constructor. Currently, the union of the dataConWorkId and the dataConWrapId

dataConFieldType :: DataCon -> FieldLabelString -> Type #

Extract the type for any given labelled field 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

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

dataConRepArity :: DataCon -> Arity #

Gives the number of value arguments (including zero-width coercions) stored by the given DataCon's worker in its Core representation. This may differ from the number of arguments that appear in the source code; see also Note [DataCon arities]

isNullarySrcDataCon :: DataCon -> Bool #

Return whether there are any argument types for this DataCons original source type See Note [DataCon arities]

isNullaryRepDataCon :: DataCon -> Bool #

Return whether this DataCon's worker, in its Core representation, takes any value arguments.

In particular, remember that we include coercion arguments in the arity of the Core representation of the DataCon -- both lifted and unlifted coercions, despite the latter having zero-width runtime representation.

See also Note [DataCon arities].

dataConRepStrictness :: DataCon -> [StrictnessMark] #

Give the demands on the arguments of a Core constructor application (Con dc args)

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)

dataConWrapperType :: 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.

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

-> [Scaled 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

dataConInstUnivs :: DataCon -> [Type] -> [Type] #

Given a data constructor dc with n universally quantified type variables a_{1}, a_{2}, ..., a_{n}, and given a list of argument types dc_args of length m where m <= n, then:

dataConInstUnivs dc dc_args

Will return:

[dc_arg_{1}, dc_arg_{2}, ..., dc_arg_{m}, a_{m+1}, ..., a_{n}]

That is, return the list of universal type variables with a_{1}, a_{2}, ..., a_{m} instantiated with dc_arg_{1}, dc_arg_{2}, ..., dc_arg_{m}. It is possible for m to be less than n, in which case the remaining n - m elements will simply be universal type variables (with their kinds possibly instantiated).

Examples:

  • Given the data constructor D :: forall a b. Foo a b and dc_args [Int, Bool], then dataConInstUnivs D dc_args will return [Int, Bool].
  • Given the data constructor D :: forall a b. Foo a b and dc_args [Int], then @dataConInstUnivs D dc_args will return [Int, b].
  • Given the data constructor E :: forall k (a :: k). Bar k a and dc_args [Type], then @dataConInstUnivs D dc_args will return [Type, (a :: Type)].

This is primarily used in GHC.Tc.Deriv.* in service of instantiating data constructors' field types. See Note [Instantiating field types in stock deriving] for a notable example of this.

dataConOrigArgTys :: DataCon -> [Scaled Type] #

Returns the argument types of the wrapper, excluding all dictionary arguments and without substituting for any type variables

dataConOtherTheta :: DataCon -> ThetaType #

Returns constraints in the wrapper type, other than those in the dataConEqSpec

dataConRepArgTys :: DataCon -> [Scaled 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

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

isVanillaDataCon :: DataCon -> Bool #

Vanilla DataCons are those that are nice boring Haskell 98 constructors

isNewDataCon :: DataCon -> Bool #

Is this the DataCon of a newtype?

specialPromotedDc :: DataCon -> Bool #

Should this DataCon be allowed in a type even without -XDataKinds? Currently, only Lifted & Unlifted

dataConResRepTyArgs :: DataCon -> [Type] #

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 dataConUserTyVarsNeedWrapper is only called at most once during a data constructor's lifetime.

splitDataProductType_maybe #

Arguments

:: Type

A product type, perhaps

-> Maybe (TyCon, [Type], DataCon, [Scaled 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 data type that is all of:

  • Concrete (i.e. constructors visible)
  • Single-constructor
  • ... which has no existentials

Whether the type is a data type or a newtype.

hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr () pass] #

isHsKindedTyVar :: HsTyVarBndr flag pass -> Bool #

Does this HsTyVarBndr come with an explicit kind annotation?

hsMult :: HsScaled pass a -> HsArrow pass #

hsScaledThing :: HsScaled pass a -> a #

noTypeArgs :: [Void] #

An empty list that can be used to indicate that there are no type arguments allowed in cases where HsConDetails is applied to Void.

hsRecFieldsArgs :: UnXRec p => HsRecFields p arg -> [arg] #

isTypeLSig :: UnXRec p => LSig p -> Bool #

isSpecLSig :: UnXRec p => LSig p -> Bool #

isPragLSig :: UnXRec p => LSig p -> Bool #

isDataDecl :: TyClDecl pass -> Bool #

True = argument is a data/newtype declaration.

isSynDecl :: TyClDecl pass -> Bool #

type or type instance declaration

isClassDecl :: TyClDecl pass -> Bool #

type class

isFamilyDecl :: TyClDecl pass -> Bool #

type/data family declaration

isTypeFamilyDecl :: TyClDecl pass -> Bool #

type family declaration

isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool #

open type family info

isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool #

closed type family info

isDataFamilyDecl :: TyClDecl pass -> Bool #

data family declaration

isTypeDataDefnCons :: DataDefnCons a -> Bool #

Are the constructors within a type data declaration? See Note [Type data declarations] in GHC.Rename.Module.

docDeclDoc :: DocDecl pass -> LHsDoc pass #

isInfixMatch :: Match id body -> Bool #

isMonadStmtContext :: HsStmtContext id -> Bool #

Is this a monadic context?

isOrphan :: IsOrphan -> Bool #

Returns true if IsOrphan is orphan.

notOrphan :: IsOrphan -> Bool #

Returns true if IsOrphan is not an orphan.

ruleArity :: CoreRule -> Int #

The number of arguments the ru_fn must be applied to before the rule can match on it

ruleIdName :: CoreRule -> Name #

The Name of the Id at the head of the rule left hand side

setRuleIdName :: Name -> CoreRule -> CoreRule #

Set the Name of the Id at the head of the rule left hand side

noUnfolding :: Unfolding #

There is no known Unfolding

evaldUnfolding :: Unfolding #

This unfolding marks the associated thing as being evaluated

bootUnfolding :: Unfolding #

There is no known Unfolding, because this came from an hi-boot file.

unfoldingTemplate :: Unfolding -> CoreExpr #

Retrieves the template of an unfolding: panics if none is known

maybeUnfoldingTemplate :: Unfolding -> Maybe CoreExpr #

Retrieves the template of an unfolding if possible maybeUnfoldingTemplate is used mainly when specialising, and we do want to specialise DFuns, so it's important to return a template for DFunUnfoldings

otherCons :: Unfolding -> [AltCon] #

The constructors that the unfolding could never be: returns [] if no information is available

isValueUnfolding :: Unfolding -> Bool #

Determines if it is certainly the case that the unfolding will yield a value (something in HNF): returns False if unsure

isEvaldUnfolding :: Unfolding -> Bool #

Determines if it possibly the case that the unfolding will yield a value. Unlike isValueUnfolding it returns True for OtherCon

isConLikeUnfolding :: Unfolding -> Bool #

True if the unfolding is a constructor application, the application of a CONLIKE function or OtherCon

isCheapUnfolding :: Unfolding -> Bool #

Is the thing we will unfold into certainly cheap?

isInlineUnfolding :: Unfolding -> Bool #

True of a stable unfolding that is (a) always inlined; that is, with an UnfWhen guidance, or (b) a DFunUnfolding which never needs to be inlined

hasSomeUnfolding :: Unfolding -> Bool #

Only returns False if there is no unfolding information available at all

cmpAlt :: Alt a -> Alt a -> Ordering #

ltAlt :: Alt a -> Alt a -> Bool #

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]

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

mkCoApps :: Expr b -> [Coercion] -> Expr b infixl 4 #

Apply a list of coercion argument expressions to a function expression in a nested fashion

mkVarApps :: Expr b -> [Var] -> Expr b infixl 4 #

Apply a list of type or value variables 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

mkTyApps :: Expr b -> [Type] -> Expr b infixl 4 #

Apply a list of type argument expressions to a function expression in a nested fashion

mkConApp2 :: DataCon -> [Type] -> [Var] -> Expr b #

mkTyArg :: Type -> Expr b #

mkIntLit :: Platform -> 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

mkIntLitWrap :: Platform -> Integer -> Expr b #

Create a machine integer literal expression of type Int# from an Integer, wrapping if necessary. If you want an expression of type Int use mkIntExpr

mkWordLit :: Platform -> 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

mkWordLitWrap :: Platform -> Integer -> Expr b #

Create a machine word literal expression of type Word# from an Integer, wrapping if necessary. If you want an expression of type Word use mkWordExpr

mkCharLit :: Char -> Expr b #

Create a machine character literal expression of type Char#. If you want an expression of type Char use mkCharExpr

mkStringLit :: String -> Expr b #

Create a machine string literal expression of type Addr#. If you want an expression of type String use mkStringExpr

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

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

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

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

mkLams :: [b] -> Expr b -> Expr b #

Bind all supplied binders over an expression in a nested lambda expression. Prefer to use mkCoreLams if possible

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-can-float invariant. Prefer to use mkCoreLets if possible, which does guarantee the invariant

mkLet :: Bind b -> Expr b -> Expr b #

mkLetNonRec :: b -> Expr b -> Expr b -> Expr b #

mkLetNonRec bndr rhs body wraps body in a let binding bndr.

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.

mkTyBind :: TyVar -> Type -> CoreBind #

Create a binding group where a type variable is bound to a type. Per Note [Core type and coercion invariant], this can only be used to bind something in a non-recursive let expression

mkCoBind :: CoVar -> Coercion -> CoreBind #

Create a binding group where a type variable is bound to a type. Per Note [Core type and coercion invariant], this can only be used to bind something in a non-recursive let expression

varToCoreExpr :: CoreBndr -> Expr b #

Convert a binder into either a Expr or Type Expr appropriately

exprToType :: CoreExpr -> Type #

If the expression is a Type, converts. Otherwise, panics. NB: This does not convert Coercion to CoercionTy.

bindersOf :: Bind b -> [b] #

Extract every variable by this group

bindersOfBinds :: [Bind b] -> [b] #

bindersOf applied to a list of binding groups

foldBindersOfBindStrict :: (a -> b -> a) -> a -> Bind b -> a #

foldBindersOfBindsStrict :: (a -> b -> a) -> a -> [Bind b] -> a #

rhssOfBind :: Bind b -> [Expr b] #

rhssOfAlts :: [Alt b] -> [Expr b] #

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

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

collectNBinders :: JoinArity -> Expr b -> ([b], Expr b) #

Strip off exactly N leading lambdas (type or value). Good for use with join points. Panic if there aren't enough

collectNValBinders_maybe :: Arity -> CoreExpr -> Maybe ([Var], CoreExpr) #

Strip off exactly N leading value lambdas returning all the binders found up to that point Return Nothing if there aren't enough

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

collectFunSimple :: Expr b -> Expr b #

Takes a nested application expression and returns the function being applied. Looking through casts and ticks to find it.

wrapLamBody :: (CoreExpr -> CoreExpr) -> CoreExpr -> CoreExpr #

fmap on the body of a lambda. wrapLamBody f (x -> body) == (x -> f body)

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.

collectArgsTicks :: (CoreTickish -> Bool) -> Expr b -> (Expr b, [Arg b], [CoreTickish]) #

Like collectArgs, but also collects looks through floatable ticks if it means that we can find more arguments.

isRuntimeVar :: Var -> Bool #

Will this variable exist at runtime?

isRuntimeArg :: CoreExpr -> Bool #

Will this argument expression exist at runtime?

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).

isTyCoArg :: Expr b -> Bool #

Returns True iff the expression is a Type or Coercion expression at its top level

isCoArg :: Expr b -> Bool #

Returns True iff the expression is a Coercion expression at its top level

isTypeArg :: Expr b -> Bool #

Returns True iff the expression is a Type expression at its top level. Note this does NOT include Coercions.

valBndrCount :: [CoreBndr] -> Int #

The number of binders that bind values rather than types

valArgCount :: [Arg b] -> Int #

The number of argument expressions that are values rather than types at their top level

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

deAnnotate :: AnnExpr bndr annot -> Expr bndr #

deAnnotate' :: AnnExpr' bndr annot -> Expr bndr #

deAnnAlt :: AnnAlt bndr annot -> Alt bndr #

deAnnBind :: AnnBind b annot -> Bind b #

collectAnnBndrs :: AnnExpr bndr annot -> ([bndr], AnnExpr bndr annot) #

As collectBinders but for AnnExpr rather than Expr

collectNAnnBndrs :: Int -> AnnExpr bndr annot -> ([bndr], AnnExpr bndr annot) #

As collectNBinders but for AnnExpr rather than Expr

oneShotInfo :: IdInfo -> OneShotInfo #

Info about a lambda-bound variable, if the Id is one

arityInfo :: IdInfo -> ArityInfo #

Id arity, as computed by GHC.Core.Opt.Arity. Specifies how many arguments this Id has to be applied to before it does any meaningful work.

cafInfo :: IdInfo -> CafInfo #

Id CAF info

callArityInfo :: IdInfo -> ArityInfo #

How this is called. This is the number of arguments to which a binding can be eta-expanded without losing any sharing. n = all calls have at least n arguments

setRuleInfo :: IdInfo -> RuleInfo -> IdInfo infixl 1 #

setOccInfo :: IdInfo -> OccInfo -> IdInfo infixl 1 #

unfoldingInfo :: IdInfo -> Unfolding #

Essentially returns the realUnfoldingInfo field, but does not expose the unfolding of a strong loop breaker.

This is the right thing to call if you plan to decide whether an unfolding will inline.

hasInlineUnfolding :: IdInfo -> Bool #

True of a non-loop-breaker Id that has a stable unfolding that is (a) always inlined; that is, with an UnfWhen guidance, or (b) a DFunUnfolding which never needs to be inlined

setCafInfo :: IdInfo -> CafInfo -> IdInfo infixl 1 #

setDemandInfo :: IdInfo -> Demand -> IdInfo infixl 1 #

setDmdSigInfo :: IdInfo -> DmdSig -> IdInfo infixl 1 #

setCprSigInfo :: IdInfo -> CprSig -> IdInfo infixl 1 #

noCafIdInfo :: IdInfo #

More informative IdInfo we can use when we know the Id has no CAF references

unknownArity :: Arity #

It is always safe to assume that an Id has an arity of 0

emptyRuleInfo :: RuleInfo #

Assume that no specializations exist: always safe

ruleInfoFreeVars :: RuleInfo -> DVarSet #

Retrieve the locally-defined free variables of both the left and right hand sides of the specialization rules

setRuleInfoHead :: Name -> RuleInfo -> RuleInfo #

Change the name of the function the rule is keyed on all of the CoreRules

zapLamInfo :: IdInfo -> Maybe IdInfo #

This is used to remove information on lambda binders that we have setup as part of a lambda group, assuming they will be applied all at once, but turn out to be part of an unsaturated lambda as in e.g:

(\x1. \x2. e) arg1

zapDemandInfo :: IdInfo -> Maybe IdInfo #

Remove all demand info on the IdInfo

zapUsageInfo :: IdInfo -> Maybe IdInfo #

Remove usage (but not strictness) info on the IdInfo

zapUsageEnvInfo :: IdInfo -> Maybe IdInfo #

Remove usage environment info from the strictness signature on the IdInfo

zapFragileInfo :: IdInfo -> Maybe IdInfo #

Zap info that depends on free variables

idType :: Id -> Kind #

idMult :: Id -> Mult #

scaleIdBy :: Mult -> Id -> Id #

scaleVarBy :: Mult -> Var -> Var #

Like scaleIdBy, but skips non-Ids. Useful for scaling a mixed list of ids and tyvars.

setIdName :: Id -> Name -> Id #

setIdType :: Id -> Type -> Id #

Not only does this set the Id Type, it also evaluates the type to try and reduce space usage

mkGlobalId :: IdDetails -> Name -> Type -> IdInfo -> Id #

For an explanation of global vs. local Ids, see GHC.Types.Var.Var

mkVanillaGlobal :: Name -> Type -> Id #

Make a global Id without any extra information at all

mkVanillaGlobalWithInfo :: Name -> Type -> IdInfo -> Id #

Make a global Id with no global information but some generic IdInfo

mkLocalId :: HasDebugCallStack => Name -> Mult -> Type -> Id #

For an explanation of global vs. local Ids, see GHC.Types.Var

mkLocalCoVar :: Name -> Type -> CoVar #

Make a local CoVar

mkLocalIdOrCoVar :: Name -> Mult -> Type -> Id #

Like mkLocalId, but checks the type to see if it should make a covar

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]

mkSysLocal :: FastString -> Unique -> Mult -> Type -> Id #

Create a system local Id. These are local Ids (see Var) that are created by the compiler out of thin air

mkSysLocalOrCoVar :: FastString -> Unique -> Mult -> Type -> Id #

Like mkSysLocal, but checks to see if we have a covar type

mkUserLocal :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id #

Create a user local Id. These are local Ids (see GHC.Types.Var) with a name and location that the user might recognize

mkUserLocalOrCoVar :: OccName -> Unique -> Mult -> Type -> SrcSpan -> Id #

Like mkUserLocal, but checks if we have a coercion type

mkWorkerId :: Unique -> Id -> Type -> Id #

Workers get local names. CoreTidy will externalise these if necessary

mkTemplateLocal :: Int -> Type -> Id #

Create a template local: a family of system local Ids in bijection with Ints, typically used in unfoldings

mkTemplateLocals :: [Type] -> [Id] #

Create a template local for a series of types

mkTemplateLocalsNum :: Int -> [Type] -> [Id] #

Create a template local for a series of type, but start from a specified template local

recordSelectorTyCon :: Id -> RecSelParent #

If the Id is that for a record selector, extract the sel_tycon. Panic otherwise.

isWorkerLikeId :: Id -> Bool #

An Id for which we might require all callers to pass strict arguments properly tagged + evaluated.

See Note [CBV Function Ids]

isJoinId_maybe :: Var -> Maybe JoinArity #

Doesn't return strictness marks

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

hasNoBinding :: Id -> Bool #

Returns True of an Id which may not have a binding, even though it is defined in this module.

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.

asJoinId :: Id -> JoinArity -> JoinId infixl 1 #

asJoinId_maybe :: Id -> Maybe JoinArity -> Id infixl 1 #

setIdArity :: Id -> Arity -> Id infixl 1 #

setIdCallArity :: Id -> Arity -> Id infixl 1 #

idFunRepArity :: Id -> RepArity #

This function counts all arguments post-unarisation, which includes arguments with no runtime representation -- see Note [Unarisation and arity]

isDeadEndId :: Var -> Bool #

Returns true if an application to n args diverges or throws an exception See Note [Dead ends] in GHC.Types.Demand.

idDmdSig :: Id -> DmdSig #

Accesses the Id's dmdSigInfo.

setIdDmdSig :: Id -> DmdSig -> Id infixl 1 #

setIdCprSig :: Id -> CprSig -> Id infixl 1 #

isStrictId :: Id -> Bool #

isStrictId says whether either (a) the Id has a strict demand placed on it or (b) definitely has a "strict type", such that it can always be evaluated strictly (i.e an unlifted type) We need to check (b) as well as (a), because when 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. Returns False if the type is levity polymorphic; False is always safe.

idUnfolding :: IdUnfoldingFun #

Returns the Ids unfolding, but does not expose the unfolding of a strong loop breaker. See unfoldingInfo.

If you really want the unfolding of a strong loopbreaker, call realIdUnfolding.

alwaysActiveUnfoldingFun :: IdUnfoldingFun #

Returns an unfolding only if (a) not a strong loop breaker and (b) always active

whenActiveUnfoldingFun :: (Activation -> Bool) -> IdUnfoldingFun #

Returns an unfolding only if (a) not a strong loop breaker and (b) active in according to is_active

realIdUnfolding :: Id -> Unfolding #

Expose the unfolding if there is one, including for loop breakers

setIdUnfolding :: Id -> Unfolding -> Id infixl 1 #

setIdDemandInfo :: Id -> Demand -> Id infixl 1 #

setIdCbvMarks :: Id -> [CbvMark] -> Id infixl 1 #

If all marks are NotMarkedStrict we just set nothing.

asNonWorkerLikeId :: Id -> Id #

Remove any cbv marks on arguments from a given Id.

asWorkerLikeId :: Id -> Id #

Turn this id into a WorkerLikeId if possible.

zapIdUnfolding :: Id -> Id #

Similar to trimUnfolding, but also removes evaldness info.

setIdSpecialisation :: Id -> RuleInfo -> Id infixl 1 #

idCafInfo :: Id -> CafInfo infixl 1 #

setIdOccInfo :: Id -> OccInfo -> Id infixl 1 #

setInlinePragma :: Id -> InlinePragma -> Id infixl 1 #

setIdOneShotInfo :: Id -> OneShotInfo -> Id infixl 1 #

transferPolyIdInfo :: Id -> [Var] -> Id -> Id #

makeRecoveryTyCon :: TyCon -> TyCon #

Make a fake, recovery TyCon from an existing one. Used when recovering from errors in type declarations

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(,,,)).

cTupleTyConNameArity_maybe :: Name -> Maybe Arity #

If the given name is that of a constraint tuple, return its arity.

unboxedSumKind :: [Type] -> Kind #

Specialization of unboxedTupleSumKind for sums

boxingDataCon :: Type -> BoxingInfo b #

Given a type ty, if ty is not of kind Type, return a data constructor that will box it, and the type of the boxed thing, which does now have kind Type. See Note [Boxing constructors]

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]

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 GHC.Core.Make

mkSumTy :: [Type] -> Type #

mkPromotedListTy #

Arguments

:: Kind

of the elements of the list

-> [Type]

elements

-> Type 

Make a *promoted* list.

filterCTuple :: RdrName -> RdrName #

Replaces constraint tuple names with corresponding boxed ones.

exprFreeVars :: CoreExpr -> VarSet #

Find all locally-defined free Ids or type variables in an expression returning a non-deterministic set.

exprFVs :: CoreExpr -> FV #

Find all locally-defined free Ids or type variables in an expression returning a composable FV computation. See Note [FV naming conventions] in GHC.Utils.FV for why export it.

exprFreeVarsDSet :: CoreExpr -> DVarSet #

Find all locally-defined free Ids or type variables in an expression returning a deterministic set.

exprFreeVarsList :: CoreExpr -> [Var] #

Find all locally-defined free Ids or type variables in an expression returning a deterministically ordered list.

exprFreeIds :: CoreExpr -> IdSet #

Find all locally-defined free Ids in an expression

exprFreeIdsDSet :: CoreExpr -> DIdSet #

Find all locally-defined free Ids in an expression returning a deterministic set.

exprFreeIdsList :: CoreExpr -> [Id] #

Find all locally-defined free Ids in an expression returning a deterministically ordered list.

exprsFreeIdsDSet :: [CoreExpr] -> DIdSet #

Find all locally-defined free Ids in several expressions returning a deterministic set.

exprsFreeIdsList :: [CoreExpr] -> [Id] #

Find all locally-defined free Ids in several expressions returning a deterministically ordered list.

exprsFreeVars :: [CoreExpr] -> VarSet #

Find all locally-defined free Ids or type variables in several expressions returning a non-deterministic set.

exprsFreeVarsList :: [CoreExpr] -> [Var] #

Find all locally-defined free Ids or type variables in several expressions returning a deterministically ordered list.

bindFreeVars :: CoreBind -> VarSet #

Find all locally defined free Ids in a binding group

exprSomeFreeVars #

Arguments

:: InterestingVarFun

Says which Exprs are interesting

-> CoreExpr 
-> VarSet 

Finds free variables in an expression selected by a predicate

exprSomeFreeVarsList #

Arguments

:: InterestingVarFun

Says which Exprs are interesting

-> CoreExpr 
-> [Var] 

Finds free variables in an expression selected by a predicate returning a deterministically ordered list.

exprsSomeFreeVars :: InterestingVarFun -> [CoreExpr] -> VarSet #

Finds free variables in several expressions selected by a predicate

exprsSomeFreeVarsList :: InterestingVarFun -> [CoreExpr] -> [Var] #

Finds free variables in several expressions selected by a predicate returning a deterministically ordered list.

exprsOrphNames :: [CoreExpr] -> NameSet #

Finds the free external names of several expressions: see exprOrphNames for details

orphNamesOfCoCon :: forall (br :: BranchFlag). CoAxiom br -> NameSet #

orphNamesOfAxiomLHS :: forall (br :: BranchFlag). CoAxiom br -> NameSet #

orphNamesOfAxiomLHS collects the names of the concrete types and type constructors that make up the LHS of a type family instance, including the family name itself.

For instance, given `type family Foo a b`: `type instance Foo (F (G (H a))) b = ...` would yield [Foo,F,G,H]

Used (via orphNamesOfFamInst) in the implementation of ":info" in GHCi. and when determining orphan-hood for a FamInst or module

ruleRhsFreeVars :: CoreRule -> VarSet #

Those variables free in the right hand side of a rule returned as a non-deterministic set

rulesRhsFreeIds :: [CoreRule] -> VarSet #

Those locally-defined free Ids in the right hand side of several rules returned as a non-deterministic set

ruleLhsFreeIds :: CoreRule -> VarSet #

This finds all locally-defined free Ids on the left hand side of a rule and returns them as a non-deterministic set

ruleLhsFreeIdsList :: CoreRule -> [Var] #

This finds all locally-defined free Ids on the left hand side of a rule and returns them as a deterministically ordered list

ruleFreeVars :: CoreRule -> VarSet #

Those variables free in the both the left right hand sides of a rule returned as a non-deterministic set

rulesFreeVarsDSet :: [CoreRule] -> DVarSet #

Those variables free in the both the left right hand sides of rules returned as a deterministic set

rulesFreeVars :: [CoreRule] -> VarSet #

Those variables free in both the left right hand sides of several rules

mkRuleInfo :: [CoreRule] -> RuleInfo #

Make a RuleInfo containing a number of CoreRules, suitable for putting into an IdInfo

freeVarsOf :: CoreExprWithFVs -> DIdSet #

Inverse function to freeVars

freeVarsOfAnn :: FVAnn -> DIdSet #

Extract the vars reported in a FVAnn

idFVs :: Id -> FV #

freeVars :: CoreExpr -> CoreExprWithFVs #

Annotate a CoreExpr with its (non-global) free type and value variables at every tree node.

exprType :: HasDebugCallStack => CoreExpr -> Type #

Recover the type of a well-typed Core expression. Fails when applied to the actual Type expression as it cannot really be said to have a type

coreAltType :: CoreAlt -> Type #

Returns the type of the alternatives right hand side

coreAltsType :: [CoreAlt] -> Type #

Returns the type of the first alternative, which should be the same as for all alternatives

mkLamType :: HasDebugCallStack => Var -> Type -> Type #

Makes a (->) type or an implicit forall type, depending on whether it is given a type variable or a term variable. This is used, for example, when producing the type of a lambda. Always uses Inferred binders.

mkLamTypes :: [Var] -> Type -> Type #

mkLamType for multiple type or value arguments

applyTypeToArgs :: HasDebugCallStack => SDoc -> Type -> [CoreExpr] -> Type #

Determines the type resulting from applying an expression with given type

mkCast :: HasDebugCallStack => CoreExpr -> CoercionR -> CoreExpr #

Wrap the given expression in the coercion safely, dropping identity coercions and coalescing nested coercions

mkTick :: CoreTickish -> CoreExpr -> CoreExpr #

Wraps the given expression in the source annotation, dropping the annotation if possible.

stripTicksTop :: (CoreTickish -> Bool) -> Expr b -> ([CoreTickish], Expr b) #

Strip ticks satisfying a predicate from top of an expression

stripTicksTopE :: (CoreTickish -> Bool) -> Expr b -> Expr b #

Strip ticks satisfying a predicate from top of an expression, returning the remaining expression

stripTicksTopT :: (CoreTickish -> Bool) -> Expr b -> [CoreTickish] #

Strip ticks satisfying a predicate from top of an expression, returning the ticks

stripTicksE :: (CoreTickish -> Bool) -> Expr b -> Expr b #

Completely strip ticks satisfying a predicate from an expression. Note this is O(n) in the size of the expression!

bindNonRec :: HasDebugCallStack => Id -> CoreExpr -> CoreExpr -> CoreExpr #

bindNonRec x r b produces either:

let x = r in b

or:

case r of x { _DEFAULT_ -> b }

depending on whether we have to use a case or let binding for the expression (see needsCaseBinding). It's used by the desugarer to avoid building bindings that give Core Lint a heart attack, although actually the simplifier deals with them perfectly well. See also mkCoreLet

needsCaseBinding :: Type -> CoreExpr -> Bool #

Tests whether we have to use a case rather than let binding for this expression as per the invariants of CoreExpr: see GHC.Core

mkAltExpr #

Arguments

:: AltCon

Case alternative constructor

-> [CoreBndr]

Things bound by the pattern match

-> [Type]

The type arguments to the case alternative

-> CoreExpr 

This guy constructs the value that the scrutinee must have given that you are in one particular branch of a case

findDefault :: [Alt b] -> ([Alt b], Maybe (Expr b)) #

Extract the default case alternative

addDefault :: [Alt b] -> Maybe (Expr b) -> [Alt b] #

findAlt :: AltCon -> [Alt b] -> Maybe (Alt b) #

Find the case alternative corresponding to a particular constructor: panics if no such constructor exists

mergeAlts :: [Alt a] -> [Alt a] -> [Alt a] #

Merge alternatives preserving order; alternatives in the first argument shadow ones in the second

trimConArgs :: AltCon -> [CoreArg] -> [CoreArg] #

Given:

case (C a b x y) of
       C b x y -> ...

We want to drop the leading type argument of the scrutinee leaving the arguments to match against the pattern

filterAlts #

Arguments

:: TyCon

Type constructor of scrutinee's type (used to prune possibilities)

-> [Type]

And its type arguments

-> [AltCon]

imposs_cons: constructors known to be impossible due to the form of the scrutinee

-> [Alt b]

Alternatives

-> ([AltCon], [Alt b]) 

refineDefaultAlt #

Arguments

:: [Unique]

Uniques for constructing new binders

-> Mult

Multiplicity annotation of the case expression

-> TyCon

Type constructor of scrutinee's type

-> [Type]

Type arguments of scrutinee's type

-> [AltCon]

Constructors that cannot match the DEFAULT (if any)

-> [CoreAlt] 
-> (Bool, [CoreAlt])

True, if a default alt was replaced with a DataAlt

Refine the default alternative to a DataAlt, if there is a unique way to do so. See Note [Refine DEFAULT case alternatives]

exprOkForSpeculation :: CoreExpr -> Bool #

exprOkForSpeculation returns True of an expression that is:

  • Safe to evaluate even if normal order eval might not evaluate the expression at all, or
  • Safe not to evaluate even if normal order would do so

It is usually called on arguments of unlifted type, but not always In particular, Simplify.rebuildCase calls it on lifted types when a 'case' is a plain seq. See the example in Note [exprOkForSpeculation: case expressions] below

Precisely, it returns True iff: a) The expression guarantees to terminate, b) soon, c) without causing a write side effect (e.g. writing a mutable variable) d) without throwing a Haskell exception e) without risking an unchecked runtime exception (array out of bounds, divide by zero)

For exprOkForSideEffects the list is the same, but omitting (e).

Note that exprIsHNF implies exprOkForSpeculation exprOkForSpeculation implies exprOkForSideEffects

See Note [PrimOp can_fail and has_side_effects] in GHC.Builtin.PrimOps and Note [Transformations affected by can_fail and has_side_effects]

As an example of the considerations in this test, consider:

let x = case y# +# 1# of { r# -> I# r# }
in E

being translated to:

case y# +# 1# of { r# ->
   let x = I# r#
   in E
}

We can only do this if the y + 1 is ok for speculation: it has no side effects, and can't diverge or raise an exception.

exprOkForSideEffects :: CoreExpr -> Bool #

exprOkForSpeculation returns True of an expression that is:

  • Safe to evaluate even if normal order eval might not evaluate the expression at all, or
  • Safe not to evaluate even if normal order would do so

It is usually called on arguments of unlifted type, but not always In particular, Simplify.rebuildCase calls it on lifted types when a 'case' is a plain seq. See the example in Note [exprOkForSpeculation: case expressions] below

Precisely, it returns True iff: a) The expression guarantees to terminate, b) soon, c) without causing a write side effect (e.g. writing a mutable variable) d) without throwing a Haskell exception e) without risking an unchecked runtime exception (array out of bounds, divide by zero)

For exprOkForSideEffects the list is the same, but omitting (e).

Note that exprIsHNF implies exprOkForSpeculation exprOkForSpeculation implies exprOkForSideEffects

See Note [PrimOp can_fail and has_side_effects] in GHC.Builtin.PrimOps and Note [Transformations affected by can_fail and has_side_effects]

As an example of the considerations in this test, consider:

let x = case y# +# 1# of { r# -> I# r# }
in E

being translated to:

case y# +# 1# of { r# ->
   let x = I# r#
   in E
}

We can only do this if the y + 1 is ok for speculation: it has no side effects, and can't diverge or raise an exception.

exprOkForSpecEval :: (Id -> Bool) -> CoreExpr -> Bool #

A special version of exprOkForSpeculation used during Note [Speculative evaluation]. When the predicate arg fun_ok returns False for b, then b is never considered ok-for-spec.

etaExpansionTick :: forall (pass :: TickishPass). Id -> GenTickish pass -> Bool #

Should we look past this tick when eta-expanding the given function?

See Note [Ticks and mandatory eta expansion] Takes the function we are applying as argument.

exprIsHNF :: CoreExpr -> Bool #

exprIsHNF returns true for expressions that are certainly already evaluated to head normal form. This is used to decide whether it's ok to change:

case x of _ -> e

into:

e

and to decide whether it's safe to discard a seq.

So, it does not treat variables as evaluated, unless they say they are. However, it does treat partial applications and constructor applications as values, even if their arguments are non-trivial, provided the argument type is lifted. For example, both of these are values:

(:) (f x) (map f xs)
map (...redex...)

because seq on such things completes immediately.

For unlifted argument types, we have to be careful:

C (f x :: Int#)

Suppose f x diverges; then C (f x) is not a value. We check for this using needsCaseBinding below

exprIsConLike :: CoreExpr -> Bool #

Similar to exprIsHNF but includes CONLIKE functions as well as data constructors. Conlike arguments are considered interesting by the inliner.

exprIsTopLevelBindable :: CoreExpr -> Type -> Bool #

Can we bind this CoreExpr at the top level?

exprIsTickedString :: CoreExpr -> Bool #

Check if the expression is zero or more Ticks wrapped around a literal string.

exprIsTickedString_maybe :: CoreExpr -> Maybe ByteString #

Extract a literal string from an expression that is zero or more Ticks wrapped around a literal string. Returns Nothing if the expression has a different shape. Used to "look through" Ticks in places that need to handle literal strings.

dataConRepInstPat :: [Unique] -> Mult -> DataCon -> [Type] -> ([TyCoVar], [Id]) #

cheapEqExpr :: Expr b -> Expr b -> Bool #

A cheap equality test which bales out fast! If it returns True the arguments are definitely equal, otherwise, they may or may not be equal.

cheapEqExpr' :: (CoreTickish -> Bool) -> Expr b -> Expr b -> Bool #

Cheap expression equality test, can ignore ticks by type.

diffBinds :: Bool -> RnEnv2 -> [(Var, CoreExpr)] -> [(Var, CoreExpr)] -> ([SDoc], RnEnv2) #

Finds differences between core bindings, see diffExpr.

The main problem here is that while we expect the binds to have the same order in both lists, this is not guaranteed. To do this properly we'd either have to do some sort of unification or check all possible mappings, which would be seriously expensive. So instead we simply match single bindings as far as we can. This leaves us just with mutually recursive and/or mismatching bindings, which we then speculatively match by ordering them. It's by no means perfect, but gets the job done well enough.

Only used in GHC.Core.Lint.lintAnnots

isEmptyTy :: Type -> Bool #

True if the type has no non-bottom elements, e.g. when it is an empty datatype, or a GADT with non-satisfiable type parameters, e.g. Int :~: Bool. See Note [Bottoming expressions]

See Note [No alternatives lint check] for another use of this function.

normSplitTyConApp_maybe :: FamInstEnvs -> Type -> Maybe (TyCon, [Type], Coercion) #

If normSplitTyConApp_maybe _ ty = Just (tc, tys, co) then ty |> co = tc tys. It's splitTyConApp_maybe, but looks through coercions via topNormaliseType_maybe. Hence the "norm" prefix.

collectMakeStaticArgs :: CoreExpr -> Maybe (CoreExpr, Type, CoreExpr, CoreExpr) #

collectMakeStaticArgs (makeStatic t srcLoc e) yields Just (makeStatic, t, srcLoc, e).

Returns Nothing for every other expression.

isJoinBind :: CoreBind -> Bool #

Does this binding bind a join point (or a recursive group of join points)?

shouldStrictifyIdForCbv :: Var -> Bool #

Do we expect there to be any benefit if we make this var strict in order for it to get treated as as cbv argument? See Note [Which Ids should be strictified] See Note [CBV Function Ids] for more background.

extendIdSubst :: Subst -> Id -> CoreExpr -> Subst #

Add a substitution for an Id to the Subst: you must ensure that the in-scope set is such that TyCoSubst Note [The substitution invariant] holds after extending the substitution like this

extendIdSubstList :: Subst -> [(Id, CoreExpr)] -> Subst #

Adds multiple Id substitutions to the Subst: see also extendIdSubst

extendSubst :: Subst -> Var -> CoreArg -> Subst #

Add a substitution appropriate to the thing being substituted (whether an expression, type, or coercion). See also extendIdSubst, extendTvSubst, extendCvSubst

extendSubstList :: Subst -> [(Var, CoreArg)] -> Subst #

Add a substitution as appropriate to each of the terms being substituted (whether expressions, types, or coercions). See also extendSubst.

lookupIdSubst :: HasDebugCallStack => Subst -> Id -> CoreExpr #

Find the substitution for an Id in the Subst The Id should not be a CoVar

delBndrs :: Subst -> [Var] -> Subst #

mkOpenSubst :: InScopeSet -> [(Var, CoreArg)] -> Subst #

Simultaneously substitute for a bunch of variables No left-right shadowing ie the substitution for (x y. e) a1 a2 so neither x nor y scope over a1 a2

substExpr :: HasDebugCallStack => Subst -> CoreExpr -> CoreExpr #

substExpr applies a substitution to an entire CoreExpr. Remember, you may only apply the substitution once: See Note [Substitutions apply only once] in GHC.Core.TyCo.Subst

Do *not* attempt to short-cut in the case of an empty substitution! See Note [Extending the IdSubstEnv]

substBindSC :: HasDebugCallStack => Subst -> CoreBind -> (Subst, CoreBind) #

Apply a substitution to an entire CoreBind, additionally returning an updated Subst that should be used by subsequent substitutions.

substBind :: HasDebugCallStack => Subst -> CoreBind -> (Subst, CoreBind) #

Apply a substitution to an entire CoreBind, additionally returning an updated Subst that should be used by subsequent substitutions.

deShadowBinds :: CoreProgram -> CoreProgram #

De-shadowing the program is sometimes a useful pre-pass. It can be done simply by running over the bindings with an empty substitution, because substitution returns a result that has no-shadowing guaranteed.

(Actually, within a single type there might still be shadowing, because substTy is a no-op for the empty substitution, but that's probably OK.)

Aug 09
This function is not used in GHC at the moment, but seems so short and simple that I'm going to leave it here

substBndr :: Subst -> Var -> (Subst, Var) #

Substitutes a Expr for another one according to the Subst given, returning the result and an updated Subst that should be used by subsequent substitutions. IdInfo is preserved by this process, although it is substituted into appropriately.

substBndrs :: Traversable f => Subst -> f Var -> (Subst, f Var) #

Applies substBndr to a number of Exprs, accumulating a new Subst left-to-right

substRecBndrs :: Traversable f => Subst -> f Id -> (Subst, f Id) #

Substitute in a mutually recursive group of Ids

cloneIdBndr :: Subst -> UniqSupply -> Id -> (Subst, Id) #

Very similar to substBndr, but it always allocates a new Unique for each variable in its output. It substitutes the IdInfo though. Discards non-Stable unfoldings

cloneIdBndrs :: Subst -> UniqSupply -> [Id] -> (Subst, [Id]) #

Applies cloneIdBndr to a number of Ids, accumulating a final substitution from left to right Discards non-Stable unfoldings

cloneBndrs :: Subst -> UniqSupply -> [Var] -> (Subst, [Var]) #

cloneRecIdBndrs :: Subst -> UniqSupply -> [Id] -> (Subst, [Id]) #

Clone a mutually recursive group of Ids

substIdInfo :: Subst -> Id -> IdInfo -> Maybe IdInfo #

Substitute into some IdInfo with regard to the supplied new Id. Discards unfoldings, unless they are Stable

substUnfoldingSC :: Subst -> Unfolding -> Unfolding #

Substitutes for the Ids within an unfolding NB: substUnfolding discards any unfolding without without a Stable source. This is usually what we want, but it may be a bit unexpected

substUnfolding :: Subst -> Unfolding -> Unfolding #

Substitutes for the Ids within an unfolding NB: substUnfolding discards any unfolding without without a Stable source. This is usually what we want, but it may be a bit unexpected

substRuleInfo :: Subst -> Id -> RuleInfo -> RuleInfo #

Substitutes for the Ids within the RuleInfo given the new function Id

sortQuantVars :: [Var] -> [Var] #

Sort the variables, putting type and covars first, in scoped order, and then other Ids

It is a deterministic sort, meaning it doesn't look at the values of Uniques. For explanation why it's important See Note [Unique Determinism] in GHC.Types.Unique.

mkCoreApp infixl 4 #

Arguments

:: SDoc 
-> CoreExpr

function

-> CoreExpr

argument

-> CoreExpr 

Construct an expression which represents the application of one expression to the other

mkWildValBinder :: Mult -> Type -> Id #

Make a wildcard binder. This is typically used when you need a binder that you expect to use only at a *binding* site. Do not use it at occurrence sites because it has a single, fixed unique, and it's very easy to get into difficulties with shadowing. That's why it is used so little.

See Note [WildCard binders] in GHC.Core.Opt.Simplify.Env

mkWildCase #

Arguments

:: CoreExpr

scrutinee

-> Scaled Type 
-> Type

res_ty

-> [CoreAlt]

alts

-> CoreExpr 

Make a case expression whose case binder is unused The alts and res_ty should not have any occurrences of WildId

mkIfThenElse #

Arguments

:: CoreExpr

guard

-> CoreExpr

then

-> CoreExpr

else

-> CoreExpr 

mkUncheckedIntExpr :: Integer -> CoreExpr #

Create a CoreExpr which will evaluate to the given Int. Don't check that the number is in the range of the target platform Int

mkIntExprInt :: Platform -> Int -> CoreExpr #

Create a CoreExpr which will evaluate to the given Int

mkIntegerExpr :: Platform -> Integer -> CoreExpr #

Create a CoreExpr which will evaluate to the given Integer

mkNaturalExpr :: Platform -> Integer -> CoreExpr #

Create a CoreExpr which will evaluate to the given Natural

mkStringExprFS :: MonadThings m => FastString -> m CoreExpr #

Create a CoreExpr which will evaluate to a string morally equivalent to the given FastString

mkCoreUnboxedTuple :: [CoreExpr] -> CoreExpr #

Build a small unboxed tuple holding the specified expressions. Do not include the RuntimeRep specifiers; this function calculates them for you. Does not flatten one-tuples; see Note [Flattening one-tuples]

mkCoreTupBoxity :: Boxity -> [CoreExpr] -> CoreExpr #

Make a core tuple of the given boxity; don't flatten 1-tuples

mkCoreVarTupTy :: [Id] -> Type #

Build the type of a small tuple that holds the specified variables One-tuples are flattened; see Note [Flattening one-tuples]

mkCoreTup :: [CoreExpr] -> CoreExpr #

Build a small tuple holding the specified expressions One-tuples are flattened; see Note [Flattening one-tuples]

mkCoreUnboxedSum :: Int -> Int -> [Type] -> CoreExpr -> CoreExpr #

Build an unboxed sum.

Alternative number ("alt") starts from 1.

mkBigCoreVarTup :: [Id] -> CoreExpr #

Build a big tuple holding the specified variables One-tuples are flattened; see Note [Flattening one-tuples] Arguments don't have to have kind Type

mkBigCoreTup :: [CoreExpr] -> CoreExpr #

Build a "big" tuple holding the specified expressions One-tuples are flattened; see Note [Flattening one-tuples] Arguments don't have to have kind Type; ones that do not are boxed This function crashes (in wrapBox) if given a non-Type argument that it doesn't know how to box.

mkBigCoreVarTupTy :: [Id] -> Type #

Build the type of a big tuple that holds the specified variables One-tuples are flattened; see Note [Flattening one-tuples]

mkBigCoreTupTy :: [Type] -> Type #

Build the type of a big tuple that holds the specified type of thing One-tuples are flattened; see Note [Flattening one-tuples]

unitExpr :: CoreExpr #

The unit expression

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 decomposition

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

mkBigTupleSelector #

Arguments

:: [Id]

The Ids to pattern match the tuple against

-> Id

The Id to select

-> Id

A variable of the same type as the scrutinee

-> CoreExpr

Scrutinee

-> CoreExpr

Selector expression

mkBigTupleSelectorSolo is like mkBigTupleSelector but one-tuples are NOT flattened (see Note [Flattening one-tuples])

Builds a selector which scrutinises the given expression and extracts the one name from the list given. If you want the no-shadowing rule to apply, the caller is responsible for making sure that none of these names are in scope.

If there is just one Id in the tuple, then the selector is just the identity.

If necessary, we pattern match on a "big" tuple.

A tuple selector is not linear in its argument. Consequently, the case expression built by mkBigTupleSelector must consume its scrutinee Many times. And all the argument variables must have multiplicity Many.

mkBigTupleSelectorSolo #

Arguments

:: [Id]

The Ids to pattern match the tuple against

-> Id

The Id to select

-> Id

A variable of the same type as the scrutinee

-> CoreExpr

Scrutinee

-> CoreExpr

Selector expression

Builds a selector which scrutinises the given expression and extracts the one name from the list given. If you want the no-shadowing rule to apply, the caller is responsible for making sure that none of these names are in scope.

If there is just one Id in the tuple, then the selector is just the identity.

If necessary, we pattern match on a "big" tuple.

A tuple selector is not linear in its argument. Consequently, the case expression built by mkBigTupleSelector must consume its scrutinee Many times. And all the argument variables must have multiplicity Many.

mkBigTupleCase #

Arguments

:: UniqSupply

For inventing names of intermediate variables

-> [Id]

The tuple identifiers to pattern match on; Bring these into scope in the body

-> CoreExpr

Body of the case

-> CoreExpr

Scrutinee

-> CoreExpr 

A generalization of mkBigTupleSelector, allowing the body of the case to be an arbitrary expression.

To avoid shadowing, we use uniques to invent new variables.

If necessary we pattern match on a "big" tuple.

wrapFloats :: [FloatBind] -> CoreExpr -> CoreExpr #

Applies the floats from right to left. That is wrapFloats [b1, b2, …, bn] u = let b1 in let b2 in … in let bn in u

mkNilExpr :: Type -> CoreExpr #

Makes a list [] for lists of the specified type

mkConsExpr :: Type -> CoreExpr -> CoreExpr -> CoreExpr #

Makes a list (:) for lists of the specified type

mkListExpr :: Type -> [CoreExpr] -> CoreExpr #

Make a list containing the given expressions, where the list has the given type

mkFoldrExpr #

Arguments

:: MonadThings m 
=> Type

Element type of the list

-> Type

Fold result type

-> CoreExpr

Cons function expression for the fold

-> CoreExpr

Nil expression for the fold

-> CoreExpr

List expression being folded acress

-> m CoreExpr 

Make a fully applied foldr expression

mkBuildExpr #

Arguments

:: (MonadFail m, MonadThings m, MonadUnique m) 
=> Type

Type of list elements to be built

-> ((Id, Type) -> (Id, Type) -> m CoreExpr)

Function that, given information about the Ids of the binders for the build worker function, returns the body of that worker

-> m CoreExpr 

Make a build expression applied to a locally-bound worker function

mkNothingExpr :: Type -> CoreExpr #

Makes a Nothing for the specified type

mkJustExpr :: Type -> CoreExpr -> CoreExpr #

Makes a Just from a value of the specified type

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.

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"

addImplicitQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs #

These includes are not considered while fingerprinting the flags for iface | See Note [Implicit include paths]

flattenIncludes :: IncludeSpecs -> [String] #

Concatenate and flatten the list of global and quoted includes returning just a flat list of paths.

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.

versionedAppDir :: String -> ArchOS -> MaybeT IO FilePath #

The directory for this version of ghc in the user's app directory The appdir used to be in ~/.ghc but to respect the XDG specification we want to move it under $XDG_DATA_HOME/ However, old tooling (like cabal) might still write package environments to the old directory, so we prefer that if a subdirectory of ~/.ghc with the correct target and GHC version suffix exists.

i.e. if ~.ghc$UNIQUE_SUBDIR exists we use that otherwise we use $XDG_DATA_HOME/$UNIQUE_SUBDIR

UNIQUE_SUBDIR is typically a combination of the target platform and GHC version

positionIndependent :: DynFlags -> Bool #

Are we building with -fPIE or -fPIC enabled?

initDynFlags :: DynFlags -> IO DynFlags #

Used by runGhc to partially initialize a new DynFlags value

defaultDynFlags :: Settings -> DynFlags #

The normal DynFlags. Note that they are not suitable for use in this form and must be fully initialized by runGhc first.

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_guideexts.

dopt :: DumpFlag -> DynFlags -> Bool #

Test whether a DumpFlag is set

gopt :: GeneralFlag -> DynFlags -> Bool #

Test whether a GeneralFlag is set

Note that dynamicNow (i.e., dynamic objects built with `-dynamic-too`) always implicitly enables Opt_PIC, Opt_ExternalDynamicRefs, and disables Opt_SplitSections.

wopt :: WarningFlag -> DynFlags -> Bool #

Test whether a WarningFlag is set

wopt_fatal :: WarningFlag -> DynFlags -> Bool #

Test whether a WarningFlag is set as fatal

wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags #

Mark a WarningFlag as fatal (do not set the flag)

xopt :: Extension -> DynFlags -> Bool #

Test whether a Extension is set

xopt_set_unlessExplSpec :: Extension -> (DynFlags -> Extension -> DynFlags) -> DynFlags -> DynFlags #

Set or unset a Extension, unless it has been explicitly set or unset before.

packageTrustOn :: DynFlags -> Bool #

Is the -fpackage-trust mode on

safeHaskellOn :: DynFlags -> Bool #

Is Safe Haskell on in some way (including inference mode)

safeLanguageOn :: DynFlags -> Bool #

Is the Safe Haskell safe language in use

safeInferOn :: DynFlags -> Bool #

Is the Safe Haskell safe inference mode active

safeImportsOn :: DynFlags -> Bool #

Test if Safe Imports are on in some form

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

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.

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

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

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

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

updOptLevel :: Int -> DynFlags -> DynFlags #

Sets the DynFlags to be appropriate to the optimisation level

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).

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.

runCmdLineP :: CmdLineP s a -> s -> (a, s) #

processCmdLineP #

Arguments

:: forall s m. MonadIO m 
=> [Flag (CmdLineP s)]

valid flags to match against

-> s

current state

-> [Located String]

arguments to parse

-> m (([Located String], [Err], [Warn]), s)

(leftovers, errors, warnings)

A helper to parse a set of flags from a list of command-line arguments, handling response files.

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.

allNonDeprecatedFlags :: [String] #

All dynamic flags option strings without the deprecated ones. These are the user facing strings for enabling and disabling options.

flagsForCompletion :: Bool -> [String] #

Make a list of flags for shell completion. Filter all available flags into two groups, for interactive GHC vs all other.

wWarningFlags :: [FlagSpec WarningFlag] #

These -W<blah> flags can all be reversed with -Wno-<blah>

fFlags :: [FlagSpec GeneralFlag] #

These -f<blah> flags can all be reversed with -fno-<blah>

fLangFlags :: [FlagSpec Extension] #

These -f<blah> flags can all be reversed with -fno-<blah>

xFlags :: [FlagSpec Extension] #

These -Xblah flags can all be reversed with -XNoblah

targetProfile :: DynFlags -> Profile #

Get target profile

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.

sccProfilingEnabled :: DynFlags -> Bool #

Indicate if cost-centre profiling is enabled

needSourceNotes :: DynFlags -> Bool #

Indicate whether we need to generate source notes

useXLinkerRPath :: DynFlags -> OS -> Bool #

Should we use `-XLinker -rpath` when linking or not? See Note [-fno-use-rpaths]

initSDocContext :: DynFlags -> PprStyle -> SDocContext #

Initialize the pretty-printing options

initDefaultSDocContext :: DynFlags -> SDocContext #

Initialize the pretty-printing options using the default user style

pprDynFlagsDiff :: DynFlags -> DynFlags -> SDoc #

Pretty-print the difference between 2 DynFlags.

For now only their general flags but it could be extended. Useful mostly for debugging.

lookupUnit :: UnitState -> Unit -> Maybe UnitInfo #

Find the unit we know about with the given unit, if any

lookupUnit' :: Bool -> UnitInfoMap -> PreloadUnitClosure -> Unit -> Maybe UnitInfo #

A more specialized interface, which doesn't require a UnitState (so it can be used while we're initializing DynFlags)

Parameters: * a boolean specifying whether or not to look for on-the-fly renamed interfaces * a UnitInfoMap * a PreloadUnitClosure

lookupUnitId :: UnitState -> UnitId -> Maybe UnitInfo #

Find the unit we know about with the given unit id, if any

lookupUnitId' :: UnitInfoMap -> UnitId -> Maybe UnitInfo #

Find the unit we know about with the given unit id, if any

unsafeLookupUnit :: HasDebugCallStack => UnitState -> Unit -> UnitInfo #

Looks up the given unit in the unit state, panicking if it is not found

unsafeLookupUnitId :: HasDebugCallStack => UnitState -> UnitId -> UnitInfo #

Looks up the given unit id in the unit state, panicking if it is not found

lookupPackageName :: UnitState -> PackageName -> Maybe UnitId #

Find the unit we know about with the given package name (e.g. foo), if any (NB: there might be a locally defined unit name which overrides this) This function is unsafe to use in general because it doesn't respect package visibility.

searchPackageId :: UnitState -> PackageId -> [UnitInfo] #

Search for units with a given package ID (e.g. "foo-0.1")

resolvePackageImport :: UnitState -> ModuleName -> PackageName -> Maybe UnitId #

Find the UnitId which an import qualified by a package import comes from. Compared to lookupPackageName, this function correctly accounts for visibility, renaming and thinning.

listUnitInfo :: UnitState -> [UnitInfo] #

Get a list of entries from the unit database. NB: be careful with this function, although all units in this map are "visible", this does not imply that the exposed-modules of the unit are available (they may have been thinned or renamed).

initUnits :: Logger -> DynFlags -> Maybe [UnitDatabase UnitId] -> Set UnitId -> IO ([UnitDatabase UnitId], UnitState, HomeUnit, Maybe PlatformConstants) #

Read the unit database files, and sets up various internal tables of unit information, according to the unit-related flags on the command-line (-package, -hide-package etc.)

initUnits can be called again subsequently after updating the packageFlags field of the DynFlags, and it will update the unitState in DynFlags.

getUnitDbRefs :: UnitConfig -> IO [PkgDbRef] #

resolveUnitDatabase :: UnitConfig -> PkgDbRef -> IO (Maybe FilePath) #

Return the path of a package database from a PkgDbRef. Return Nothing when the user database filepath is expected but the latter doesn't exist.

NB: This logic is reimplemented in Cabal, so if you change it, make sure you update Cabal. (Or, better yet, dump it in the compiler info so Cabal can use the info.)

unwireUnit :: UnitState -> Unit -> Unit #

Given a wired-in Unit, "unwire" it into the Unit that it was recorded as in the package database.

lookupModuleInAllUnits :: UnitState -> ModuleName -> [(Module, UnitInfo)] #

Takes a ModuleName, and if the module is in any package returns list of modules which take that name.

lookupModulePackage :: UnitState -> ModuleName -> PkgQual -> Maybe [UnitInfo] #

The package which the module **appears** to come from, this could be the one which reexports the module from it's original package. This function is currently only used for -Wunused-packages

closeUnitDeps :: UnitInfoMap -> [(UnitId, Maybe UnitId)] -> MaybeErr UnitErr [UnitId] #

Takes a list of UnitIds (and their "parent" dependency, used for error messages), and returns the list with dependencies included, in reverse dependency order (a units appears before those it depends on).

closeUnitDeps' :: UnitInfoMap -> [UnitId] -> [(UnitId, Maybe UnitId)] -> MaybeErr UnitErr [UnitId] #

Similar to closeUnitDeps but takes a list of already loaded units as an additional argument.

requirementMerges :: UnitState -> ModuleName -> [InstantiatedModule] #

Return this list of requirement interfaces that need to be merged to form mod_name, or [] if this is not a requirement.

pprUnitIdForUser :: UnitState -> UnitId -> SDoc #

Pretty-print a UnitId for the user.

Cabal packages may contain several components (programs, libraries, etc.). As far as GHC is concerned, installed package components ("units") are identified by an opaque UnitId string provided by Cabal. As the string contains a hash, we don't want to display it to users so GHC queries the database to retrieve some infos about the original source package (name, version, component name).

Instead we want to display: packagename-version[:componentname]

Component name is only displayed if it isn't the default library

To do this we need to query a unit database.

pprUnits :: UnitState -> SDoc #

Show (very verbose) package info

pprUnitsSimple :: UnitState -> SDoc #

Show simplified unit info.

The idea is to only print package id, and any information that might be different from the package databases (exposure, trust)

pprModuleMap :: ModuleNameProvidersMap -> SDoc #

Show the mapping of modules to where they come from.

improveUnit :: UnitState -> Unit -> Unit #

Given a fully instantiated GenInstantiatedUnit, improve it into a RealUnit if we can find it in the package database.

instUnitToUnit :: UnitState -> InstantiatedUnit -> Unit #

Check the database to see if we already have an installed unit that corresponds to the given GenInstantiatedUnit.

Return a UnitId which either wraps the GenInstantiatedUnit unchanged or references a matching installed unit.

See Note [VirtUnit to RealUnit improvement]

renameHoleModule :: UnitState -> ShHoleSubst -> Module -> Module #

Substitutes holes in a GenModule. NOT suitable for being called directly on a nameModule, see Note [Representation of module/name variables]. p[A=<A>]:B maps to p[A=q():A]:B with A=q():A; similarly, <A> maps to q():A.

renameHoleUnit :: UnitState -> ShHoleSubst -> Unit -> Unit #

Substitutes holes in a Unit, suitable for renaming when an include occurs; see Note [Representation of module/name variables].

p[A=<A>] maps to p[A=<B>] with A=<B>.

renameHoleModule' :: UnitInfoMap -> PreloadUnitClosure -> ShHoleSubst -> Module -> Module #

Like renameHoleModule, but requires only ClosureUnitInfoMap so it can be used by GHC.Unit.State.

renameHoleUnit' :: UnitInfoMap -> PreloadUnitClosure -> ShHoleSubst -> Unit -> Unit #

Like 'renameHoleUnit, but requires only ClosureUnitInfoMap so it can be used by GHC.Unit.State.

implicitPackageDeps :: DynFlags -> [UnitId] #

Add package dependencies on the wired-in packages we use

showSDoc :: DynFlags -> SDoc -> String #

Show a SDoc as a String with the default user style

showSDocForUser :: DynFlags -> UnitState -> NamePprCtx -> SDoc -> String #

Allows caller to specify the NamePprCtx to use

mkRule :: Module -> Bool -> Bool -> RuleName -> Activation -> Name -> [CoreBndr] -> [CoreExpr] -> CoreExpr -> CoreRule #

Used to make CoreRule for an Id defined in the module being compiled. See also CoreRule

roughTopNames :: [CoreExpr] -> [Maybe Name] #

Find the "top" free names of several expressions. Such names are either:

  1. The function finally being applied to in an application chain (if that name is a GlobalId: see GHC.Types.Var), or
  2. The TyCon if the expression is a Type

This is used for the fast-match-check for rules; if the top names don't match, the rest can't

rulesOfBinds :: [CoreBind] -> [CoreRule] #

Gather all the rules for locally bound identifiers from the supplied bindings

lookupRule :: RuleOpts -> InScopeEnv -> (Activation -> Bool) -> Id -> [CoreExpr] -> [CoreRule] -> Maybe (CoreRule, CoreExpr) #

The main rule matching function. Attempts to apply all (active) supplied rules to this instance of an application in a given context, returning the rule applied and the resulting expression if successful.

ruleCheckProgram #

Arguments

:: RuleOpts

Rule options

-> CompilerPhase

Rule activation test

-> String

Rule pattern

-> (Id -> [CoreRule])

Rules for an Id

-> CoreProgram

Bindings to check in

-> SDoc

Resulting check message

Report partial matches for rules beginning with the specified string for the purposes of error reporting

mi_boot :: ModIface -> IsBootInterface #

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

mi_fix :: ModIface -> OccName -> Fixity #

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

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_free_holes :: ModIface -> UniqDSet ModuleName #

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

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.

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

Constructs cache for the mi_hash_fn field of a ModIface

ms_imps :: ModSummary -> [(PkgQual, Located ModuleName)] #

Textual imports, plus plugin imports but not SOURCE imports.

ms_home_srcimps :: ModSummary -> [Located ModuleName] #

Like ms_home_imps, but for SOURCE imports.

ms_home_imps :: ModSummary -> [(PkgQual, 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.)

isBootSummary :: ModSummary -> IsBootInterface #

Did this ModSummary originate from a hs-boot file?

msDeps :: ModSummary -> [(PkgQual, GenWithIsBoot (Located ModuleName))] #

Returns the dependencies of the ModSummary s.

findTarget :: ModSummary -> [Target] -> Maybe Target #

Find the first target in the provided list which matches the specified ModSummary.

fromParseContext :: ParseContext -> PsErrInPatDetails #

Builds a PsErrInPatDetails with the information provided by the ParseContext.

handleSourceError #

Arguments

:: MonadCatch 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.

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

mkInteractiveHscEnv :: HscEnv -> HscEnv #

Switches in the DynFlags and Plugins from the InteractiveContext

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

A variant of runHsc that switches in the DynFlags and Plugins from the InteractiveContext before running the Hsc computation.

hscEPS :: HscEnv -> IO ExternalPackageState #

Retrieve the ExternalPackageState cache.

hptAllInstances :: HscEnv -> (InstEnv, [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.

hptInstancesBelow :: HscEnv -> UnitId -> ModuleNameWithIsBoot -> (InstEnv, [FamInst]) #

Find instances visible from the given set of imports

hptRules :: HscEnv -> UnitId -> ModuleNameWithIsBoot -> [CoreRule] #

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

hptAnns :: HscEnv -> Maybe (UnitId, ModuleNameWithIsBoot) -> [Annotation] #

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

hptAllThings :: (HomeModInfo -> [a]) -> HscEnv -> [a] #

hptSomeThingsBelowUs :: (HomeModInfo -> [a]) -> Bool -> HscEnv -> UnitId -> ModuleNameWithIsBoot -> [a] #

Get things from modules "below" this one (in the dependency sense) C.f Inst.hptInstances

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

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

lookupType :: HscEnv -> Name -> IO (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

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

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

hscInterp :: HscEnv -> Interp #

Retrieve the target code interpreter

Fails if no target code interpreter is available

hscUpdateLoggerFlags :: HscEnv -> HscEnv #

Update the LogFlags of the Log in hsc_logger from the DynFlags in hsc_dflags. You need to call this when DynFlags are modified.

hscUpdateFlags :: (DynFlags -> DynFlags) -> HscEnv -> HscEnv #

Update Flags

discardIC :: HscEnv -> HscEnv #

Discard the contents of the InteractiveContext, but keep the DynFlags and the loaded plugins. It will also keep ic_int_print and ic_monad if their names are from external packages.

runCoreM #

Arguments

:: HscEnv 
-> RuleBase 
-> Char

Mask

-> Module 
-> NamePprCtx 
-> SrcSpan 
-> CoreM a 
-> IO (a, SimplCount) 

liftIOWithCount :: IO (SimplCount, a) -> CoreM a #

Lift an IO operation into CoreM while consuming its SimplCount

mapDynFlagsCoreM :: (DynFlags -> DynFlags) -> CoreM a -> CoreM a #

Adjust the dyn flags passed to the argument action

dropSimplCount :: CoreM a -> CoreM a #

Drop the single count of the argument action so it doesn't effect the total.

getAnnotations :: Typeable a => ([Word8] -> a) -> ModGuts -> CoreM (ModuleEnv [a], NameEnv [a]) #

Get all annotations of a given type. This happens lazily, that is no deserialization will take place until the [a] is actually demanded and the [a] can also be empty (the UniqFM is not filtered).

This should be done once at the start of a Core-to-Core pass that uses annotations.

See Note [Annotations]

getFirstAnnotations :: Typeable a => ([Word8] -> a) -> ModGuts -> CoreM (ModuleEnv a, NameEnv a) #

Get at most one annotation of a given type per annotatable item.

putMsgS :: String -> CoreM () #

Output a String message to the screen

fatalErrorMsgS :: String -> CoreM () #

Output a fatal error to the screen. Does not cause the compiler to die.

debugTraceMsgS :: String -> CoreM () #

Output a string debugging message at verbosity level of -v or higher

defaultPlugin :: Plugin #

Default plugin: does nothing at all, except for marking that safe inference has failed unless -fplugin-trustworthy is passed. For compatibility reason you should base all your plugin definitions on this default value.

keepRenamedSource :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn) #

A renamer plugin which mades the renamed source available in a typechecker plugin.

withPlugins :: Monad m => Plugins -> PluginOperation m a -> a -> m a #

Perform an operation by using all of the plugins in turn.

mapPlugins :: Plugins -> (Plugin -> [CommandLineOption] -> a) -> [a] #

withPlugins_ :: Monad m => Plugins -> ConstPluginOperation m a -> a -> m () #

Perform a constant operation by using all of the plugins in turn.

findImportedModule :: HscEnv -> ModuleName -> PkgQual -> IO FindResult #

Locate a module that was imported by the user. We have the module's name, and possibly a package name. Without a package name, this function will use the search path and the known exposed packages to find the module, if a package is specified then only that package is searched for the module.

findPluginModule :: FinderCache -> FinderOpts -> UnitState -> Maybe HomeUnit -> ModuleName -> IO FindResult #

Locate a plugin module requested by the user, for a compiler plugin. This consults the same set of exposed packages as findImportedModule, unless -hide-all-plugin-packages or -plugin-package are specified.

findExactModule :: FinderCache -> FinderOpts -> UnitEnvGraph FinderOpts -> UnitState -> Maybe HomeUnit -> InstalledModule -> IO InstalledFindResult #

Locate a specific GenModule. The purpose of this function is to create a ModLocation for a given GenModule, that is to find out where the files associated with this module live. It is used when reading the interface for a module mentioned by another interface, for example (a "system import").

mkObjPath :: FinderOpts -> FilePath -> String -> FilePath #

Constructs the filename of a .o file for a given source file. Does not check whether the .o file exists

mkHiPath :: FinderOpts -> FilePath -> String -> FilePath #

Constructs the filename of a .hi file for a given source file. Does not check whether the .hi file exists

lookupOrig :: Module -> OccName -> TcRnIf a b Name #

Look up the Name for a given GenModule and OccName. Consider alternatively using lookupIfaceTop if you're in the IfL monad and GenModule is simply that of the ModIface you are typechecking.

extendIfaceIdEnv :: [Id] -> IfL a -> IfL a #

lookupIfaceTop :: OccName -> IfL Name #

Look up a top-level name from the current Iface module

trace_if :: Logger -> SDoc -> IO () #

thNameToGhcName :: Name -> CoreM (Maybe Name) #

Attempt to convert a Template Haskell name to one that GHC can understand. Original TH names such as those you get when you use the 'foo syntax will be translated to their equivalent GHC name exactly. Qualified or unqualified TH names will be dynamically bound to names in the module being compiled, if possible. Exact TH names will be bound to the name they represent, exactly.

thNameToGhcNameIO :: NameCache -> Name -> IO (Maybe Name) #

Attempt to convert a Template Haskell name to one that GHC can understand. Original TH names such as those you get when you use the 'foo syntax will be translated to their equivalent GHC name exactly. Qualified or unqualified TH names will be dynamically bound to names in the module being compiled, if possible. Exact TH names will be bound to the name they represent, exactly.

One must be careful to consistently use the same NameCache to create identifier that might be compared. (C.f. how the ST Monad enforces that variables from separate runST invocations are never intermingled; it would be valid to use the same tricks for Names and NameCaches.)

For now, the easiest and recommended way to ensure a consistent NameCache is used it to retrieve the preexisting one from an active HscEnv. A single HscEnv is created per GHC "session", and this ensures everything in that session will get the same name cache.

initHscEnv :: Maybe FilePath -> IO HscEnv #

Initialize HscEnv from an optional top_dir path

ioMsgMaybe :: IO (Messages GhcMessage, 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).

hscTcRnLookupRdrName :: HscEnv -> LocatedN RdrName -> IO (NonEmpty Name) #

Lookup things in the compiler's environment

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

Rename some import declarations

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

parse a file, returning the abstract syntax

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

Rename and typecheck a module, additionally returning the renamed syntax

hscTypecheckAndGetWarnings :: HscEnv -> ModSummary -> IO (FrontendResult, WarningMessages) #

Do Typechecking without throwing SourceError exception with -Werror

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

Convert a typechecked module to Core

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

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

hscRecompStatus :: Maybe Messager -> HscEnv -> ModSummary -> Maybe ModIface -> HomeModLinkable -> (Int, Int) -> IO HscRecompStatus #

Do the recompilation avoidance checks for both one-shot and --make modes This function is the *only* place in the compiler where we decide whether to recompile a module or not!

hscMaybeWriteIface #

Arguments

:: Logger 
-> DynFlags 
-> Bool

Is this a simple interface generated after the core pipeline, or one with information from the backend? See: Note [Writing interface files]

-> ModIface 
-> Maybe Fingerprint

The old interface hash, used to decide if we need to actually write the new interface.

-> ModLocation 
-> IO () 

Write interface files

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.

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

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

hscSimplify :: HscEnv -> [String] -> ModGuts -> IO ModGuts #

Run Core2Core simplifier. The list of String is a list of (Core) plugin module names added via TH (cf addCorePlugin).

hscSimplify' :: [String] -> ModGuts -> Hsc ModGuts #

Run Core2Core simplifier. The list of String is a list of (Core) plugin module names added via TH (cf addCorePlugin).

hscGenHardCode #

Arguments

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

Just f = _stub.c is f

Compile to hard-code.

doCodeGen #

Arguments

:: HscEnv 
-> Module 
-> InfoTableProvMap 
-> [TyCon] 
-> CollectedCCs 
-> [CgStgTopBinding]

Bindings come already annotated with fvs

-> HpcInfo 
-> IO (Stream IO CmmGroupSRTs CmmCgInfos) 

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.

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.

hscParsedStmt #

Arguments

:: HscEnv 
-> GhciLStmt GhcPs

The parsed statement

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

hscDecls #

Arguments

:: HscEnv 
-> String

The statement

-> IO ([TyThing], InteractiveContext) 

Compile a decls

hscDeclsWithLocation #

Arguments

:: HscEnv 
-> String

The statement

-> String

The source

-> Int

Starting line

-> IO ([TyThing], InteractiveContext) 

Compile a decls

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

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

hscTcExpr #

Arguments

:: HscEnv 
-> TcRnExprMode 
-> String

The expression

-> IO Type 

Typecheck an expression (but don't run it)

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

toSerialized :: Typeable a => (a -> [Word8]) -> a -> Serialized #

Put a Typeable value that we are able to actually turn into bytes into a Serialized value ready for deserialization later

fromSerialized :: Typeable a => ([Word8] -> a) -> Serialized -> Maybe a #

If the Serialized value contains something of the given type, then use the specified deserializer to return Just that. Otherwise return Nothing.

serializeWithData :: Data a => a -> [Word8] #

Use a Data instance to implement a serialization scheme dual to that of deserializeWithData

deserializeWithData :: Data a => [Word8] -> a #

Use a Data instance to implement a deserialization scheme dual to that of serializeWithData