haskell-tools-backend-ghc-0.3.0.0: Creating the Haskell-Tools AST from GHC's representations

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.AST.FromGHC.GHCUtils

Description

Utility functions defined on the GHC AST representation.

Synopsis

Documentation

getTopLevelId :: Name -> Ghc (Maybe Id) Source #

Loading ids for top-level ghc names

class HsHasName a where Source #

Get names from the GHC AST

Minimal complete definition

hsGetNames

Methods

hsGetNames :: a -> [Name] Source #

Instances

HsHasName RdrName Source # 

Methods

hsGetNames :: RdrName -> [Name] Source #

HsHasName Id Source # 

Methods

hsGetNames :: Id -> [Name] Source #

HsHasName Name Source # 

Methods

hsGetNames :: Name -> [Name] Source #

HsHasName e => HsHasName [e] Source # 

Methods

hsGetNames :: [e] -> [Name] Source #

(GHCName n, HsHasName n) => HsHasName (HsDecl n) Source # 

Methods

hsGetNames :: HsDecl n -> [Name] Source #

(GHCName n, HsHasName n) => HsHasName (HsGroup n) Source # 

Methods

hsGetNames :: HsGroup n -> [Name] Source #

(GHCName n, HsHasName n) => HsHasName (TyClDecl n) Source # 

Methods

hsGetNames :: TyClDecl n -> [Name] Source #

(GHCName n, HsHasName n) => HsHasName (TyClGroup n) Source # 

Methods

hsGetNames :: TyClGroup n -> [Name] Source #

(GHCName n, HsHasName n) => HsHasName (HsDataDefn n) Source # 

Methods

hsGetNames :: HsDataDefn n -> [Name] Source #

(GHCName n, HsHasName n) => HsHasName (ConDecl n) Source # 

Methods

hsGetNames :: ConDecl n -> [Name] Source #

(GHCName n, HsHasName n) => HsHasName (HsConDeclDetails n) Source # 
HsHasName n => HsHasName (ForeignDecl n) Source # 
HsHasName n => HsHasName (HsLocalBinds n) Source # 
HsHasName n => HsHasName (HsValBinds n) Source # 

Methods

hsGetNames :: HsValBinds n -> [Name] Source #

HsHasName n => HsHasName (HsBind n) Source # 

Methods

hsGetNames :: HsBind n -> [Name] Source #

(GHCName n, HsHasName n) => HsHasName (Sig n) Source # 

Methods

hsGetNames :: Sig n -> [Name] Source #

HsHasName n => HsHasName (HsTyVarBndr n) Source # 
(GHCName n, HsHasName n) => HsHasName (ConDeclField n) Source # 
(GHCName n, HsHasName n) => HsHasName (FieldOcc n) Source # 

Methods

hsGetNames :: FieldOcc n -> [Name] Source #

HsHasName n => HsHasName (Pat n) Source # 

Methods

hsGetNames :: Pat n -> [Name] Source #

HsHasName n => HsHasName (Bag n) Source # 

Methods

hsGetNames :: Bag n -> [Name] Source #

HsHasName e => HsHasName (Located e) Source # 

Methods

hsGetNames :: Located e -> [Name] Source #

HsHasName n => HsHasName (Stmt n b) Source # 

Methods

hsGetNames :: Stmt n b -> [Name] Source #

HsHasName n => HsHasName (ParStmtBlock l n) Source # 

Methods

hsGetNames :: ParStmtBlock l n -> [Name] Source #

rdrNameStr :: RdrName -> String Source #

Get the original form of a name

cleanHsType :: OutputableBndr n => HsType n -> HsType n Source #

Tries to simplify the type that has HsAppsTy before renaming. Does not always provide the correct form. Treats each operator as if they are of equivalent precedence and always left-associative.