summaryrefslogtreecommitdiff
path: root/app/runhaskell.hs
blob: c998ca7c8163b78425d22697220764e9a3148317 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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