#!/bin/sh

# Copyright (c) 2006 Don Stewart - http://www.cse.unsw.edu.au/~dons
# GPL version 2 or later (see http://www.gnu.org/copyleft/gpl.html)

echo "Make sure you've done a full compiled build recently"

# build the preprocessor

# find possible .o files
if [ -e "dist/build/lambdabot/lambdabot-tmp/" ] ; then
    Odir=dist/build/lambdabot/lambdabot-tmp/
else
    Odir=.
fi

# run ghci with the right command line flags to launch lambdabot
ghci -cpp -Wall -fglasgow-exts -I. -idist/build/autogen/ -fno-warn-incomplete-patterns -fno-warn-missing-methods -fno-warn-orphans -DGHCi -hidir $Odir -odir $Odir $*
