Skip to content

Commit

Permalink
fix(cli): removed useless print expressions from main workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasvergne committed Dec 12, 2024
1 parent 969d2c8 commit 48c52c8
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ buildProgram fp = do
void $ ppError $ "File " <> fp <> " does not exist"
exitFailure

void . ppBuild $ "Parsing " <> fp

let folder = takeDirectory fp
fileNameWithoutDir = dropExtension $ takeFileName fp

Expand All @@ -55,12 +53,9 @@ buildProgram fp = do

handle moduleResult . const $ do
preHLIR <- removeRequires <$> readIORef resultState

void . ppBuild $ ("Typechecking the program" :: String)
typedAST <- runTypechecking preHLIR

handle typedAST $ \tlir -> do
ppBuild ("Compiling the program" :: String)
let mlir = eraseTypes tlir

closureConverted <- runClosureConversion mlir
Expand All @@ -77,12 +72,8 @@ buildProgram fp = do

writeFileLBS outputFile serialized

void . ppSuccess $ "Compiled successfully to " <> outputFile

buildProgramFromContent :: String -> IO ()
buildProgramFromContent content = do
void . ppBuild $ ("Parsing content" :: String)

let folder = "."
fileNameWithoutDir = "main"

Expand All @@ -97,12 +88,7 @@ buildProgramFromContent content = do

handle moduleResult . const $ do
preHLIR <- removeRequires <$> readIORef resultState

void . ppBuild $ ("Typechecking the program" :: String)
typedAST <- runTypechecking preHLIR

handle typedAST $ \_ -> do
ppSuccess ("Typechecked successfully" :: String)
void $ runTypechecking preHLIR


main :: IO ()
Expand Down

0 comments on commit 48c52c8

Please sign in to comment.