Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
2a093d82
Commit
2a093d82
authored
17 years ago
by
alistair@abayley.org
Browse files
Options
Downloads
Patches
Plain Diff
haddock: run unlit before cpp, like ghc does.
parent
eccb210c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Distribution/Simple/Haddock.hs
+12
-8
12 additions, 8 deletions
Distribution/Simple/Haddock.hs
with
12 additions
and
8 deletions
Distribution/Simple/Haddock.hs
+
12
−
8
View file @
2a093d82
...
@@ -274,15 +274,19 @@ haddock pkg_descr lbi suffixes flags = do
...
@@ -274,15 +274,19 @@ haddock pkg_descr lbi suffixes flags = do
let
targetDir
=
pref
</>
filePref
let
targetDir
=
pref
</>
filePref
let
targetFile
=
targetDir
</>
fileName
let
targetFile
=
targetDir
</>
fileName
let
(
targetFileNoext
,
targetFileExt
)
=
splitExtension
targetFile
let
(
targetFileNoext
,
targetFileExt
)
=
splitExtension
targetFile
let
cppOutput
=
targetFileNoext
<.>
"hspp"
let
hsFile
=
targetFileNoext
<.>
"hs"
createDirectoryIfMissingVerbose
verbosity
True
targetDir
createDirectoryIfMissingVerbose
verbosity
True
targetDir
if
needsCpp
bi
-- Run unlit first, then CPP
then
runSimplePreProcessor
(
ppCpp'
inputArgs
bi
lbi
)
if
(
targetFileExt
==
".lhs"
)
file
targetFile
verbosity
then
runSimplePreProcessor
ppUnlit
file
hsFile
verbosity
else
copyFile
file
targetFile
else
copyFile
file
hsFile
when
(
targetFileExt
==
".lhs"
)
$
do
when
(
needsCpp
bi
)
$
do
runSimplePreProcessor
ppUnlit
runSimplePreProcessor
(
ppCpp'
inputArgs
bi
lbi
)
targetFile
(
targetFileNoext
<.>
"hs"
)
verbosity
hsFile
cppOutput
verbosity
return
()
removeFile
hsFile
copyFile
cppOutput
hsFile
removeFile
cppOutput
needsCpp
::
BuildInfo
->
Bool
needsCpp
::
BuildInfo
->
Bool
needsCpp
bi
=
CPP
`
elem
`
extensions
bi
needsCpp
bi
=
CPP
`
elem
`
extensions
bi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment