hiedb-0.6.0.0: Generates a references DB from .hie files

Safe Haskell | None
Language | Haskell2010

HieDb.Compat

Contents

- Types re-exports
- Dynflags re-exports
- AvailInfo
- SrcSpan
- Systools
- Hie Types
- Outputable
- FastString
- IFace

Synopsis

- nodeInfo' :: HieAST TypeIndex -> NodeInfo TypeIndex
- type Unit = GenUnit UnitId
- unitString :: IsUnitId u => u -> String
- stringToUnit :: String -> Unit
- moduleUnit :: GenModule unit -> unit
- unhelpfulSpanFS :: UnhelpfulSpanReason -> FastString
- data ModuleName
- mkModuleName :: String -> ModuleName
- moduleName :: GenModule unit -> ModuleName
- moduleNameString :: ModuleName -> String
- data Fingerprint
- unpackFS :: FastString -> String
- readHexFingerprint :: String -> Fingerprint
- getFileHash :: FilePath -> IO Fingerprint
- data NameSpace
- data OccName
- mkOccName :: NameSpace -> String -> OccName
- nameOccName :: Name -> OccName
- occNameSpace :: OccName -> NameSpace
- occNameString :: OccName -> String
- mkVarOccFS :: FastString -> OccName
- data Name
- nameSrcSpan :: Name -> SrcSpan
- type NameCacheUpdater = NameCache
- data NameCache
- nsNames :: NameCache -> MVar OrigNameCache
- initNameCache :: Char -> [Name] -> IO NameCache
- lookupOrigNameCache :: OrigNameCache -> Module -> OccName -> Maybe Name
- type Module = GenModule Unit
- mkModule :: u -> ModuleName -> GenModule u
- nameModule_maybe :: Name -> Maybe Module
- nameModule :: HasDebugCallStack => Name -> Module
- varName :: NameSpace
- isVarNameSpace :: NameSpace -> Bool
- dataName :: NameSpace
- isDataConNameSpace :: NameSpace -> Bool
- tcClsName :: NameSpace
- isTcClsNameSpace :: NameSpace -> Bool
- tvName :: NameSpace
- isTvNameSpace :: NameSpace -> Bool
- flLabel :: FieldLabel -> FieldLabelString
- data DynFlags
- defaultDynFlags :: Settings -> DynFlags
- data LlvmConfig = LlvmConfig {
  - llvmTargets :: [(String, LlvmTarget)]
  - llvmPasses :: [(Int, String)]
  }
- data AvailInfo
- pattern AvailName :: Name -> AvailInfo
- pattern AvailFL :: FieldLabel -> AvailInfo
- pattern AvailTC :: Name -> [Name] -> [FieldLabel] -> AvailInfo
- flSelector :: FieldLabel -> Name
- data SrcSpan
  - = RealSrcSpan !RealSrcSpan !(Maybe BufSpan)
  - | UnhelpfulSpan !UnhelpfulSpanReason
- data RealSrcSpan
- mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc
- mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan
- srcSpanStartLine :: RealSrcSpan -> Int
- srcSpanStartCol :: RealSrcSpan -> Int
- srcSpanEndLine :: RealSrcSpan -> Int
- srcSpanEndCol :: RealSrcSpan -> Int
- mkSplitUniqSupply :: Char -> IO UniqSupply
- initSysTools :: String -> IO Settings
- type HiePath = LexicalFastString
- hiePathToFS :: HiePath -> FastString
- (<+>) :: IsLine doc => doc -> doc -> doc
- ppr :: Outputable a => a -> SDoc
- showSDoc :: DynFlags -> SDoc -> String
- hang :: SDoc -> Int -> SDoc -> SDoc
- text :: IsLine doc => String -> doc
- data FastString
- data IfaceType
- data IfaceTyCon = IfaceTyCon {
  - ifaceTyConName :: IfExtName
  - ifaceTyConInfo :: IfaceTyConInfo
  }
- field_label :: FieldLabelString -> FastString
- dfs :: Ord a => AdjacencyMap a -> [a] -> [a]
- fieldNameSpace_maybe :: NameSpace -> Maybe FastString
- fieldName :: FastString -> NameSpace
- mkFastStringByteString :: ByteString -> FastString

# Documentation

nodeInfo' :: HieAST TypeIndex -> NodeInfo TypeIndex #

type Unit = GenUnit UnitId #

unitString :: IsUnitId u => u -> String #

stringToUnit :: String -> Unit #

moduleUnit :: GenModule unit -> unit #

Unit the module belongs to

unhelpfulSpanFS :: UnhelpfulSpanReason -> FastString #

# Types re-exports

data ModuleName #

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

#### 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 Methods showsPrec :: Int -> ModuleName -> ShowS # show :: ModuleName -> String # showList :: [ModuleName] -> ShowS #
NFData ModuleName |
Instance details Defined in Language.Haskell.Syntax.Module.Name Methods rnf :: ModuleName -> () #
Uniquable ModuleName |
Instance details Defined in GHC.Types.Unique Methods getUnique :: ModuleName -> Unique #
Binary ModuleName |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> ModuleName -> IO () # put :: BinHandle -> ModuleName -> IO (Bin ModuleName) # get :: BinHandle -> IO ModuleName #
Outputable ModuleName |
Instance details Defined in GHC.Utils.Outputable Methods ppr :: ModuleName -> SDoc #
Eq ModuleName |
Instance details Defined in Language.Haskell.Syntax.Module.Name Methods (==) :: ModuleName -> ModuleName -> Bool # (/=) :: ModuleName -> ModuleName -> Bool #
Ord ModuleName |
Instance details Defined in Language.Haskell.Syntax.Module.Name Methods compare :: ModuleName -> ModuleName -> Ordering # (<) :: ModuleName -> ModuleName -> Bool # (<=) :: ModuleName -> ModuleName -> Bool # (>) :: ModuleName -> ModuleName -> Bool # (>=) :: ModuleName -> ModuleName -> Bool # max :: ModuleName -> ModuleName -> ModuleName # min :: ModuleName -> ModuleName -> ModuleName #
FromField ModuleName # |
Instance details Defined in HieDb.Types Methods fromField :: FieldParser ModuleName #
FromRow ModuleName # |
Instance details Defined in HieDb.Types Methods fromRow :: RowParser ModuleName #
ToField ModuleName # |
Instance details Defined in HieDb.Types Methods toField :: ModuleName -> SQLData #
ToHie (IEContext (LocatedA ModuleName)) |
Instance details Defined in GHC.Iface.Ext.Ast Methods toHie :: IEContext (LocatedA ModuleName) -> HieM [HieAST Type]
type Anno ModuleName |
Instance details Defined in GHC.Hs type Anno ModuleName = SrcSpanAnnA
type Anno ModuleName |
Instance details Defined in GHC.Hs.ImpExp type Anno ModuleName = SrcSpanAnnA

mkModuleName :: String -> ModuleName #

moduleName :: GenModule unit -> ModuleName #

Module name (e.g. A.B.C)

moduleNameString :: ModuleName -> String #

data Fingerprint #

#### Instances

Instances details

Storable Fingerprint | Since: base-4.4.0.0
Instance details Defined in Foreign.Storable Methods sizeOf :: Fingerprint -> Int # alignment :: Fingerprint -> Int # peekElemOff :: Ptr Fingerprint -> Int -> IO Fingerprint # pokeElemOff :: Ptr Fingerprint -> Int -> Fingerprint -> IO () # peekByteOff :: Ptr b -> Int -> IO Fingerprint # pokeByteOff :: Ptr b -> Int -> Fingerprint -> IO () # peek :: Ptr Fingerprint -> IO Fingerprint # poke :: Ptr Fingerprint -> Fingerprint -> IO () #
Generic Fingerprint |
Instance details Defined in GHC.Generics Associated Types
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)))
Methods from :: Fingerprint -> Rep Fingerprint x # to :: Rep Fingerprint x -> Fingerprint #
Show Fingerprint | Since: base-4.7.0.0
Instance details Defined in GHC.Fingerprint.Type Methods showsPrec :: Int -> Fingerprint -> ShowS # show :: Fingerprint -> String # showList :: [Fingerprint] -> ShowS #
NFData Fingerprint | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Fingerprint -> () #
Binary Fingerprint |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> Fingerprint -> IO () # put :: BinHandle -> Fingerprint -> IO (Bin Fingerprint) # get :: BinHandle -> IO Fingerprint #
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 Methods (==) :: Fingerprint -> Fingerprint -> Bool # (/=) :: Fingerprint -> Fingerprint -> Bool #
Ord Fingerprint | Since: base-4.4.0.0
Instance details Defined in GHC.Fingerprint.Type Methods compare :: Fingerprint -> Fingerprint -> Ordering # (<) :: Fingerprint -> Fingerprint -> Bool # (<=) :: Fingerprint -> Fingerprint -> Bool # (>) :: Fingerprint -> Fingerprint -> Bool # (>=) :: Fingerprint -> Fingerprint -> Bool # max :: Fingerprint -> Fingerprint -> Fingerprint # min :: Fingerprint -> Fingerprint -> Fingerprint #
Hashable Fingerprint | Since: hashable-1.3.0.0
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Fingerprint -> Int # hash :: Fingerprint -> Int #
FromField Fingerprint # |
Instance details Defined in HieDb.Types Methods fromField :: FieldParser Fingerprint #
ToField Fingerprint # |
Instance details Defined in HieDb.Types Methods toField :: Fingerprint -> SQLData #
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)))

unpackFS :: FastString -> String #

Lazily unpacks and decodes the FastString

readHexFingerprint :: String -> Fingerprint #

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

data NameSpace #

#### Instances

Instances details

NFData NameSpace |
Instance details Defined in GHC.Types.Name.Occurrence Methods rnf :: NameSpace -> () #
Uniquable NameSpace |
Instance details Defined in GHC.Types.Name.Occurrence Methods getUnique :: NameSpace -> Unique #
Binary NameSpace |
Instance details Defined in GHC.Types.Name.Occurrence Methods put_ :: BinHandle -> NameSpace -> IO () # put :: BinHandle -> NameSpace -> IO (Bin NameSpace) # get :: BinHandle -> IO NameSpace #
Eq NameSpace |
Instance details Defined in GHC.Types.Name.Occurrence Methods (==) :: NameSpace -> NameSpace -> Bool # (/=) :: NameSpace -> NameSpace -> Bool #
Ord NameSpace |
Instance details Defined in GHC.Types.Name.Occurrence Methods compare :: NameSpace -> NameSpace -> Ordering # (<) :: NameSpace -> NameSpace -> Bool # (<=) :: NameSpace -> NameSpace -> Bool # (>) :: NameSpace -> NameSpace -> Bool # (>=) :: NameSpace -> NameSpace -> Bool # max :: NameSpace -> NameSpace -> NameSpace # min :: NameSpace -> NameSpace -> NameSpace #

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 #
Binary OccName |
Instance details Defined in GHC.Types.Name.Occurrence Methods put_ :: BinHandle -> OccName -> IO () # put :: BinHandle -> OccName -> IO (Bin OccName) # get :: BinHandle -> IO OccName #
Outputable OccName |
Instance details Defined in GHC.Types.Name.Occurrence Methods ppr :: OccName -> SDoc #
OutputableBndr OccName |
Instance details Defined in GHC.Types.Name.Occurrence Methods pprBndr :: BindingSite -> OccName -> SDoc # pprPrefixOcc :: OccName -> SDoc # pprInfixOcc :: OccName -> SDoc # bndrIsJoin_maybe :: OccName -> Maybe Int #
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 Methods compare :: OccName -> OccName -> Ordering # (<) :: OccName -> OccName -> Bool # (<=) :: OccName -> OccName -> Bool # (>) :: OccName -> OccName -> Bool # (>=) :: OccName -> OccName -> Bool # max :: OccName -> OccName -> OccName # min :: OccName -> OccName -> OccName #
FromField OccName # |
Instance details Defined in HieDb.Types Methods fromField :: FieldParser OccName #
ToField OccName # |
Instance details Defined in HieDb.Types Methods toField :: OccName -> SQLData #

mkOccName :: NameSpace -> String -> OccName #

nameOccName :: Name -> OccName #

occNameSpace :: OccName -> NameSpace #

occNameString :: OccName -> String #

mkVarOccFS :: FastString -> OccName #

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 -> () #
ModifyState Name |
Instance details Defined in GHC.Iface.Ext.Ast Methods addSubstitution :: Name -> Name -> HieState -> HieState
NamedThing Name |
Instance details Defined in GHC.Types.Name Methods getOccName :: Name -> OccName # getName :: Name -> 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 `Name`s. 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 Methods pprBndr :: BindingSite -> Name -> SDoc # pprPrefixOcc :: Name -> SDoc # pprInfixOcc :: Name -> SDoc # bndrIsJoin_maybe :: Name -> Maybe Int #
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 #
ToHie (LBooleanFormula (LocatedN Name)) |
Instance details Defined in GHC.Iface.Ext.Ast Methods toHie :: LBooleanFormula (LocatedN Name) -> HieM [HieAST Type]
ToHie (Context (Located Name)) |
Instance details Defined in GHC.Iface.Ext.Ast Methods toHie :: Context (Located Name) -> HieM [HieAST Type]
type Anno Name |
Instance details Defined in GHC.Hs.Extension type Anno Name = SrcSpanAnnN
type Anno (LocatedN Name) |
Instance details Defined in GHC.Hs.Binds type Anno (LocatedN Name) = SrcSpan
type Anno [LocatedN Name] |
Instance details Defined in GHC.Hs.Binds type Anno [LocatedN Name] = SrcSpan

nameSrcSpan :: Name -> SrcSpan #

type NameCacheUpdater = NameCache #

data NameCache #

The NameCache makes sure that there is just one Unique assigned for each original name; i.e. (module-name, occ-name) pair and provides something of a lookup mechanism for those names.

nsNames :: NameCache -> MVar OrigNameCache #

initNameCache :: Char -> [Name] -> IO NameCache #

lookupOrigNameCache :: OrigNameCache -> Module -> OccName -> Maybe Name #

type Module = GenModule Unit #

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

mkModule :: u -> ModuleName -> GenModule u #

nameModule_maybe :: Name -> Maybe Module #

nameModule :: HasDebugCallStack => Name -> Module #

varName :: NameSpace #

isVarNameSpace :: NameSpace -> Bool #

dataName :: NameSpace #

isDataConNameSpace :: NameSpace -> Bool #

tcClsName :: NameSpace #

isTcClsNameSpace :: NameSpace -> Bool #

tvName :: NameSpace #

isTvNameSpace :: NameSpace -> Bool #

flLabel :: FieldLabel -> FieldLabelString #

User-visible label of a field.

# Dynflags re-exports

data DynFlags #

Contains not only a collection of `GeneralFlag`s but also a plethora of information relating to the compilation of a single file or GHC session

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.

data LlvmConfig #

Constructors

LlvmConfig |
Fields llvmTargets :: [(String, LlvmTarget)] llvmPasses :: [(Int, String)]

# AvailInfo

data AvailInfo #

Records what things are "available", i.e. in scope

#### Instances

Instances details

Data AvailInfo |
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) -> AvailInfo -> c AvailInfo # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AvailInfo # toConstr :: AvailInfo -> Constr # dataTypeOf :: AvailInfo -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AvailInfo) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AvailInfo) # gmapT :: (forall b. Data b => b -> b) -> AvailInfo -> AvailInfo # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AvailInfo -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AvailInfo -> r # gmapQ :: (forall d. Data d => d -> u) -> AvailInfo -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AvailInfo -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AvailInfo -> m AvailInfo #
NFData AvailInfo |
Instance details Defined in GHC.Types.Avail Methods rnf :: AvailInfo -> () #
Binary AvailInfo |
Instance details Defined in GHC.Types.Avail Methods put_ :: BinHandle -> AvailInfo -> IO () # put :: BinHandle -> AvailInfo -> IO (Bin AvailInfo) # get :: BinHandle -> IO AvailInfo #
Outputable AvailInfo |
Instance details Defined in GHC.Types.Avail Methods ppr :: AvailInfo -> SDoc #

pattern AvailName :: Name -> AvailInfo #

pattern AvailFL :: FieldLabel -> AvailInfo #

pattern AvailTC :: Name -> [Name] -> [FieldLabel] -> AvailInfo #

flSelector :: FieldLabel -> Name #

The `Name` of the selector function, which uniquely identifies the field label.

# SrcSpan

data SrcSpan #

Source Span

A `SrcSpan` identifies either a specific portion of a text file or a human-readable description of a location.

Constructors

RealSrcSpan !RealSrcSpan !(Maybe BufSpan) |
UnhelpfulSpan !UnhelpfulSpanReason |

#### 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 Methods showsPrec :: Int -> SrcSpan -> ShowS # show :: SrcSpan -> String # showList :: [SrcSpan] -> ShowS #
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 #
HasLoc (Located a) |
Instance details Defined in GHC.Iface.Ext.Ast Methods loc :: Located a -> SrcSpan
ToHie (LHsDoc GhcRn) |
Instance details Defined in GHC.Iface.Ext.Ast Methods toHie :: LHsDoc GhcRn -> HieM [HieAST Type]
ToHie (Context (Located Name)) |
Instance details Defined in GHC.Iface.Ext.Ast Methods toHie :: Context (Located Name) -> HieM [HieAST Type]
ToHie (Context (Located Var)) |
Instance details Defined in GHC.Iface.Ext.Ast Methods toHie :: Context (Located Var) -> HieM [HieAST Type]
ToHie (Context (Located NoExtField)) |
Instance details Defined in GHC.Iface.Ext.Ast Methods toHie :: Context (Located NoExtField) -> HieM [HieAST Type]
ToHie (IEContext (Located RecFieldInfo)) |
Instance details Defined in GHC.Iface.Ext.Ast Methods toHie :: IEContext (Located RecFieldInfo) -> HieM [HieAST Type]
HiePass p => ToHie (Located (PatSynBind (GhcPass p) (GhcPass p))) |
Instance details Defined in GHC.Iface.Ext.Ast Methods toHie :: Located (PatSynBind (GhcPass p) (GhcPass p)) -> HieM [HieAST Type]
ToHie (Located [LocatedAn NoEpAnns (HsDerivingClause GhcRn)]) |
Instance details Defined in GHC.Iface.Ext.Ast Methods toHie :: Located [LocatedAn NoEpAnns (HsDerivingClause GhcRn)] -> HieM [HieAST Type]
HasHaddock (Located (HsModule GhcPs)) |
Instance details Defined in GHC.Parser.PostProcess.Haddock Methods addHaddock :: Located (HsModule GhcPs) -> HdkA (Located (HsModule GhcPs))
HasHaddock (Located [LocatedAn NoEpAnns (HsDerivingClause GhcPs)]) |
Instance details Defined in GHC.Parser.PostProcess.Haddock Methods addHaddock :: Located [LocatedAn NoEpAnns (HsDerivingClause GhcPs)] -> HdkA (Located [LocatedAn NoEpAnns (HsDerivingClause GhcPs)])
NamedThing e => NamedThing (Located e) |
Instance details Defined in GHC.Types.Name Methods getOccName :: Located e -> OccName # getName :: Located e -> 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 Methods showsPrec :: Int -> RealSrcSpan -> ShowS # show :: RealSrcSpan -> String # showList :: [RealSrcSpan] -> ShowS #
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 Methods (==) :: RealSrcSpan -> RealSrcSpan -> Bool # (/=) :: RealSrcSpan -> RealSrcSpan -> Bool #
Ord RealSrcSpan |
Instance details Defined in GHC.Types.SrcLoc Methods compare :: RealSrcSpan -> RealSrcSpan -> Ordering # (<) :: RealSrcSpan -> RealSrcSpan -> Bool # (<=) :: RealSrcSpan -> RealSrcSpan -> Bool # (>) :: RealSrcSpan -> RealSrcSpan -> Bool # (>=) :: RealSrcSpan -> RealSrcSpan -> Bool # max :: RealSrcSpan -> RealSrcSpan -> RealSrcSpan # min :: RealSrcSpan -> RealSrcSpan -> RealSrcSpan #
Outputable e => Outputable (GenLocated RealSrcSpan e) |
Instance details Defined in GHC.Types.SrcLoc Methods ppr :: GenLocated RealSrcSpan e -> SDoc #

mkRealSrcLoc :: FastString -> Int -> Int -> RealSrcLoc #

mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan #

Create a `SrcSpan` between two points in a file

srcSpanStartLine :: RealSrcSpan -> Int #

srcSpanStartCol :: RealSrcSpan -> Int #

srcSpanEndLine :: RealSrcSpan -> Int #

srcSpanEndCol :: RealSrcSpan -> Int #

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.

# Systools

initSysTools :: String -> IO Settings #

# Hie Types

type HiePath = LexicalFastString #

hiePathToFS :: HiePath -> FastString #

# Outputable

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

Join two `doc`s together horizontally with a gap between them.

ppr :: Outputable a => a -> SDoc #

showSDoc :: DynFlags -> SDoc -> String #

Show a SDoc as a String with the default user style

hang #

Arguments

:: SDoc | The header
-> Int | Amount to indent the hung body
-> SDoc | The hung body, indented and placed below the header
-> SDoc |

text :: IsLine doc => String -> doc #

# FastString

data FastString #

A `FastString` is a UTF-8 encoded string together with a unique ID. All `FastString`s 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.

#### 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 Methods fromString :: String -> FastString #
Monoid FastString |
Instance details Defined in GHC.Data.FastString Methods mempty :: FastString # mappend :: FastString -> FastString -> FastString # mconcat :: [FastString] -> FastString #
Semigroup FastString |
Instance details Defined in GHC.Data.FastString Methods (<>) :: FastString -> FastString -> FastString # sconcat :: NonEmpty FastString -> FastString # stimes :: Integral b => b -> FastString -> FastString #
Show FastString |
Instance details Defined in GHC.Data.FastString Methods showsPrec :: Int -> FastString -> ShowS # show :: FastString -> String # showList :: [FastString] -> ShowS #
NFData FastString |
Instance details Defined in GHC.Data.FastString Methods rnf :: FastString -> () #
ToJExpr FastString |
Instance details Defined in GHC.JS.Make Methods toJExpr :: FastString -> JExpr # toJExprFromList :: [FastString] -> JExpr #
Uniquable FastString |
Instance details Defined in GHC.Types.Unique Methods getUnique :: FastString -> Unique #
Binary FastString |
Instance details Defined in GHC.Utils.Binary Methods put_ :: BinHandle -> FastString -> IO () # put :: BinHandle -> FastString -> IO (Bin FastString) # get :: BinHandle -> IO FastString #
Outputable FastString |
Instance details Defined in GHC.Utils.Outputable Methods ppr :: FastString -> SDoc #
Eq FastString |
Instance details Defined in GHC.Data.FastString Methods (==) :: FastString -> FastString -> Bool # (/=) :: FastString -> FastString -> Bool #
ToJExpr a => ToJExpr (UniqMap FastString a) |
Instance details Defined in GHC.JS.Make Methods toJExpr :: UniqMap FastString a -> JExpr # toJExprFromList :: [UniqMap FastString a] -> JExpr #
type Anno FastString |
Instance details Defined in GHC.Hs.Expr type Anno FastString = SrcAnn NoEpAnns
type Anno (SourceText, RuleName) |
Instance details Defined in GHC.Hs.Decls type Anno (SourceText, RuleName) = SrcAnn NoEpAnns

# IFace

data IfaceType #

A kind of universal type, used for types and kinds.

Any time a `Type` is pretty-printed, it is first converted to an `IfaceType` before being printed. See Note [Pretty printing via Iface syntax] in GHC.Types.TyThing.Ppr

#### Instances

Instances details

NFData IfaceType |
Instance details Defined in GHC.Iface.Type Methods rnf :: IfaceType -> () #
Binary IfaceType |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> IfaceType -> IO () # put :: BinHandle -> IfaceType -> IO (Bin IfaceType) # get :: BinHandle -> IO IfaceType #
Outputable IfaceType |
Instance details Defined in GHC.Iface.Type Methods ppr :: IfaceType -> SDoc #
Binary (DefMethSpec IfaceType) |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> DefMethSpec IfaceType -> IO () # put :: BinHandle -> DefMethSpec IfaceType -> IO (Bin (DefMethSpec IfaceType)) # get :: BinHandle -> IO (DefMethSpec IfaceType) #

data IfaceTyCon #

Constructors

IfaceTyCon |
Fields ifaceTyConName :: IfExtName ifaceTyConInfo :: IfaceTyConInfo

#### Instances

Instances details

NFData IfaceTyCon |
Instance details Defined in GHC.Iface.Type Methods rnf :: IfaceTyCon -> () #
Binary IfaceTyCon |
Instance details Defined in GHC.Iface.Type Methods put_ :: BinHandle -> IfaceTyCon -> IO () # put :: BinHandle -> IfaceTyCon -> IO (Bin IfaceTyCon) # get :: BinHandle -> IO IfaceTyCon #
Outputable IfaceTyCon |
Instance details Defined in GHC.Iface.Type Methods ppr :: IfaceTyCon -> SDoc #
Eq IfaceTyCon |
Instance details Defined in GHC.Iface.Type Methods (==) :: IfaceTyCon -> IfaceTyCon -> Bool # (/=) :: IfaceTyCon -> IfaceTyCon -> Bool #

field_label :: FieldLabelString -> FastString #

dfs :: Ord a => AdjacencyMap a -> [a] -> [a] #

fieldNameSpace_maybe :: NameSpace -> Maybe FastString #

fieldName :: FastString -> NameSpace #

mkFastStringByteString :: ByteString -> FastString #

Create a `FastString` by copying an existing `ByteString`