diff options
author | Jed Barber <jjbarber@y7mail.com> | 2012-05-22 09:22:33 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2012-05-22 09:22:33 +1000 |
commit | 3ea6bacad9fd7b14d5454d6ea109f5de724fd690 (patch) | |
tree | 74a25abf68bcb98bc91d268d06800c8b33808df6 /Object.hs | |
parent | e438502b5fbbfa22d73927daaa0d93dc650a033b (diff) |
Split the Object wrapping from the actual computation in the article commands
Diffstat (limited to 'Object.hs')
-rw-r--r-- | Object.hs | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 |