Skip to content

Commit

Permalink
Setup dir if input file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Nguyen committed Oct 4, 2024
1 parent 4abb4b0 commit 47f4c4b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,11 @@ main = do
choiceM = fromMaybe (pure ()) . asum

choiceM
[ input <&> \inF ->
[ input <&> \inF -> do
setupDirs [outDir, outTemp]
choiceM
[ output <&> compile debug inF outTemp outDir
, pure $ do
setupDirs [outDir, outTemp]
compileFile inF
, pure $ compileFile inF
]
, inDir <&> \d -> do
setupDirs [outDir, outTemp]
Expand Down

0 comments on commit 47f4c4b

Please sign in to comment.