1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00

🔥 the Applicative instance for Row.

This commit is contained in:
Rob Rix 2016-03-08 21:53:53 -05:00
parent b1cd207a19
commit 547750edb9

View File

@ -43,7 +43,3 @@ adjoinRowsBy f (Row (Both (left, right))) (Row (Both (nextLeft, nextRight)) : ro
adjoinRowsBy f (Row (Both (left, right))) (Row (Both (nextLeft, nextRight)) : rows) | isOpenLineBy (snd f) right = makeRow left (right <> nextRight) : adjoinRowsBy f (makeRow nextLeft EmptyLine) rows
adjoinRowsBy _ row rows = row : rows
instance Applicative Row where
pure = Row . pure . pure
Row (Both (f, g)) <*> Row (Both (a, b)) = Row $ both (f <*> a) (g <*> b)