Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 11 lines (9 sloc) 269 Bytes
#!/bin/sh
# script finds the type of a Haskell expression
# argument is file containing the expression
# the expression itself goes to stdin
FILE=$*
DECL=`cat`
ID=`echo $DECL | sed 's/^\([^ ]*\).*/\1/'`
echo ":t $ID" | ghci -v0 -cpp -fglasgow-exts -w $FILE
echo $DECL