Skip to content
GitLab
Menu
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
5d7cc9ba
Commit
5d7cc9ba
authored
Jun 13, 2004
by
ijones
Browse files
added extensionToGHCFlag (from bringert)
parent
064996dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Distribution/Misc.hs
View file @
5d7cc9ba
...
...
@@ -42,7 +42,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -}
module
Distribution.Misc
(
License
(
..
),
Dependency
,
Extension
,
Opt
module
Distribution.Misc
(
License
(
..
),
Dependency
,
Extension
(
..
)
,
Opt
#
ifdef
DEBUG
,
hunitTests
#
endif
...
...
@@ -70,7 +70,11 @@ data Dependency = Dependency String VersionRange
-- |This represents non-standard compiler extensions which each
-- package might employ. Not yet implemented.
data
Extension
=
Foo
|
Bar
deriving
Show
data
Extension
=
OverlappingInstances
|
TypeSynonymInstances
|
TemplateHaskell
deriving
Show
type
Opt
=
String
...
...
Distribution/Simple/Build.hs
View file @
5d7cc9ba
...
...
@@ -47,7 +47,7 @@ module Distribution.Simple.Build (
#
endif
)
where
import
Distribution.Misc
(
Extension
)
import
Distribution.Misc
(
Extension
(
..
)
)
import
Distribution.Setup
(
CompilerFlavor
(
..
),
compilerFlavor
,
compilerPath
)
import
Distribution.Package
(
PackageDescription
(
..
),
showPackageId
)
import
Distribution.Simple.Configure
(
LocalBuildInfo
,
compiler
)
...
...
@@ -59,7 +59,7 @@ import Distribution.Simple.Utils (rawSystemExit, setupMessage,
import
Control.Monad
(
when
)
import
Data.List
(
intersperse
)
import
Data.List
(
intersperse
,
nub
)
#
ifdef
DEBUG
import
HUnit
(
Test
)
...
...
@@ -117,7 +117,11 @@ constructGHCCmdLine pref pkg_descr _ =
++
allModules
pkg_descr
extensionsToGHCFlag
::
[
Extension
]
->
[
String
]
extensionsToGHCFlag
_
=
[]
-- ToDo
extensionsToGHCFlag
=
nub
.
map
extensionToGHCFlag
where
extensionToGHCFlag
OverlappingInstances
=
"-fallow-overlapping-instances"
extensionToGHCFlag
TypeSynonymInstances
=
"-fglasgow-exts"
extensionToGHCFlag
TemplateHaskell
=
"-fth"
extensionsToNHCFlag
::
[
Extension
]
->
[
String
]
extensionsToNHCFlag
_
=
[]
-- ToDo
...
...
Write
Preview
Supports
Markdown
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