haskell-tools-refactor-0.3.0.0: Refactoring Tool for Haskell

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.Refactor.ListOperations

Synopsis

Documentation

replaceList :: [Ann e dom SrcTemplateStage] -> AnnListG e dom SrcTemplateStage -> AnnListG e dom SrcTemplateStage Source #

Replaces the list with a new one with the given elements, keeping the most common separator as the new one.

insertWhere :: Ann e dom SrcTemplateStage -> (Maybe (Ann e dom SrcTemplateStage) -> Bool) -> (Maybe (Ann e dom SrcTemplateStage) -> Bool) -> AnnListG e dom SrcTemplateStage -> AnnListG e dom SrcTemplateStage Source #

Inserts the element in the places where the two positioning functions (one checks the element before, one the element after) allows the placement.

insertIndex :: (Maybe (Ann e dom SrcTemplateStage) -> Bool) -> (Maybe (Ann e dom SrcTemplateStage) -> Bool) -> [Ann e dom SrcTemplateStage] -> Maybe Int Source #

Checks where the element will be inserted given the two positioning functions.