From 602048dc53aa06b03e88109a669a33064ebabe76 Mon Sep 17 00:00:00 2001 From: James Eversole Date: Thu, 19 Dec 2024 19:08:56 -0600 Subject: [PATCH] Formatting Clean up Main.hs formatting; clarify language in parsing branch --- src/Main.hs | 6 +++++- src/Parser.hs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index db39fc8..e1af0ce 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -9,4 +9,8 @@ import Data.Map as Map import Text.Megaparsec (runParser) main :: IO () -main = putStr $ show $ result $ evalMulti Map.empty (parseMulti "false = t\nnot = t (t (t t) (t t t)) t\ntrue = not false\ntrue") +main = putStr + $ show + $ result + $ evalMulti Map.empty (parseMulti + "false = t\nnot = t (t (t t) (t t t)) t\ntrue = not false\ntrue") diff --git a/src/Parser.hs b/src/Parser.hs index c190545..d792985 100644 --- a/src/Parser.hs +++ b/src/Parser.hs @@ -49,7 +49,7 @@ parseApplication = do func <- parseAtomicBase args <- many parseAtomic case func of - TLeaf | not (null args) && all isTreeTerm args -> fail "Not an application, defer to Tree Calculus" + TLeaf | not (null args) && all isTreeTerm args -> fail "Defer to Tree Calculus" _ -> return (SApp func args) isTreeTerm :: SaplingAST -> Bool