Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
d6fe88ac
Commit
d6fe88ac
authored
Dec 27, 2015
by
bardur.arantsson
Browse files
Clean up FIXMEs
parent
e0d75a62
Changes
10
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/BuildReports/Anonymous.hs
View file @
d6fe88ac
...
...
@@ -191,7 +191,6 @@ parse s = case parseFields s of
ParseFailed
perror
->
Left
msg
where
(
_
,
msg
)
=
locatedErrorMsg
perror
ParseOk
_
report
->
Right
report
--FIXME: this does not allow for optional or repeated fields
parseFields
::
String
->
ParseResult
BuildReport
parseFields
input
=
do
fields
<-
mapM
extractField
=<<
readFields
input
...
...
cabal-install/Distribution/Client/Config.hs
View file @
d6fe88ac
...
...
@@ -640,7 +640,7 @@ configFieldDescriptions src =
([
"builddir"
,
"constraint"
,
"dependency"
]
++
map
fieldName
installDirsFields
)
--
FIXME: t
his is only here because viewAsFieldDescr gives us a parser
--
T
his is only here because viewAsFieldDescr gives us a parser
-- that only recognises 'ghc' etc, the case-sensitive flag names, not
-- what the normal case-insensitive parser gives us.
[
simpleField
"compiler"
...
...
cabal-install/Distribution/Client/IndexUtils.hs
View file @
d6fe88ac
...
...
@@ -88,13 +88,13 @@ import System.IO.Unsafe (unsafeInterleaveIO)
import
System.IO.Error
(
isDoesNotExistError
)
-- | Reduced-verbosity version of 'Configure.getInstalledPackages'
getInstalledPackages
::
Verbosity
->
Compiler
->
PackageDBStack
->
ProgramConfiguration
->
IO
InstalledPackageIndex
getInstalledPackages
verbosity
comp
packageDbs
conf
=
Configure
.
getInstalledPackages
verbosity'
comp
packageDbs
conf
where
--FIXME: make getInstalledPackages use sensible verbosity in the first place
verbosity'
=
lessVerbose
verbosity
------------------------------------------------------------------------
...
...
cabal-install/Distribution/Client/Install.hs
View file @
d6fe88ac
...
...
@@ -688,7 +688,6 @@ printPlan dryRun verbosity plan sourcePkgDb = case plan of
showStanza
TestStanzas
=
"*test"
showStanza
BenchStanzas
=
"*bench"
-- FIXME: this should be a proper function in a proper place
showFlagAssignment
::
FlagAssignment
->
String
showFlagAssignment
=
concatMap
((
' '
:
)
.
showFlagValue
)
showFlagValue
(
f
,
True
)
=
'+'
:
showFlagName
f
...
...
cabal-install/Distribution/Client/ParseUtils.hs
View file @
d6fe88ac
...
...
@@ -21,7 +21,6 @@ import qualified Data.Map as Map
import
qualified
Text.PrettyPrint
as
Disp
(
Doc
,
text
,
colon
,
vcat
,
empty
,
isEmpty
,
nest
)
--FIXME: replace this with something better
parseFields
::
[
FieldDescr
a
]
->
a
->
[
ParseUtils
.
Field
]
->
ParseResult
a
parseFields
fields
=
foldM
setField
where
...
...
cabal-install/Distribution/Client/Sandbox.hs
View file @
d6fe88ac
...
...
@@ -38,7 +38,6 @@ module Distribution.Client.Sandbox (
updateSandboxConfigFileFlag
,
updateInstallDirs
,
-- FIXME: move somewhere else
configPackageDB'
,
configCompilerAux'
,
getPersistOrConfigCompiler
)
where
...
...
@@ -384,7 +383,7 @@ doAddSource verbosity buildTreeRefs sandboxDir pkgEnv refType = do
(
compilerId
comp
)
platform
withAddTimestamps
sandboxDir
$
do
--
FIXME: p
ath canonicalisation is done in addBuildTreeRefs, but we do it
--
P
ath canonicalisation is done in addBuildTreeRefs, but we do it
-- twice because of the timestamps file.
buildTreeRefs'
<-
mapM
tryCanonicalizePath
buildTreeRefs
Index
.
addBuildTreeRefs
verbosity
indexFile
buildTreeRefs'
refType
...
...
cabal-install/Distribution/Client/Sandbox/PackageEnvironment.hs
View file @
d6fe88ac
...
...
@@ -403,7 +403,6 @@ pkgEnvFieldDescrs src = [
(
fromFlagOrDefault
Disp
.
empty
.
fmap
Disp
.
text
)
(
optional
parseFilePathQ
)
pkgEnvInherit
(
\
v
pkgEnv
->
pkgEnv
{
pkgEnvInherit
=
v
})
-- FIXME: Should we make these fields part of ~/.cabal/config ?
,
commaNewLineListField
"constraints"
(
Text
.
disp
.
fst
)
((
\
pc
->
(
pc
,
src
))
`
fmap
`
Text
.
parse
)
(
configExConstraints
.
savedConfigureExFlags
.
pkgEnvSavedConfig
)
...
...
cabal-install/Distribution/Client/Targets.hs
View file @
d6fe88ac
...
...
@@ -728,7 +728,6 @@ readUserConstraint str =
"expected a package name followed by a constraint, which is "
++
"either a version range, 'installed', 'source' or flags"
--FIXME: use Text instance for FlagName and FlagAssignment
instance
Text
UserConstraint
where
disp
(
UserConstraintVersion
pkgname
verrange
)
=
disp
pkgname
<+>
disp
verrange
...
...
cabal-install/Distribution/Client/Types.hs
View file @
d6fe88ac
...
...
@@ -232,8 +232,6 @@ data RemoteRepo =
remoteRepoShouldTryHttps
::
Bool
}
-- FIXME: discuss this type some more.
deriving
(
Show
,
Eq
,
Ord
)
-- | Construct a partial 'RemoteRepo' value to fold the field parser list over.
...
...
cabal-install/Main.hs
View file @
d6fe88ac
...
...
@@ -726,7 +726,7 @@ installAction (configFlags, configExFlags, installFlags, haddockFlags)
maybeAddCompilerTimestampRecord
verbosity
sandboxDir
indexFile
(
compilerId
comp
)
platform
--
FIXME
: Passing 'SandboxPackageInfo' to install unconditionally here means
--
TODO
: Passing 'SandboxPackageInfo' to install unconditionally here means
-- that 'cabal install some-package' inside a sandbox will sometimes reinstall
-- modified add-source deps, even if they are not among the dependencies of
-- 'some-package'. This can also prevent packages that depend on older
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment