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
Haskell
Cabal
Commits
568b6b74
Commit
568b6b74
authored
17 years ago
by
malcolm wallace
Browse files
Options
Downloads
Patches
Plain Diff
remove ugly nhc98 cpp+defaulting hack - use explicit typesig instead
parent
61289e6f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Distribution/Simple/Haddock.hs
+2
-6
2 additions, 6 deletions
Distribution/Simple/Haddock.hs
Distribution/Simple/Program.hs
+2
-6
2 additions, 6 deletions
Distribution/Simple/Program.hs
with
4 additions
and
12 deletions
Distribution/Simple/Haddock.hs
+
2
−
6
View file @
568b6b74
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Haddock
...
...
@@ -99,10 +98,6 @@ import System.FilePath((</>), (<.>), splitFileName, splitExtension,
import
System.IO
(
hClose
,
hPutStrLn
)
import
Distribution.Version
#
ifdef
__NHC__
default
(
Integer
,
Double
,
Version
)
#
endif
-- --------------------------------------------------------------------------
-- Haddock support
...
...
@@ -169,7 +164,8 @@ haddock pkg_descr lbi suffixes flags = do
when
isVersion2
$
do
strHadGhcVers
<-
rawSystemProgramStdout
verbosity
confHaddock
[
"--ghc-version"
]
let
mHadGhcVers
=
simpleParse
strHadGhcVers
let
mHadGhcVers
::
Maybe
Version
mHadGhcVers
=
simpleParse
strHadGhcVers
when
(
mHadGhcVers
==
Nothing
)
$
die
"Could not get GHC version from Haddock"
when
(
fromJust
mHadGhcVers
/=
compilerVersion
comp
)
$
die
"Haddock's internal GHC version must match the configured GHC version"
...
...
This diff is collapsed.
Click to expand it.
Distribution/Simple/Program.hs
+
2
−
6
View file @
568b6b74
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Program
...
...
@@ -100,10 +99,6 @@ import System.IO.Error (try)
import
Control.Monad
(
join
,
foldM
)
import
Control.Exception
as
Exception
(
catch
)
#
ifdef
__NHC__
default
(
Integer
,
Double
,
Version
)
#
endif
-- | Represents a program which can be configured.
data
Program
=
Program
{
-- | The simple name of the program, eg. ghc
...
...
@@ -188,7 +183,8 @@ findProgramVersion :: ProgArg -- ^ version args
findProgramVersion
versionArg
selectVersion
verbosity
path
=
do
str
<-
rawSystemStdout
verbosity
path
[
versionArg
]
`
Exception
.
catch
`
\
_
->
return
""
let
version
=
simpleParse
(
selectVersion
str
)
let
version
::
Maybe
Version
version
=
simpleParse
(
selectVersion
str
)
case
version
of
Nothing
->
warn
verbosity
$
"cannot determine version of "
++
path
++
" :
\n
"
++
show
str
...
...
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