From ad5ada9d161c6bb27b3201b31ece36479c1ff98d Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 1 Aug 2016 09:37:26 +0200 Subject: Cleanup & fix #1 --- LogicParser.icl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'LogicParser.icl') diff --git a/LogicParser.icl b/LogicParser.icl index ab99abf..46ac605 100644 --- a/LogicParser.icl +++ b/LogicParser.icl @@ -30,15 +30,14 @@ Start | length (removeDup (foldr (++) [] (map all_atoms exprs))) > 8 = abort "You don't need more than 8 atomic expressions." | otherwise = show outputoption (compute (if extended truthtable_n simple_truthtable_n exprs)) where - argc = size argv - 1 - argv = getCommandLine + argc = size argv - 1 + argv = getCommandLine - exprs = map parse (filter (\s . s.[0] <> '-') [argv.[n] \\ n <- [1..argc]]) - - extended = hasArg "-e" - outputoption - | hasArg "-html" = Html - | hasArg "-latex" = LaTeX - | otherwise = Plain - hasArg arg = or [arg == argv.[n] \\ n <- [0..argc]] + exprs = map parse (filter (\s . s.[0] <> '-') [argv.[n] \\ n <- [1..argc]]) + extended = hasArg "-e" + outputoption + | hasArg "-html" = Html + | hasArg "-latex" = LaTeX + | otherwise = Plain + hasArg arg = or [arg == argv.[n] \\ n <- [0..argc]] -- cgit v1.2.3