From 5faabaf240316300e48cf37eae0d5e2bfd0ec66c Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 29 May 2012 07:30:50 +1000 Subject: All potential errors now caught into Nothings --- Command.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Command.hs') diff --git a/Command.hs b/Command.hs index 6df88f8..e6e0e39 100644 --- a/Command.hs +++ b/Command.hs @@ -173,11 +173,11 @@ refl term = Theorem Set.empty (mkEquals term term) -subst :: Theorem -> [Object] -> Theorem +subst :: Theorem -> [Object] -> Maybe Theorem subst thm list = - let s = makeSubst list - in Theorem (Set.map (substitute s) (thmHyp thm)) - (substitute s (thmCon thm)) + do s <- makeSubst list + return (Theorem (Set.map (substitute s) (thmHyp thm)) + (substitute s (thmCon thm))) thm :: Term -> [Term] -> Theorem -> Maybe Theorem -- cgit