hls-refactor-plugin-1.0.0.0: Exactprint refactorings for Haskell Language Server
Safe HaskellSafe-Inferred
LanguageHaskell2010

Development.IDE.GHC.Compat.ExactPrint

Description

This module contains compatibility constructs to write type signatures across multiple ghc-exactprint versions, accepting that anything more ambitious is pretty much impossible with the GHC 9.2 redesign of ghc-exactprint

Synopsis

Documentation

class Typeable a => ExactPrint a #

An AST fragment with an annotation must be able to return the requirements for nesting another one, captured in an Entry, and to be able to use the rest of the exactprint machinery to print the element. In the analogy to Outputable, exact plays the role of ppr.

Minimal complete definition

getAnnotationEntry, setAnnotationAnchor, exact

Instances

Instances details
ExactPrint Void 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: Void -> Entry #

setAnnotationAnchor :: Void -> Anchor -> EpAnnComments -> Void #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => Void -> EP w m Void #

ExactPrint Role 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: Role -> Entry #

setAnnotationAnchor :: Role -> Anchor -> EpAnnComments -> Role #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => Role -> EP w m Role #

ExactPrint FastString 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint HsModule

'Located (HsModule GhcPs)' corresponds to ParsedSource

Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: HsModule -> Entry #

setAnnotationAnchor :: HsModule -> Anchor -> EpAnnComments -> HsModule #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsModule -> EP w m HsModule #

ExactPrint HsDocString 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint CCallConv 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: CCallConv -> Entry #

setAnnotationAnchor :: CCallConv -> Anchor -> EpAnnComments -> CCallConv #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => CCallConv -> EP w m CCallConv #

ExactPrint CExportSpec 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint Safety 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: Safety -> Entry #

setAnnotationAnchor :: Safety -> Anchor -> EpAnnComments -> Safety #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => Safety -> EP w m Safety #

ExactPrint StringLiteral 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint ModuleName 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint DocDecl 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: DocDecl -> Entry #

setAnnotationAnchor :: DocDecl -> Anchor -> EpAnnComments -> DocDecl #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => DocDecl -> EP w m DocDecl #

ExactPrint ForeignExport 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint ForeignImport 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint HsIPName 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: HsIPName -> Entry #

setAnnotationAnchor :: HsIPName -> Anchor -> EpAnnComments -> HsIPName #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsIPName -> EP w m HsIPName #

ExactPrint DataFamInstDeclWithContext 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: DataFamInstDeclWithContext -> Entry #

setAnnotationAnchor :: DataFamInstDeclWithContext -> Anchor -> EpAnnComments -> DataFamInstDeclWithContext #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => DataFamInstDeclWithContext -> EP w m DataFamInstDeclWithContext #

ExactPrint (BooleanFormula (LocatedN RdrName)) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (IE GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: IE GhcPs -> Entry #

setAnnotationAnchor :: IE GhcPs -> Anchor -> EpAnnComments -> IE GhcPs #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => IE GhcPs -> EP w m (IE GhcPs) #

ExactPrint (IEWrappedName RdrName) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (ImportDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint a => ExactPrint (LocatedA a) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: LocatedA a -> Entry #

setAnnotationAnchor :: LocatedA a -> Anchor -> EpAnnComments -> LocatedA a #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => LocatedA a -> EP w m (LocatedA a) #

ExactPrint a => ExactPrint (LocatedC a) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: LocatedC a -> Entry #

setAnnotationAnchor :: LocatedC a -> Anchor -> EpAnnComments -> LocatedC a #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => LocatedC a -> EP w m (LocatedC a) #

ExactPrint (LocatedL (BooleanFormula (LocatedN RdrName))) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (LocatedL [LocatedA (IE GhcPs)]) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (Match GhcPs (LocatedA body)) => ExactPrint (LocatedL [LocatedA (Match GhcPs (LocatedA body))]) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (LocatedL [LocatedA (StmtLR GhcPs GhcPs (LocatedA (HsCmd GhcPs)))]) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (LocatedL [LocatedA (StmtLR GhcPs GhcPs (LocatedA (HsExpr GhcPs)))]) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (LocatedL [LocatedA (ConDeclField GhcPs)]) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (LocatedN RdrName) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (LocatedP OverlapMode) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (LocatedP CType) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (LocatedP WarningTxt) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint a => ExactPrint (Located a)

Bare Located elements are simply stripped off without further processing.

Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: Located a -> Entry #

setAnnotationAnchor :: Located a -> Anchor -> EpAnnComments -> Located a #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => Located a -> EP w m (Located a) #

ExactPrint (HsBind GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: HsBind GhcPs -> Entry #

setAnnotationAnchor :: HsBind GhcPs -> Anchor -> EpAnnComments -> HsBind GhcPs #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsBind GhcPs -> EP w m (HsBind GhcPs) #

ExactPrint (HsIPBinds GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (HsLocalBinds GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (IPBind GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: IPBind GhcPs -> Entry #

setAnnotationAnchor :: IPBind GhcPs -> Anchor -> EpAnnComments -> IPBind GhcPs #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => IPBind GhcPs -> EP w m (IPBind GhcPs) #

ExactPrint (RecordPatSynField GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (Sig GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: Sig GhcPs -> Entry #

setAnnotationAnchor :: Sig GhcPs -> Anchor -> EpAnnComments -> Sig GhcPs #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => Sig GhcPs -> EP w m (Sig GhcPs) #

ExactPrint (AnnDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (ClsInstDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (ConDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (DefaultDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (DerivClauseTys GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (DerivDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (DerivStrategy GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (FamilyDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (ForeignDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (FunDep GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: FunDep GhcPs -> Entry #

setAnnotationAnchor :: FunDep GhcPs -> Anchor -> EpAnnComments -> FunDep GhcPs #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => FunDep GhcPs -> EP w m (FunDep GhcPs) #

ExactPrint (HsDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: HsDecl GhcPs -> Entry #

setAnnotationAnchor :: HsDecl GhcPs -> Anchor -> EpAnnComments -> HsDecl GhcPs #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsDecl GhcPs -> EP w m (HsDecl GhcPs) #

ExactPrint (HsDerivingClause GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (InjectivityAnn GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (InstDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (RoleAnnotDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (RuleBndr GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (RuleDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (RuleDecls GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (SpliceDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (StandaloneKindSig GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (TyClDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (TyFamInstDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (WarnDecl GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (WarnDecls GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (FieldLabelStrings GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (HsCmd GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: HsCmd GhcPs -> Entry #

setAnnotationAnchor :: HsCmd GhcPs -> Anchor -> EpAnnComments -> HsCmd GhcPs #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsCmd GhcPs -> EP w m (HsCmd GhcPs) #

ExactPrint (HsCmdTop GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (HsExpr GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: HsExpr GhcPs -> Entry #

setAnnotationAnchor :: HsExpr GhcPs -> Anchor -> EpAnnComments -> HsExpr GhcPs #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsExpr GhcPs -> EP w m (HsExpr GhcPs) #

ExactPrint (HsFieldLabel GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (HsPragE GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (HsSplice GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (HsTupArg GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (HsOverLit GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (Pat GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: Pat GhcPs -> Entry #

setAnnotationAnchor :: Pat GhcPs -> Anchor -> EpAnnComments -> Pat GhcPs #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => Pat GhcPs -> EP w m (Pat GhcPs) #

ExactPrint (AmbiguousFieldOcc GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (ConDeclField GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (FieldOcc GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (HsForAllTelescope GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (HsPatSigType GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (HsSigType GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (HsType GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: HsType GhcPs -> Entry #

setAnnotationAnchor :: HsType GhcPs -> Anchor -> EpAnnComments -> HsType GhcPs #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsType GhcPs -> EP w m (HsType GhcPs) #

ExactPrint (NonEmpty (Located (HsFieldLabel GhcPs))) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint a => ExactPrint (Maybe a) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: Maybe a -> Entry #

setAnnotationAnchor :: Maybe a -> Anchor -> EpAnnComments -> Maybe a #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => Maybe a -> EP w m (Maybe a) #

ExactPrint a => ExactPrint [a] 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: [a] -> Entry #

setAnnotationAnchor :: [a] -> Anchor -> EpAnnComments -> [a] #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => [a] -> EP w m [a] #

(ExactPrint (HsRecField' (a GhcPs) body), ExactPrint (HsRecField' (b GhcPs) body)) => ExactPrint (Either [LocatedA (HsRecField' (a GhcPs) body)] [LocatedA (HsRecField' (b GhcPs) body)]) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: Either [LocatedA (HsRecField' (a GhcPs) body)] [LocatedA (HsRecField' (b GhcPs) body)] -> Entry #

setAnnotationAnchor :: Either [LocatedA (HsRecField' (a GhcPs) body)] [LocatedA (HsRecField' (b GhcPs) body)] -> Anchor -> EpAnnComments -> Either [LocatedA (HsRecField' (a GhcPs) body)] [LocatedA (HsRecField' (b GhcPs) body)] #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => Either [LocatedA (HsRecField' (a GhcPs) body)] [LocatedA (HsRecField' (b GhcPs) body)] -> EP w m (Either [LocatedA (HsRecField' (a GhcPs) body)] [LocatedA (HsRecField' (b GhcPs) body)]) #

ExactPrint (HsValBindsLR GhcPs GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (PatSynBind GhcPs GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint body => ExactPrint (FamEqn GhcPs body) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: FamEqn GhcPs body -> Entry #

setAnnotationAnchor :: FamEqn GhcPs body -> Anchor -> EpAnnComments -> FamEqn GhcPs body #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => FamEqn GhcPs body -> EP w m (FamEqn GhcPs body) #

ExactPrint (GRHS GhcPs (LocatedA (HsCmd GhcPs))) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (GRHS GhcPs (LocatedA (HsExpr GhcPs))) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (GRHSs GhcPs (LocatedA (HsCmd GhcPs))) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (GRHSs GhcPs (LocatedA (HsExpr GhcPs))) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (Match GhcPs (LocatedA (HsCmd GhcPs))) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (Match GhcPs (LocatedA (HsExpr GhcPs))) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (MatchGroup GhcPs (LocatedA (HsCmd GhcPs))) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (MatchGroup GhcPs (LocatedA (HsExpr GhcPs))) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (ParStmtBlock GhcPs GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint body => ExactPrint (HsRecField' (FieldLabelStrings GhcPs) body) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (LocatedA body) => ExactPrint (HsRecField' (AmbiguousFieldOcc GhcPs) (LocatedA body)) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint body => ExactPrint (HsRecField' (FieldOcc GhcPs) body) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint body => ExactPrint (HsRecFields GhcPs body) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: HsRecFields GhcPs body -> Entry #

setAnnotationAnchor :: HsRecFields GhcPs body -> Anchor -> EpAnnComments -> HsRecFields GhcPs body #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsRecFields GhcPs body -> EP w m (HsRecFields GhcPs body) #

(ExactPrint tm, ExactPrint ty, Outputable tm, Outputable ty) => ExactPrint (HsArg tm ty) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: HsArg tm ty -> Entry #

setAnnotationAnchor :: HsArg tm ty -> Anchor -> EpAnnComments -> HsArg tm ty #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsArg tm ty -> EP w m (HsArg tm ty) #

ExactPrintTVFlag flag => ExactPrint (HsOuterTyVarBndrs flag GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint a => ExactPrint (HsScaled GhcPs a) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: HsScaled GhcPs a -> Entry #

setAnnotationAnchor :: HsScaled GhcPs a -> Anchor -> EpAnnComments -> HsScaled GhcPs a #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsScaled GhcPs a -> EP w m (HsScaled GhcPs a) #

ExactPrintTVFlag flag => ExactPrint (HsTyVarBndr flag GhcPs) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: HsTyVarBndr flag GhcPs -> Entry #

setAnnotationAnchor :: HsTyVarBndr flag GhcPs -> Anchor -> EpAnnComments -> HsTyVarBndr flag GhcPs #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => HsTyVarBndr flag GhcPs -> EP w m (HsTyVarBndr flag GhcPs) #

ExactPrint body => ExactPrint (HsWildCardBndrs GhcPs body) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

ExactPrint (SourceText, RuleName) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

(ExactPrint (LocatedA (body GhcPs)), Anno (StmtLR GhcPs GhcPs (LocatedA (body GhcPs))) ~ SrcSpanAnnA, Anno [GenLocated SrcSpanAnnA (StmtLR GhcPs GhcPs (LocatedA (body GhcPs)))] ~ SrcSpanAnnL, ExactPrint (LocatedL [LocatedA (StmtLR GhcPs GhcPs (LocatedA (body GhcPs)))])) => ExactPrint (StmtLR GhcPs GhcPs (LocatedA (body GhcPs))) 
Instance details

Defined in Language.Haskell.GHC.ExactPrint.ExactPrint

Methods

getAnnotationEntry :: StmtLR GhcPs GhcPs (LocatedA (body GhcPs)) -> Entry #

setAnnotationAnchor :: StmtLR GhcPs GhcPs (LocatedA (body GhcPs)) -> Anchor -> EpAnnComments -> StmtLR GhcPs GhcPs (LocatedA (body GhcPs)) #

exact :: forall (m :: Type -> Type) w. (Monad m, Monoid w) => StmtLR GhcPs GhcPs (LocatedA (body GhcPs)) -> EP w m (StmtLR GhcPs GhcPs (LocatedA (body GhcPs))) #

exactPrint :: ExactPrint ast => ast -> String #

makeDeltaAst :: ExactPrint ast => ast -> ast #

Transform concrete annotations into relative annotations which are more useful when transforming an AST. This corresponds to the earlier relativiseApiAnns.

data Annotated ast #

Annotated packages an AST fragment with the annotations necessary to exactPrint or transform that AST.

Instances

Instances details
Foldable Annotated 
Instance details

Defined in Retrie.ExactPrint.Annotated

Methods

fold :: Monoid m => Annotated m -> m #

foldMap :: Monoid m => (a -> m) -> Annotated a -> m #

foldMap' :: Monoid m => (a -> m) -> Annotated a -> m #

foldr :: (a -> b -> b) -> b -> Annotated a -> b #

foldr' :: (a -> b -> b) -> b -> Annotated a -> b #

foldl :: (b -> a -> b) -> b -> Annotated a -> b #

foldl' :: (b -> a -> b) -> b -> Annotated a -> b #

foldr1 :: (a -> a -> a) -> Annotated a -> a #

foldl1 :: (a -> a -> a) -> Annotated a -> a #

toList :: Annotated a -> [a] #

null :: Annotated a -> Bool #

length :: Annotated a -> Int #

elem :: Eq a => a -> Annotated a -> Bool #

maximum :: Ord a => Annotated a -> a #

minimum :: Ord a => Annotated a -> a #

sum :: Num a => Annotated a -> a #

product :: Num a => Annotated a -> a #

Traversable Annotated 
Instance details

Defined in Retrie.ExactPrint.Annotated

Methods

traverse :: Applicative f => (a -> f b) -> Annotated a -> f (Annotated b) #

sequenceA :: Applicative f => Annotated (f a) -> f (Annotated a) #

mapM :: Monad m => (a -> m b) -> Annotated a -> m (Annotated b) #

sequence :: Monad m => Annotated (m a) -> m (Annotated a) #

Functor Annotated 
Instance details

Defined in Retrie.ExactPrint.Annotated

Methods

fmap :: (a -> b) -> Annotated a -> Annotated b #

(<$) :: a -> Annotated b -> Annotated a #

Data ast => Data (Annotated ast) 
Instance details

Defined in Retrie.ExactPrint.Annotated

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Annotated ast -> c (Annotated ast) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Annotated ast) #

toConstr :: Annotated ast -> Constr #

dataTypeOf :: Annotated ast -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Annotated ast)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Annotated ast)) #

gmapT :: (forall b. Data b => b -> b) -> Annotated ast -> Annotated ast #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Annotated ast -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Annotated ast -> r #

gmapQ :: (forall d. Data d => d -> u) -> Annotated ast -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Annotated ast -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Annotated ast -> m (Annotated ast) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Annotated ast -> m (Annotated ast) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Annotated ast -> m (Annotated ast) #

(Data ast, Monoid ast) => Monoid (Annotated ast) 
Instance details

Defined in Retrie.ExactPrint.Annotated

Methods

mempty :: Annotated ast #

mappend :: Annotated ast -> Annotated ast -> Annotated ast #

mconcat :: [Annotated ast] -> Annotated ast #

(Data ast, Monoid ast) => Semigroup (Annotated ast) 
Instance details

Defined in Retrie.ExactPrint.Annotated

Methods

(<>) :: Annotated ast -> Annotated ast -> Annotated ast #

sconcat :: NonEmpty (Annotated ast) -> Annotated ast #

stimes :: Integral b => b -> Annotated ast -> Annotated ast #

Show (Annotated ParsedSource) Source # 
Instance details

Defined in Development.IDE.GHC.ExactPrint

Default ast => Default (Annotated ast) 
Instance details

Defined in Retrie.ExactPrint.Annotated

Methods

def :: Annotated ast #

NFData (Annotated ParsedSource) Source # 
Instance details

Defined in Development.IDE.GHC.ExactPrint

Methods

rnf :: Annotated ParsedSource -> () #

pattern Annotated :: ast -> ApiAnns -> Annotated ast Source #