Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
a62ea2ef
Commit
a62ea2ef
authored
Aug 02, 2018
by
Alexis Williams
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default to Haskell2010
parent
e7bbeafa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
cabal-install/Distribution/Client/CmdRun.hs
cabal-install/Distribution/Client/CmdRun.hs
+11
-3
No files found.
cabal-install/Distribution/Client/CmdRun.hs
View file @
a62ea2ef
...
...
@@ -82,7 +82,7 @@ import qualified Distribution.SPDX.License as SPDX
import
Distribution.Solver.Types.SourcePackage
as
SP
(
SourcePackage
(
..
)
)
import
Distribution.Types.BuildInfo
(
BuildInfo
(
targetBuildDepends
)
)
(
BuildInfo
(
..
)
)
import
Distribution.Types.CondTree
(
CondTree
(
..
)
)
import
Distribution.Types.Executable
...
...
@@ -95,6 +95,8 @@ import Distribution.Types.PackageId
(
PackageIdentifier
(
..
)
)
import
Distribution.Types.Version
(
mkVersion
,
version0
)
import
Language.Haskell.Extension
(
Language
(
..
)
)
import
qualified
Data.ByteString.Char8
as
BS
import
qualified
Data.Map
as
Map
...
...
@@ -347,12 +349,18 @@ handleScriptCase verbosity baseCtx tempDir scriptContents = do
}
genericPackageDescription
=
emptyGenericPackageDescription
{
GPD
.
packageDescription
=
packageDescription
,
condExecutables
=
[(
"script"
,
CondNode
executable'
exeDep
s
[]
)]
,
condExecutables
=
[(
"script"
,
CondNode
executable'
targetBuildDepend
s
[]
)]
}
executable'
=
executable
{
modulePath
=
"Main.hs"
,
buildInfo
=
binfo
{
defaultLanguage
=
case
defaultLanguage
of
just
@
(
Just
_
)
->
just
Nothing
->
Just
Haskell2010
}
}
exeDeps
=
targetBuildDepends
(
buildInfo
executable
'
)
binfo
@
BuildInfo
{
..
}
=
buildInfo
executable
packageDescription
=
emptyPackageDescription
{
package
=
pkgId
,
specVersionRaw
=
Left
(
mkVersion
[
2
,
2
])
...
...
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