ghcide-2.9.0.0: The core of an IDE

Safe Haskell | None
Language | GHC2021

Development.IDE.Types.Exports

Synopsis

- data IdentInfo = IdentInfo {
  - name :: !OccName
  - parent :: !(Maybe OccName)
  - identModuleName :: !ModuleName
  }
- data ExportsMap = ExportsMap {
  - getExportsMap :: !(OccEnv (HashSet IdentInfo))
  - getModuleExportsMap :: !(ModuleNameEnv (HashSet IdentInfo))
  }
- rendered :: IdentInfo -> Text
- moduleNameText :: IdentInfo -> Text
- occNameText :: OccName -> Text
- renderOcc :: OccName -> Text
- mkTypeOcc :: Text -> OccName
- mkVarOrDataOcc :: Text -> OccName
- isDatacon :: IdentInfo -> Bool
- createExportsMap :: [ModIface] -> ExportsMap
- createExportsMapMg :: [ModGuts] -> ExportsMap
- buildModuleExportMapFrom :: [ModIface] -> ModuleNameEnv (HashSet IdentInfo)
- createExportsMapHieDb :: WithHieDb -> IO ExportsMap
- size :: ExportsMap -> Int
- exportsMapSize :: ExportsMap -> Int
- updateExportsMapMg :: [ModGuts] -> ExportsMap -> ExportsMap

# Documentation

data IdentInfo #

Constructors

IdentInfo |

Fields

- name :: !OccName
- parent :: !(Maybe OccName)
- identModuleName :: !ModuleName

#### Instances

Instances details

NFData IdentInfo # |
Instance details Defined in Development.IDE.Types.Exports Methods rnf :: IdentInfo -> () #
Generic IdentInfo # |

Instance details

Defined in Development.IDE.Types.Exports

Associated Types

type Rep IdentInfo |

Instance details

Defined in Development.IDE.Types.Exports

type Rep IdentInfo = D1 ('MetaData "IdentInfo" "Development.IDE.Types.Exports" "ghcide-2.9.0.0-1G3u1vh8JKWDpMQ8kfXrG1" 'False) (C1 ('MetaCons "IdentInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName) :*: (S1 ('MetaSel ('Just "parent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe OccName)) :*: S1 ('MetaSel ('Just "identModuleName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName))))

Methods

from :: IdentInfo -> Rep IdentInfo x #

to :: Rep IdentInfo x -> IdentInfo #

Show IdentInfo # |
Instance details Defined in Development.IDE.Types.Exports Methods showsPrec :: Int -> IdentInfo -> ShowS # show :: IdentInfo -> String # showList :: [IdentInfo] -> ShowS #
Eq IdentInfo # |
Instance details Defined in Development.IDE.Types.Exports Methods (==) :: IdentInfo -> IdentInfo -> Bool # (/=) :: IdentInfo -> IdentInfo -> Bool #
Hashable IdentInfo # |
Instance details Defined in Development.IDE.Types.Exports Methods hashWithSalt :: Int -> IdentInfo -> Int # hash :: IdentInfo -> Int #
type Rep IdentInfo # |

Instance details

Defined in Development.IDE.Types.Exports

type Rep IdentInfo = D1 ('MetaData "IdentInfo" "Development.IDE.Types.Exports" "ghcide-2.9.0.0-1G3u1vh8JKWDpMQ8kfXrG1" 'False) (C1 ('MetaCons "IdentInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName) :*: (S1 ('MetaSel ('Just "parent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe OccName)) :*: S1 ('MetaSel ('Just "identModuleName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName))))

data ExportsMap #

Constructors

ExportsMap |

Fields

- getExportsMap :: !(OccEnv (HashSet IdentInfo))
- getModuleExportsMap :: !(ModuleNameEnv (HashSet IdentInfo))

#### Instances

Instances details

NFData ExportsMap # |
Instance details Defined in Development.IDE.Types.Exports Methods rnf :: ExportsMap -> () #
Monoid ExportsMap # |
Instance details Defined in Development.IDE.Types.Exports Methods mempty :: ExportsMap # mappend :: ExportsMap -> ExportsMap -> ExportsMap # mconcat :: [ExportsMap] -> ExportsMap #
Semigroup ExportsMap # |
Instance details Defined in Development.IDE.Types.Exports Methods (<>) :: ExportsMap -> ExportsMap -> ExportsMap # sconcat :: NonEmpty ExportsMap -> ExportsMap # stimes :: Integral b => b -> ExportsMap -> ExportsMap #
Show ExportsMap # |
Instance details Defined in Development.IDE.Types.Exports Methods showsPrec :: Int -> ExportsMap -> ShowS # show :: ExportsMap -> String # showList :: [ExportsMap] -> ShowS #

rendered :: IdentInfo -> Text #

moduleNameText :: IdentInfo -> Text #

occNameText :: OccName -> Text #

Render an identifier as imported or exported style. TODO: pattern synonymoccNameText :: OccName -> Text

renderOcc :: OccName -> Text #

mkTypeOcc :: Text -> OccName #

mkVarOrDataOcc :: Text -> OccName #

isDatacon :: IdentInfo -> Bool #

createExportsMap :: [ModIface] -> ExportsMap #

createExportsMapMg :: [ModGuts] -> ExportsMap #

buildModuleExportMapFrom :: [ModIface] -> ModuleNameEnv (HashSet IdentInfo) #

createExportsMapHieDb :: WithHieDb -> IO ExportsMap #

size :: ExportsMap -> Int #

exportsMapSize :: ExportsMap -> Int #

updateExportsMapMg :: [ModGuts] -> ExportsMap -> ExportsMap #