smuggler2-0.3.6.2: GHC Source Plugin that helps to minimise imports and generate explicit exports
Safe HaskellNone
LanguageHaskell2010

Smuggler2.Anns

Description

 
Synopsis

Documentation

mkLocWithAnns :: (Data e, Monad m) => e -> DeltaPos -> [(KeywordId, DeltaPos)] -> TransformT m (Located e) Source #

Generates a unique location and wraps the given ast chunk with that location Also adds a DP and an annotation at that location

mkLoc :: (Data e, Monad m) => e -> TransformT m (Located e) Source #

mkLoc generates a unique location and wraps the given ast chunk with that location Also adds an empty annotation at that location

mkParenT :: (Data x, Monad m) => (Located x -> x) -> Located x -> TransformT m (Located x) Source #

Add an open and close paren annotation to a located thing

setAnnsForT :: (Data e, Monad m) => Located e -> DeltaPos -> [(KeywordId, DeltaPos)] -> TransformT m (Located e) Source #

Set the `ghc-exactprint` annotations for a Located thing

swapEntryDPT :: (Data a, Data b, Monad m) => Located a -> Located b -> TransformT m () Source #

Swap two Located things' relative position tage (DeltaPos)