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
c158014f
Commit
c158014f
authored
Apr 16, 2017
by
Zhen Zhang
Committed by
Andrey Mokhov
Apr 15, 2017
Browse files
Add wrapper for Runhaskell, Fix
#304
(
#305
)
parent
295c7812
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
c158014f
...
...
@@ -17,3 +17,6 @@ cabal.sandbox.config
# the user settings
/UserSettings.hs
# Mostly temp file by emacs
*~
src/Rules/Program.hs
View file @
c158014f
...
...
@@ -12,6 +12,7 @@ import Oracles.ModuleFiles
import
Oracles.PackageData
import
Rules.Wrappers.Ghc
import
Rules.Wrappers.GhcPkg
import
Rules.Wrappers.Runhaskell
import
Settings
import
Settings.Path
import
Target
...
...
@@ -25,6 +26,7 @@ type Wrapper = FilePath -> Expr String
wrappers
::
[(
Context
,
Wrapper
)]
wrappers
=
[
(
vanillaContext
Stage0
ghc
,
ghcWrapper
)
,
(
vanillaContext
Stage1
ghc
,
ghcWrapper
)
,
(
vanillaContext
Stage1
runGhc
,
runhaskellWrapper
)
,
(
vanillaContext
Stage0
ghcPkg
,
ghcPkgWrapper
)
]
buildProgram
::
[(
Resource
,
Int
)]
->
Context
->
Rules
()
...
...
src/Rules/Wrappers/Runhaskell.hs
0 → 100644
View file @
c158014f
module
Rules.Wrappers.Runhaskell
(
runhaskellWrapper
)
where
import
Base
import
Expression
import
Oracles.Path
runhaskellWrapper
::
FilePath
->
Expr
String
runhaskellWrapper
program
=
do
lift
$
need
[
sourcePath
-/-
"Rules/Wrappers/Runhaskell.hs"
]
top
<-
getTopDirectory
return
$
unlines
[
"#!/bin/bash"
,
"exec "
++
(
top
-/-
program
)
++
" -f"
++
(
top
-/-
"inplace/lib/bin/ghc-stage2"
)
-- HACK
++
" -B"
++
(
top
-/-
"inplace/lib"
)
++
" ${1+
\"
$@
\"
}"
]
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