1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 07:25:44 +03:00

Move the GAlign instance over Syntax a into its own section.

This commit is contained in:
Rob Rix 2016-07-11 14:52:13 -04:00
parent ee60b4be7a
commit d6dbc24056

View File

@ -15,7 +15,12 @@ class Functor f => GAlign f where
galign a b = to1 <$> galign (from1 a) (from1 b) 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 GAlign [] where galign = galignAlign
instance Eq key => GAlign (OrderedMap key) 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 instance (Traversable f, Applicative f, GAlign g) => GAlign (f :.: g) where
galign (Comp1 a) (Comp1 b) = Comp1 <$> sequenceA (galign <$> a <*> b) galign (Comp1 a) (Comp1 b) = Comp1 <$> sequenceA (galign <$> a <*> b)
instance GAlign (Syntax a)