diff options
author | Jed Barber <jjbarber@y7mail.com> | 2012-05-29 07:30:50 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2012-05-29 07:30:50 +1000 |
commit | 5faabaf240316300e48cf37eae0d5e2bfd0ec66c (patch) | |
tree | 1543c8119a0a7be4cc2f1751a755fb16b67fe8aa /Command.hs | |
parent | f8261525ddb9efe70eef21d3fc45003f431826e7 (diff) |
All potential errors now caught into Nothings
Diffstat (limited to 'Command.hs')
-rw-r--r-- | Command.hs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |