big tidy
This commit is contained in:
parent
bd9b58c405
commit
687b5f1040
6 changed files with 54 additions and 39 deletions
|
@ -93,7 +93,7 @@ lRule1 theorem1 theorem2 = maybeToList $ do
|
|||
s2 <- fromEither $ eof parseL $ mkInput theorem2
|
||||
case s1 of
|
||||
Implies s1a s1b
|
||||
| s2 == s1a -> Just $ fromJust $ serializeL s1b
|
||||
| s1a == s2 -> Just $ fromJust $ serializeL s1b
|
||||
| otherwise -> Nothing
|
||||
_ -> Nothing
|
||||
where
|
||||
|
@ -142,6 +142,7 @@ serializeL (Implies s1 s2) = do
|
|||
l1 <- serializeL s1
|
||||
l2 <- serializeL s2
|
||||
return $ [Open] ++ l1 ++ [Arrow] ++ l2 ++ [Close]
|
||||
serializeL _ = Nothing
|
||||
|
||||
deriveLExample1 :: Derivation AlphaL
|
||||
deriveLExample1 = step5
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module Logic.Language.Impl.M where
|
||||
module Logic.Language.Impl.MIU where
|
||||
|
||||
import Logic.Language (Language(..), ConcatShowList(..))
|
||||
import Logic.Language.Derivation (Derivation(..))
|
||||
|
@ -80,6 +80,6 @@ deriveMIIUII =
|
|||
|
||||
{-
|
||||
ghci> import Logic.Language.Derivation (resolveDerivation)
|
||||
ghci> resolveDerivation deriveMIIUII
|
||||
Right [M,I,I,U,I,I]
|
||||
ghci> ConcatShowList <$> resolveDerivation deriveMIIUII
|
||||
Right MIIUII
|
||||
-}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue