ormolu-0.5.3.0: A formatter for Haskell source code
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ormolu.Processing.Common

Description

Common definitions for pre- and post- processing.

Synopsis

Documentation

removeIndentation :: Text -> (Text, Int) Source #

Remove indentation from a given Text. Return the input with indentation removed and the detected indentation level.

reindent :: Int -> Text -> Text Source #

Add indentation to a Text.

linesInRegion :: RegionDeltas -> Text -> Text Source #

All lines in the region specified by RegionDeltas.

intSetToRegions Source #

Arguments

:: Int

Total number of lines

-> IntSet 
-> [RegionDeltas] 

Convert a set of line indices into disjoint RegionDeltas