From 3ea6bacad9fd7b14d5454d6ea109f5de724fd690 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 22 May 2012 09:22:33 +1000 Subject: Split the Object wrapping from the actual computation in the article commands --- Object.hs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Object.hs') diff --git a/Object.hs b/Object.hs index 5b2130c..5d0e71e 100644 --- a/Object.hs +++ b/Object.hs @@ -1,7 +1,9 @@ module Object ( Object(..), - List + List, + + makeSubst ) where @@ -37,3 +39,11 @@ instance Show Object where show (ObjVar a) = show a show (ObjTerm a) = show a show (ObjThm a) = show a + + + +makeSubst :: [Object] -> Substitution +makeSubst l = + let list = (map (map objList)) . (map objList) $ l + f = (\g h x -> (g . head $ x, h . last $ x)) + in f (map (f objName objType)) (map (f objVar objTerm)) list -- cgit