summaryrefslogtreecommitdiff
path: root/app/runhaskell.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/runhaskell.hs')
-rw-r--r--app/runhaskell.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/runhaskell.hs b/app/runhaskell.hs
new file mode 100644
index 0000000..c998ca7
--- /dev/null
+++ b/app/runhaskell.hs
@@ -0,0 +1,17 @@
+module Main where
+
+import StackWrapper
+
+import qualified GhcLib as G
+
+import System.Environment
+import System.FilePath
+import System.Process
+
+main :: IO ()
+main =
+ run $ G.run "runhaskell" $ do
+ args <- getArgs
+ binDir <- head . lines <$> readProcess "stack" ["path", "--compiler-bin"] ""
+ -- use --ghc-arg option?
+ callProcess (binDir </> "runhaskell") args