#! /bin/bash

if [ ! -n "$PREFIX" ]; then
  echo "$0: no PREFIX defined!" 1>&2
  exit
fi  

#if [ ! -d dist ]; then
#  echo "$0: no dist directory. Have you built?" 1>&2
#  exit
#fi 

mylib_o=`find . -name mylib.o`
if [ ! -n "$mylib_o" ]; then
  echo "$0: can't find mylib.o!" 1>&2
  exit
fi  

ghci -package hxt-7.4 Main.hs \
     -L$PREFIX/lib -lhdf5 -lexpat -lfftw3f -lmylib \
     $mylib_o