1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

📝 originPackage.

This commit is contained in:
Rob Rix 2018-04-02 17:38:21 -04:00
parent 2c0807f0e5
commit f028d48731

View File

@ -18,6 +18,7 @@ originModule (Term o _) = originModule o
originModule (Module _ m) = Just m
originModule _ = Nothing
-- | Project the 'PackageInfo' out of an 'Origin', if available.
originPackage :: Origin term ty -> Maybe P.PackageInfo
originPackage (Term o _) = originPackage o
originPackage (Module o _) = originPackage o