Skip to content

Commit bc04142

Browse files
committed
Working Haskell scripts and renamed some scripts
1 parent 6928cb7 commit bc04142

4 files changed

Lines changed: 89 additions & 2 deletions

File tree

evaluate_haskell.sh

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
#!/bin/bash
2+
3+
# A working Glasgow Haskell Compiler must be installed
4+
export GHC=ghc
5+
6+
# Needs Test (HUnit) and Data to work
7+
export HUNIT=../../../../../language/haskell/src/main/resources/haskell-code/Test
8+
export HDATA=../../../../../language/haskell/src/main/resources/haskell-code/Data
9+
10+
if [ ! -d target ]
11+
then
12+
echo "No target directory"
13+
exit
14+
fi
15+
16+
cd target
17+
18+
if [ ! -d ep-firstVersion ]
19+
then
20+
echo "ep-firstVersion has not yet been generated"
21+
exit
22+
fi
23+
24+
cd ep-firstVersion
25+
26+
if [ ! -d haskell ]
27+
then
28+
echo "No Haskell EP approaches have been generated"
29+
exit
30+
fi
31+
32+
# All output will appear in the haskell-report.txt
33+
echo REPORT > haskell-report.txt
34+
35+
cd haskell
36+
37+
for d in `ls`
38+
do
39+
echo $d >> ../haskell-report.txt
40+
echo $d
41+
cd $d
42+
for m in `ls`
43+
do
44+
echo $m >> ../../haskell-report.txt
45+
cd $m
46+
echo "compiling $d $m"
47+
echo "compiling $d $m" >> ../../../haskell-report.txt 2>&1
48+
49+
if [ ! -d Data ]
50+
then
51+
cp -r $HDATA .
52+
fi
53+
if [ ! -d Test ]
54+
then
55+
cp -r $HUNIT .
56+
fi
57+
58+
for tc in `ls Main*.hs`
59+
do
60+
$GHC $tc -o a.out >> ../../../haskell-report.txt
61+
if [ $? -eq 0 ]
62+
then
63+
echo $d.${tc%.*} successful
64+
echo $d.${tc%.*} successful >> ../../../haskell-report.txt
65+
./a.out >> ../../../haskell-report.txt 2>&1
66+
if [ $? -eq 0 ]
67+
then
68+
echo ${tc%.*} success
69+
else
70+
echo ${tc%.*} failed
71+
echo $d.${tc%.*} failed >> ../../../haskell-report.txt
72+
fi
73+
74+
else
75+
echo "failure on compile $d.$m"
76+
echo "failure on compile $d.$m" >> ../../../haskell-report.txt
77+
fi
78+
done
79+
cd ..
80+
done
81+
cd ..
82+
done
83+
84+
echo "-------------" >> ../haskell-report.txt
85+
echo "FINALLY DONE" >> ../haskell-report.txt
86+
echo "-------------" >> ../haskell-report.txt
87+
88+
ls -l ../haskell-report.txt
File renamed without changes.
File renamed without changes.

language/haskell/src/main/scala/org/combinators/ep/language/haskell/grow/GrowGenerator.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,11 +519,10 @@ trait GrowGenerator extends HaskellGenerator with StandardHaskellBinaryMethod wi
519519

520520
op match {
521521
case _ : BinaryMethod =>
522-
println (op.name + " is binary")
523522
binaryOp
524523

525524
case _ =>
526-
println (op.name + " is normal")
525+
527526

528527
new Haskell(s"""
529528
#-- | Evaluates expression.

0 commit comments

Comments
 (0)