mirror of
https://github.com/github/semantic.git
synced 2024-11-25 02:58:36 +03:00
adjoinRows takes an AlignFunction.
This commit is contained in:
parent
842af743e7
commit
48af1161e7
@ -114,7 +114,7 @@ type Row a = Both (Line a)
|
||||
type AlignFunction f = forall b list. (Align list, Applicative list) => f (list (Line b)) -> list (f (Line b))
|
||||
|
||||
-- | Merge open lines and prepend closed lines (as determined by a pair of functions) onto a list of rows.
|
||||
adjoinRows :: Applicative f => (f [Line a] -> [f (Line a)]) -> f (Line a) -> [f (Line a)] -> [f (Line a)]
|
||||
adjoinRows :: Applicative f => AlignFunction f -> f (Line a) -> [f (Line a)] -> [f (Line a)]
|
||||
adjoinRows _ row [] = [ row ]
|
||||
adjoinRows align row (nextRow : rows) = align (coalesceLines <$> row <*> nextRow) ++ rows
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user