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

Recursive for everything else.

This commit is contained in:
Rob Rix 2015-11-18 10:53:59 -08:00
parent 57e30d7a57
commit 7dae86cba6

View File

@ -15,6 +15,7 @@ constructAndRun a b =
run $ algorithm a b where
algorithm (_ :< Indexed a) (_ :< Indexed b) = Free $ ByIndex a b (Pure . Free . Indexed)
algorithm (_ :< Keyed a) (_ :< Keyed b) = Free $ ByKey a b (Pure . Free . Keyed)
algorithm a b = Free $ Recursive a b Pure
run :: Algorithm a (Diff a) -> Maybe (Diff a)
run (Pure diff) = Just diff