summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2012-08-09 05:15:01 +1000
committerJed Barber <jjbarber@y7mail.com>2012-08-09 05:15:01 +1000
commit12b3e97d0ee4b7d1fa6560b91d14ef7be110bdff (patch)
treecc3936ee04ef9c9f9b22733117228182632e1da1
parent455df475317d4cf59e854fdb329d4f8a470474f3 (diff)
Compilation now automated
-rw-r--r--Delete.hs2
-rw-r--r--ListThm.hs2
-rw-r--r--ProofGraphMain.hs2
-rw-r--r--SemanticMain.hs2
-rw-r--r--Syntactic.hs6
-rw-r--r--WriteProofMain.hs2
-rw-r--r--makefile8
7 files changed, 17 insertions, 7 deletions
diff --git a/Delete.hs b/Delete.hs
index adeb5a5..9f94ee6 100644
--- a/Delete.hs
+++ b/Delete.hs
@@ -10,7 +10,7 @@ import qualified Data.Graph.Inductive.Graph as Graph
main = do
args <- getArgs
- list <- getLines $ head args
+ list <- getLines (head args)
let graph = doGraphGen (map (stripReturn) list)
initList = filter (\x -> Graph.indeg graph x == 0) (Graph.nodes graph)
thmList = (map (\(_,y) -> y)) .
diff --git a/ListThm.hs b/ListThm.hs
index ad65911..a7098b4 100644
--- a/ListThm.hs
+++ b/ListThm.hs
@@ -36,7 +36,7 @@ toThms graph nodeList =
main = do
args <- getArgs
- list <- getLines $ head args
+ list <- getLines (head args)
let graph = doGraphGen (map (stripReturn) list)
initList = filter (\x -> Graph.indeg graph x == 0) (Graph.nodes graph)
theorems = toThms graph initList
diff --git a/ProofGraphMain.hs b/ProofGraphMain.hs
index 91767ad..abd7a56 100644
--- a/ProofGraphMain.hs
+++ b/ProofGraphMain.hs
@@ -6,6 +6,6 @@ import ProofGraph
main = do
args <- getArgs
- list <- getLines $ head args
+ list <- getLines (head args)
let result = doGraphGen (map (stripReturn) list)
printf $ (show result) ++ "\n"
diff --git a/SemanticMain.hs b/SemanticMain.hs
index 7e7fd29..61ba16d 100644
--- a/SemanticMain.hs
+++ b/SemanticMain.hs
@@ -7,6 +7,6 @@ import Semantic
main = do
args <- getArgs
- list <- getLines $ head args
+ list <- getLines (head args)
let result = doSemanticCheck (map (stripReturn) list)
printf result
diff --git a/Syntactic.hs b/Syntactic.hs
index 6502c43..fb629ba 100644
--- a/Syntactic.hs
+++ b/Syntactic.hs
@@ -1,5 +1,7 @@
import System( getArgs )
import Text.Printf
+import Parse
+
scan :: String -> String
@@ -43,7 +45,7 @@ doScan = map (scan . stripReturn)
main = do
args <- getArgs
- list <- getLines $ head args
+ list <- getLines (head args)
plist <- return $ doScan list
- printf $ if (list == plist) then "Scan OK\n" else "Syntax error\n"
+ printf $ if (args == plist) then "Scan OK\n" else "Syntax error\n"
diff --git a/WriteProofMain.hs b/WriteProofMain.hs
index e480716..565aad2 100644
--- a/WriteProofMain.hs
+++ b/WriteProofMain.hs
@@ -8,7 +8,7 @@ import WriteProof
main = do
args <- getArgs
- list <- getLines $ head args
+ list <- getLines (head args)
let graph = doGraphGen (map (stripReturn) list)
trace = doWriteProof graph
output trace
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..524e0da
--- /dev/null
+++ b/makefile
@@ -0,0 +1,8 @@
+all:
+ ghc --make ./SemanticMain.hs -o ./Semantic
+ ghc --make ./ProofGraphMain.hs -o ./ProofGraph
+ ghc --make ./WriteProofMain.hs -o ./WriteProof
+ ghc --make ./Delete.hs -o ./Delete
+ ghc --make ./Concat.hs -o ./Concat
+ ghc --make ./ListThm.hs -o ./ListThm
+ ghc --make ./Syntactic.hs -o ./Syntactic