From: Christiaan Baaij Date: Sun, 2 Aug 2009 19:07:46 +0000 (+0200) Subject: Use createDirectoryIfMissing to create the vhdl directory, as it can create the paren... X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=e0e788e2f29dd85895c511e294718d440a42061d;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Use createDirectoryIfMissing to create the vhdl directory, as it can create the parent directories too --- diff --git "a/c\316\273ash/CLasH/Translator.hs" "b/c\316\273ash/CLasH/Translator.hs" index 7ea489f..8f2c7dc 100644 --- "a/c\316\273ash/CLasH/Translator.hs" +++ "b/c\316\273ash/CLasH/Translator.hs" @@ -4,7 +4,7 @@ module CLasH.Translator ) where -- Standard Modules -import qualified Directory +import qualified System.Directory as Directory import qualified Maybe import qualified Monad import qualified System.FilePath as FilePath @@ -114,8 +114,7 @@ moduleToVHDL env cores top init test stateful = do prepareDir :: String -> IO() prepareDir dir = do -- Create the dir if needed - exists <- Directory.doesDirectoryExist dir - Monad.unless exists $ Directory.createDirectory dir + Directory.createDirectoryIfMissing True dir -- Find all .vhdl files in the directory files <- Directory.getDirectoryContents dir let to_remove = filter ((==".vhdl") . FilePath.takeExtension) files diff --git "a/c\316\273ash/clash.cabal" "b/c\316\273ash/clash.cabal" index fb44457..459be31 100644 --- "a/c\316\273ash/clash.cabal" +++ "b/c\316\273ash/clash.cabal" @@ -20,7 +20,7 @@ Library build-depends: ghc >= 6.11, pretty, vhdl > 0.1, haskell98, syb, data-accessor, containers, base >= 4, transformers, filepath, template-haskell, data-accessor-template, - prettyclass + prettyclass, directory exposed-modules: CLasH.Translator CLasH.Translator.Annotations