1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

We don’t use this.

This commit is contained in:
Rob Rix 2015-11-27 11:58:20 -05:00
parent 69a0d33ffe
commit f89e05b702

View File

@ -15,7 +15,7 @@ zipTerms :: Term a annotation -> Term a annotation -> Maybe (Term a (annotation,
zipTerms (annotation1 :< a) (annotation2 :< b) = annotate $ zipUnwrap a b zipTerms (annotation1 :< a) (annotation2 :< b) = annotate $ zipUnwrap a b
where where
annotate = fmap ((annotation1, annotation2) :<) annotate = fmap ((annotation1, annotation2) :<)
zipUnwrap (Leaf a) (Leaf b) = Just $ Leaf b zipUnwrap (Leaf _) (Leaf b) = Just $ Leaf b
zipUnwrap (Indexed a) (Indexed b) = Just . Indexed . catMaybes $ zipWith zipTerms a b zipUnwrap (Indexed a) (Indexed b) = Just . Indexed . catMaybes $ zipWith zipTerms a b
zipUnwrap (Fixed a) (Fixed b) = Just . Fixed . catMaybes $ zipWith zipTerms a b zipUnwrap (Fixed a) (Fixed b) = Just . Fixed . catMaybes $ zipWith zipTerms a b
zipUnwrap (Keyed a) (Keyed b) | keys a == keys b = Just . Keyed . fromList . catMaybes $ zipUnwrapMaps a b <$> keys a zipUnwrap (Keyed a) (Keyed b) | keys a == keys b = Just . Keyed . fromList . catMaybes $ zipUnwrapMaps a b <$> keys a