mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Use the Data.Align instances for generic alignment of lists and ordered maps.
This commit is contained in:
parent
f1f542cc2c
commit
119c2350d4
@ -90,6 +90,6 @@ instance (Traversable f, Applicative f, GAlign g) => GAlign (f :.: g) where
|
|||||||
instance GAlign ((,) a) where
|
instance GAlign ((,) a) where
|
||||||
galign (_, a) (k, b) = Just (k, These a b)
|
galign (_, a) (k, b) = Just (k, These a b)
|
||||||
|
|
||||||
instance GAlign []
|
instance GAlign [] where galign a = Just . align a
|
||||||
instance GAlign (OrderedMap key)
|
instance Eq key => GAlign (OrderedMap key) where galign a = Just . align a
|
||||||
instance GAlign (Syntax a)
|
instance GAlign (Syntax a)
|
||||||
|
Loading…
Reference in New Issue
Block a user