hls-tactics-plugin-1.4.0.0: Wingman plugin for Haskell Language Server
Safe HaskellNone
LanguageHaskell2010

Wingman.AbstractLSP.TacticActions

Synopsis

Documentation

seconds :: Num a => a Source #

The number of microseconds in a second

mkUserFacingMessage :: [TacticError] -> UserFacingMessage Source #

Transform some tactic errors into a UserFacingMessage.

graftHole :: SrcSpan -> RunTacticResults -> Graft (Either String) ParsedSource Source #

Graft a RunTacticResults into the correct place in an AST. Correctly deals with top-level holes, in which we might need to fiddle with the Matchs that bind variables.

matchContextFixity :: HsMatchContext p -> Maybe LexicalFixity Source #

Keep a fixity if one was present in the HsMatchContext.

graftDecl :: DynFlags -> SrcSpan -> Int -> (RdrName -> [Pat GhcPs] -> LHsDecl GhcPs) -> LMatch GhcPs (LHsExpr GhcPs) -> TransformT (Either String) [LMatch GhcPs (LHsExpr GhcPs)] Source #

Helper function to route mergeFunBindMatches into the right place in an AST --- correctly dealing with inserting into instance declarations.