summaryrefslogtreecommitdiff
path: root/app/hsc2hs.hs
blob: 076481a8d855defe1f0abef3b9442ceba880418f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 "hsc2hs" $ do
    args <- getArgs
    binDir <- head . lines <$> readProcess "stack" ["path", "--compiler-bin"] ""
    callProcess (binDir </> "hsc2hs") args