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

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

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

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

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

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

Demote a given name

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

Creates a qualified name from a name string