summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2012-08-02 09:38:42 +1000
committerJed Barber <jjbarber@y7mail.com>2012-08-02 09:38:42 +1000
commita44e9d598841612b277d0334e11c45348a6b3723 (patch)
treea812a18d1b9963a64c4070a655bd261964c828de
parent35a4cea8dafa280b1f7622fea0bffb12c84210b9 (diff)
Moved fst3, snd3, thd3 functions to Parse.hs
-rw-r--r--Parse.hs15
-rw-r--r--WriteProof.hs13
2 files changed, 15 insertions, 13 deletions
diff --git a/Parse.hs b/Parse.hs
index 676f2e7..f8e6793 100644
--- a/Parse.hs
+++ b/Parse.hs
@@ -7,7 +7,10 @@ module Parse (
isComment,
isNumber,
isName,
- output
+ output,
+ fst3,
+ snd3,
+ thd3
) where
import Control.Monad( liftM )
@@ -62,3 +65,13 @@ output [] = return ()
output list = do
putStrLn (head list)
output (tail list)
+
+
+fst3 :: (a,b,c) -> a
+fst3 (a,_,_) = a
+
+snd3 :: (a,b,c) -> b
+snd3 (_,b,_) = b
+
+thd3 :: (a,b,c) -> c
+thd3 (_,_,c) = c
diff --git a/WriteProof.hs b/WriteProof.hs
index 3d0e095..2397de9 100644
--- a/WriteProof.hs
+++ b/WriteProof.hs
@@ -17,7 +17,7 @@ import qualified Data.Map as Map
import Data.List
import Stack( Stack, at, (<:>) )
import qualified Stack as Stack
-import Parse( isNumber )
+import Parse( isNumber, fst3, snd3, thd3 )
@@ -65,17 +65,6 @@ subGraph graph node =
-fst3 :: (a,b,c) -> a
-fst3 (a,_,_) = a
-
-snd3 :: (a,b,c) -> b
-snd3 (_,b,_) = b
-
-thd3 :: (a,b,c) -> c
-thd3 (_,_,c) = c
-
-
-
orderNodes :: Gr String (Int,Int) -> [Node] -> [Node]
orderNodes graph nodeList = nodeList
--placeholder