Skip to content

Commit

Permalink
add: missing signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
Léana 江 committed Nov 27, 2023
1 parent 2ccd28a commit a74513e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import Parser
import Solver
import Text.Megaparsec (errorBundlePretty, runParser)

accentStyle, decorStyle, errorStyle, resetStyle :: IO ()
accentStyle = setSGR [SetColor Foreground Vivid Blue, SetConsoleIntensity BoldIntensity]
decorStyle = setSGR [SetColor Foreground Dull Black, SetConsoleIntensity NormalIntensity]
errorStyle = setSGR [SetColor Foreground Vivid Red, SetConsoleIntensity BoldIntensity]
resetStyle = setSGR [Reset]

putInfo :: String -> String -> IO ()
putInfo prompt text =
do
let w = ((80 - length prompt) `div` 2) - 2
Expand All @@ -27,6 +29,7 @@ putInfo prompt text =

putStrLn text

putError :: String -> String -> IO ()
putError prompt text =
do
let w = ((80 - length prompt) `div` 2) - 2
Expand All @@ -38,6 +41,7 @@ putError prompt text =

putStrLn text

doRepl :: IO ()
doRepl = do
putStrLn "Please enter a logical formula, :q to quit"
line <- getLine
Expand All @@ -54,6 +58,7 @@ doRepl = do
Left err -> putError "Failed to parse" (errorBundlePretty err)
doRepl

doFile :: FilePath -> IO ()
doFile fname =
do
handle <- openFile fname ReadMode
Expand All @@ -69,6 +74,7 @@ doFile fname =
exitSuccess
Left err -> putError "Failed to parse" (errorBundlePretty err)

main :: IO ()
main = do
args <- getArgs
case args of
Expand Down

0 comments on commit a74513e

Please sign in to comment.