Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
1a3f43b5
Commit
1a3f43b5
authored
Jan 14, 2015
by
Andrey Mokhov
Browse files
Add package data key HsOpts.
parent
6ce7cd3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Oracles/PackageData.hs
View file @
1a3f43b5
...
...
@@ -20,6 +20,7 @@ data PackageData = Modules FilePath
|
DepKeys
FilePath
|
Synopsis
FilePath
|
CppOpts
FilePath
|
HsOpts
FilePath
instance
ShowArgs
PackageData
where
showArgs
packageData
=
do
...
...
@@ -32,8 +33,10 @@ instance ShowArgs PackageData where
DepKeys
file
->
(
"DEP_KEYS"
,
file
,
""
)
Synopsis
file
->
(
"SYNOPSIS"
,
file
,
""
)
CppOpts
file
->
(
"CPP_OPTS"
,
file
,
""
)
HsOpts
file
->
(
"HC_OPTS"
,
file
,
""
)
fullKey
=
replaceSeparators
'_'
$
takeDirectory
file
++
"_"
++
key
res
<-
askOracle
$
PackageDataKey
(
file
,
fullKey
)
file'
=
toStandard
$
normaliseEx
file
res
<-
askOracle
$
PackageDataKey
(
file'
,
fullKey
)
return
$
words
$
case
res
of
Nothing
->
error
$
"No key '"
++
key
++
"' in "
++
file
++
"."
Just
""
->
defaultValue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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