mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
Move the GAlign instance over Syntax a into its own section.
This commit is contained in:
parent
ee60b4be7a
commit
d6dbc24056
@ -15,7 +15,12 @@ class Functor f => GAlign f where
|
||||
galign a b = to1 <$> galign (from1 a) (from1 b)
|
||||
|
||||
|
||||
-- Types with 'Data.Align.Align' instances can (and probably should) reuse them.
|
||||
-- Generically-derived instances
|
||||
|
||||
instance GAlign (Syntax a)
|
||||
|
||||
|
||||
-- 'Data.Align.Align' instances
|
||||
|
||||
instance GAlign [] where galign = galignAlign
|
||||
instance Eq key => GAlign (OrderedMap key) where galign = galignAlign
|
||||
@ -52,5 +57,3 @@ instance (GAlign f, GAlign g) => GAlign (f :*: g) where
|
||||
|
||||
instance (Traversable f, Applicative f, GAlign g) => GAlign (f :.: g) where
|
||||
galign (Comp1 a) (Comp1 b) = Comp1 <$> sequenceA (galign <$> a <*> b)
|
||||
|
||||
instance GAlign (Syntax a)
|
||||
|
Loading…
Reference in New Issue
Block a user