File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import Data.Text ( pack )
1313import GHC.Generics ( Generic )
1414import System.Console.GetOpt ( OptDescr (Option ), ArgDescr (.. ) )
1515import System.Directory ( createDirectoryIfMissing )
16- import System.FilePath ( (</>) )
16+ import System.FilePath ( (</>) , takeDirectory )
1717import Data.Text.Lazy.IO qualified as LText
1818
1919import Paths_agda2lambox ( version )
@@ -127,11 +127,11 @@ writeModule Options{..} menv IsMain m defs = do
127127 env <- runCompile (CompileEnv optNoBlocks) $ compile optTarget defs
128128 programs <- filterM hasPragma defs
129129
130- liftIO $ createDirectoryIfMissing True outDir
131-
132130 let fileName = (outDir </> ) . moduleNameToFileName m
133131 coqMod = CoqModule env (map qnameToKName programs)
134132
133+ liftIO $ createDirectoryIfMissing True $ takeDirectory $ fileName " "
134+
135135 liftIO do
136136 putStrLn $ " Writing " <> fileName " .txt"
137137 pp coqMod <> " \n " & writeFile (fileName " .txt" )
You can’t perform that action at this time.
0 commit comments