mirror of
https://github.com/github/semantic.git
synced 2024-12-01 09:15:01 +03:00
Define an Applicative instance for Row.
This commit is contained in:
parent
8303fd08ad
commit
6fe2060e45
@ -41,3 +41,7 @@ adjoinRowsBy _ _ rows row = row : rows
|
||||
|
||||
instance Show a => Show (Row a) where
|
||||
show (Row left right) = "\n" ++ show left ++ " | " ++ show right
|
||||
|
||||
instance Applicative Row where
|
||||
pure a = let a' = pure a in Row a' a'
|
||||
Row f g <*> Row a b = Row (f <*> a) (g <*> b)
|
||||
|
Loading…
Reference in New Issue
Block a user