Skip to content

Commit

Permalink
utils script wibbles
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcdonell committed Jun 9, 2016
1 parent b331503 commit 10affaf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
11 changes: 11 additions & 0 deletions utils/ghc-core
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

GHC_CORE=`which -a ghc-core | grep -v "\./ghc-core"`

$GHC_CORE --no-cast --no-asm -- \
-odir dist/build -hidir dist/build \
-optP -include -optP dist/build/autogen/cabal_macros.h \
-iutils -Iinclude \
-O2 \
$@

12 changes: 6 additions & 6 deletions utils/ghci
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# Get cabal to load up ghci for us. This will set the environment appropriately
# if we have a local sandbox installation.
#
GHC="cabal exec ghc --"
GHC="stack exec ghci --"

GHC_FLAGS="$GHC_FLAGS
--interactive
-iutils
-hide-package language-c
-DUNIX
-DACCELERATE_DEBUG
-DACCELERATE_BOUNDS_CHECKS
-DACCELERATE_INTERNAL_CHECKS
-iutils"
-DACCELERATE_INTERNAL_CHECKS"

# If we have specified one command line argument, but that file doesn't exist,
# search the source files for something with that name prefix.
Expand All @@ -22,8 +22,8 @@ GHC_FLAGS="$GHC_FLAGS
#
# > ghci Data/Array/Accelerate/Trafo/Sharing.hs
#
FILES=`find Data -iname "$1*" -name "*.hs"`
COUNT=`echo $FILES | wc -w`
FILES=$(find Data -iname "$1*" -name "*.hs")
COUNT=$(echo $FILES | wc -w)

if [ $COUNT -eq 1 ]; then
$GHC $GHC_FLAGS $FILES
Expand Down

0 comments on commit 10affaf

Please sign in to comment.