mirror of
https://github.com/github/semantic.git
synced 2025-01-08 16:39:47 +03:00
Remove introduce
.
This commit is contained in:
parent
a2c0818851
commit
a684c2fa58
@ -38,9 +38,7 @@ hylo down up a = down annotation $ hylo down up <$> syntax where
|
||||
|
||||
-- | Constructs an algorithm and runs it
|
||||
constructAndRun :: (Eq a, Eq annotation) => Comparable a annotation -> Term a annotation -> Term a annotation -> Maybe (Diff a annotation)
|
||||
constructAndRun _ a b | a == b = hylo introduce (copoint &&& unwrap) <$> zipTerms a b where
|
||||
introduce :: Both annotation -> Syntax a (Diff a annotation) -> Diff a annotation
|
||||
introduce ann = Free . Annotated ann
|
||||
constructAndRun _ a b | a == b = hylo (curry $ Free . uncurry Annotated) (copoint &&& unwrap) <$> zipTerms a b where
|
||||
|
||||
constructAndRun comparable a b | not $ comparable a b = Nothing
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user