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

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.BackendGHC.Names

Description

Functions that convert the basic elements of the GHC AST to corresponding elements in the Haskell-tools AST representation

Synopsis

Documentation

trfOperator :: forall n r. TransformName n r => Located (IdP n) -> Trf (Ann UOperator (Dom r) RangeStage) #

trfOperator' :: forall n r. TransformName n r => IdP n -> Trf (UOperator (Dom r) RangeStage) #

trfName :: forall n r. TransformName n r => Located (IdP n) -> Trf (Ann UName (Dom r) RangeStage) #

trfName' :: forall n r. TransformName n r => IdP n -> Trf (UName (Dom r) RangeStage) #

class (TransformableName name, HsHasName (IdP name), FromGHCName (IdP res), Eq (IdP name), GHCName res, NameOrRdrName (IdP name) ~ IdP name) => TransformName name res where #

This class allows us to use the same transformation code for multiple variants of the GHC AST. GHC UName annotated with name can be transformed to our representation with semantic annotations of res.

Minimal complete definition

transformName

Methods

transformName :: IdP name -> IdP res #

Demote a given name

Instances
TransformName GhcPs GhcPs # 
Instance details

Defined in Language.Haskell.Tools.BackendGHC.Names

(FromGHCName (IdP res), GHCName res) => TransformName GhcRn res # 
Instance details

Defined in Language.Haskell.Tools.BackendGHC.Names

Methods

transformName :: IdP GhcRn -> IdP res #

trfQualifiedName :: forall n r. TransformName n r => Bool -> Located (IdP n) -> Trf (Ann UQualifiedName (Dom r) RangeStage) #

trfQualifiedNameFocus :: forall n r. TransformName n r => Bool -> IdP n -> Trf (Ann UQualifiedName (Dom r) RangeStage) #

trfQualifiedName' :: forall n r. TransformName n r => IdP n -> Trf (UQualifiedName (Dom r) RangeStage) #

trfNameStr :: Bool -> String -> Trf (AnnListG UNamePart (Dom r) RangeStage) #

Creates a qualified name from a name string