loc :: FilePath -> Located Artifact
loc f = l $ artifactCabalFile P.getDataDir f
  where
  l = case takeExtension f of
    ".h" -> Incl
    ".c" -> Src
    _ -> Root
loc :: FilePath -> Located Artifact
loc f = l $ artifactCabalFile P.getDataDir f
  where
  l = case takeExtension f of
    ".h" -> Incl
    ".c" -> Src
    _ -> Root
loc f = l $ artifactCabalFile P.getDataDir f
  where
  l = case takeExtension f of
    ".h" -> Incl
    ".c" -> Src
    _ -> Root