mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
Generalize AlignFunction from lists to arbitrary Align Applicative functors.
This commit is contained in:
parent
b3c65733ba
commit
9a65904fc5
@ -101,7 +101,7 @@ openRange source range = (at source <$> maybeLastIndex range) /= Just '\n'
|
||||
-- | A row in a split diff, composed of a before line and an after line.
|
||||
type Row a = Both (Line a)
|
||||
|
||||
type AlignFunction f = forall b. f [Line b] -> [f (Line b)]
|
||||
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)]
|
||||
|
Loading…
Reference in New Issue
Block a user