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
GHC
Commits
1ef6a045
Commit
1ef6a045
authored
Jan 07, 2015
by
Andrey Mokhov
Browse files
Generalise and export suffix :: Way -> String.
parent
2f9338d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Ways.hs
View file @
1ef6a045
...
...
@@ -13,6 +13,7 @@ module Ways (
loggingDynamic
,
threadedLoggingDynamic
,
wayHcOpts
,
suffix
,
hisuf
,
osuf
,
hcsuf
)
where
...
...
@@ -84,15 +85,11 @@ wayHcOpts (Way _ _ units) =
,
when
(
units
==
[
Debug
]
||
units
==
[
Debug
,
Dynamic
])
$
arg
[
"-ticky"
,
"-DTICKY_TICKY"
]
]
-- TODO: cover other cases
suffix
::
FilePath
->
Way
->
FilePath
suffix
base
(
Way
_
_
units
)
=
concat
$
[
"p_"
|
Profiling
`
elem
`
units
]
++
[
"dyn_"
|
Dynamic
`
elem
`
units
]
++
[
base
]
suffix
::
Way
->
String
suffix
way
|
way
==
vanilla
=
""
|
otherwise
=
tag
way
++
"_"
hisuf
,
osuf
,
hcsuf
::
Way
->
FilePath
hisuf
=
suffix
"hi"
osuf
=
suffix
"o"
hcsuf
=
suffix
"hc"
hisuf
,
osuf
,
hcsuf
::
Way
->
String
hisuf
=
(
++
"hi"
)
.
suffix
osuf
=
(
++
"o"
)
.
suffix
hcsuf
=
(
++
"hc"
)
.
suffix
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