--
-- * Lookups
--

-- | Does a lookup by unit identifier.
--
-- Since multiple package DBs mask each other by 'UnitId',
-- then we get back at most one package.
--
lookupUnitId :: PackageIndex a -> UnitId
             -> Maybe a
lookupUnitId index uid = Map.lookup uid (unitIdIndex index)
lookupUnitId :: PackageIndex a -> UnitId
             -> Maybe a
lookupUnitId index uid = Map.lookup uid (unitIdIndex index)
lookupUnitId index uid = Map.lookup uid (unitIdIndex index)