Safe Haskell | None |
---|
- applyIndentation :: (InsertionInfo, InternalTTree) -> (BufSpan, ClientTTree)
- applyInsertionInfo :: Indentation -> Indentation -> [RecElementOffset] -> [AccLevelOffset] -> [Int] -> Indentation -> Int -> Int -> [((BufSpan, RecElementOffset), ClientTTree)] -> ((InsertionInfo, RecElementOffset), TTree LineBuf RealSrcSpan (InsertionInfo, RecElementOffset)) -> [((BufSpan, RecElementOffset), ClientTTree)]
- type InternalTTree = TTree LineBuf RealSrcSpan InsertionInfo
- data InsertionInfo
- = IncInline BufSpan
- | NewSection Int
Documentation
:: Indentation | Element offset of the parent element |
-> Indentation | The recursive element offset of the parent element if it is of type IncInline or 0 if it is of type NewSection |
-> [RecElementOffset] | 'Recursive element offset' of all parents between the the current element and the root node |
-> [AccLevelOffset] | The accumulated level offset stack |
-> [Int] | Parent elemen trailing chars stack |
-> Indentation | 'Effective indentation' of the parent element |
-> Int | Number of lines in the parent element (for NewSection insertion position) |
-> Int | Number of NewSection childs the parent element has (for NewSection insertion position) |
-> [((BufSpan, RecElementOffset), ClientTTree)] | |
-> ((InsertionInfo, RecElementOffset), TTree LineBuf RealSrcSpan (InsertionInfo, RecElementOffset)) | |
-> [((BufSpan, RecElementOffset), ClientTTree)] |
This function turns the (internal) transformation-tree (with the recursive elements offsets attached) into a transformation-tree the client understands. This is mostly a task of making the indentation (which first is attached implicitely) explicit which means that each addition begins with enough spaces for example.
The (indentation-)calculations in applyInsertionInfo are kind of complex and therefore 'indentation.markdown' is a concept-paper which describes some details with the help of some examples.