1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 21:16:12 +03:00

Merge modules’ packages.

This commit is contained in:
Rob Rix 2018-03-30 13:59:05 -04:00
parent 8796f915d4
commit f1a44db139

View File

@ -69,6 +69,7 @@ deriving instance Show (Base term ()) => Show (SomeOrigin term)
merge :: Origin term ty1 -> Origin term ty2 -> SomeOrigin term
merge a Unknown = SomeOrigin a
merge (Package p) (Module Unknown m) = SomeOrigin (Module (Package p) m)
merge (Module p _) (Module Unknown m) = SomeOrigin (Module p m)
merge (Module p m) (Term Unknown t) = SomeOrigin (Term (Module p m) t)
merge (Term m _) (Term Unknown t) = SomeOrigin (Term m t)
merge _ b = SomeOrigin b