-- | Facts for a Kythe package, which corresponds to a Haskell package+module.
makePackageFacts :: Raw.VName -> PkgModule -> NameAndEntries
makePackageFacts basevn PkgModule{..} = NameAndEntries pkgvn facts
  where
    pkgvn = basevn { vnSignature = moduleSig }
      where moduleSig = getPackage <> ":" <> getModule
    facts = nodeFacts pkgvn PackageNK []

-- | Creates file node entries. Not in Conversion, since the result is needed
-- to construct the ConversionEnv.
makePackageFacts :: Raw.VName -> PkgModule -> NameAndEntries
makePackageFacts basevn PkgModule{..} = NameAndEntries pkgvn facts
  where
    pkgvn = basevn { vnSignature = moduleSig }
      where moduleSig = getPackage <> ":" <> getModule
    facts = nodeFacts pkgvn PackageNK []

-- | Creates file node entries. Not in Conversion, since the result is needed
-- to construct the ConversionEnv.
makePackageFacts basevn PkgModule{..} = NameAndEntries pkgvn facts
  where
    pkgvn = basevn { vnSignature = moduleSig }
      where moduleSig = getPackage <> ":" <> getModule
    facts = nodeFacts pkgvn PackageNK []

-- | Creates file node entries. Not in Conversion, since the result is needed
-- to construct the ConversionEnv.