Browse files

Don't hard code arguments.

  • Loading branch information...
1 parent 9336d4e commit 3dea6204eda2cb5d6b7b8680528fdac8ff987b07 @nominolo nominolo committed Oct 20, 2008
Showing with 7 additions and 4 deletions.
  1. +1 −1 Makefile
  2. +6 −3 examples/GetImports.hs
View
2 Makefile
@@ -18,7 +18,7 @@ install:
$(SETUP) install
test:
- ./dist/build/test/test.exe
+ ./dist/build/test_get_imports/test_get_imports $(GHC_PATH)/compiler dist-stage2 +RTS -s -RTS
clean:
$(SETUP) clean
View
9 examples/GetImports.hs
@@ -9,11 +9,14 @@ import HscTypes
import Data.Maybe
import Control.Monad
+import System.Environment
main = runScion $ do
- liftIO $ print "hello"
- setWorkingDir "../ghc/compiler"
- openCabalProject "./dist-stage2"
+ [working_dir, dist_dir] <- io $ getArgs
+ setWorkingDir working_dir
+ liftIO $ print working_dir
+ io $ print dist_dir
+ openCabalProject dist_dir
setDynFlagsFromCabal Library
setTargetsFromCabal Library
--load LoadAllTargets

0 comments on commit 3dea620

Please sign in to comment.