From: Neil Smith Date: Tue, 6 Dec 2022 12:40:28 +0000 (+0000) Subject: Renamed library directory X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=ccb75bb3dde53e9fc513515160ccd38a5c3492c6;p=advent-of-code-22.git Renamed library directory --- diff --git a/advent-of-code22.cabal b/advent-of-code22.cabal index 747359d..c7012e9 100644 --- a/advent-of-code22.cabal +++ b/advent-of-code22.cabal @@ -73,7 +73,7 @@ common common-extensions common build-directives build-depends: base >=4.16 default-language: Haskell2010 - hs-source-dirs: ., app, lib + hs-source-dirs: ., app, src other-modules: AoC ghc-options: -O2 -Wall @@ -89,13 +89,13 @@ executable advent-of-code22 -- LANGUAGE extensions used by modules in this package. -- other-extensions: build-depends: base ^>=4.16.4.0 - hs-source-dirs: app, lib + hs-source-dirs: app, src default-language: Haskell2010 library import: common-extensions build-depends: base >=4.16 - hs-source-dirs: ., app, lib + hs-source-dirs: ., app, src exposed-modules: AoC executable advent01 diff --git a/lib/AoC.hs b/lib/AoC.hs deleted file mode 100644 index 764f2cc..0000000 --- a/lib/AoC.hs +++ /dev/null @@ -1,13 +0,0 @@ -module AoC ( getDataFileName ) where - -import System.Environment - -getDataFileName :: IO String -getDataFileName = - do args <- getArgs - progName <- getProgName - let baseDataName = if null args - then progName - else head args - let dataFileName = "data/" ++ baseDataName ++ ".txt" - return dataFileName diff --git a/src/AoC.hs b/src/AoC.hs new file mode 100644 index 0000000..764f2cc --- /dev/null +++ b/src/AoC.hs @@ -0,0 +1,13 @@ +module AoC ( getDataFileName ) where + +import System.Environment + +getDataFileName :: IO String +getDataFileName = + do args <- getArgs + progName <- getProgName + let baseDataName = if null args + then progName + else head args + let dataFileName = "data/" ++ baseDataName ++ ".txt" + return dataFileName