Commit 3edc9324 authored by cabal's avatar cabal
Browse files

PackageDescription: haddockName generates the name of the .haddock file

parent ad57f682
......@@ -75,6 +75,7 @@ module Distribution.PackageDescription (
PError, showError,
hcOptions,
autogenModuleName,
haddockName,
#ifdef DEBUG
hunitTests,
test
......@@ -103,6 +104,7 @@ import Distribution.Simple.Utils(currentDir, die, dieWithLocation, warn)
import Language.Haskell.Extension(Extension(..))
import Distribution.Compat.ReadP as ReadP hiding (get)
import Distribution.Compat.FilePath(joinFileExt)
#ifdef DEBUG
import HUnit (Test(..), assertBool, Assertion, runTestTT, Counts, assertEqual)
......@@ -340,6 +342,10 @@ autogenModuleName pkg_descr =
where fixchar '-' = '_'
fixchar c = c
haddockName :: PackageDescription -> FilePath
haddockName pkg_descr =
joinFileExt (pkgName (package pkg_descr)) "haddock"
-- ------------------------------------------------------------
-- * Parsing & Pretty printing
-- ------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment