diff --git a/headroom.cabal b/headroom.cabal index df263b8..e0fa0de 100644 --- a/headroom.cabal +++ b/headroom.cabal @@ -4,7 +4,7 @@ cabal-version: 2.2 -- -- see: https://github.com/sol/hpack -- --- hash: fad870155d9e943ea6729ce0b1fc7ab981a153d1052565d791a1ab6116685bd0 +-- hash: 15e44f0979eea1408d7d0b5e7cbb1a35ccd2d348ed4e9668f6f6edf6131efada name: headroom version: 0.4.2.0 @@ -170,7 +170,6 @@ library Headroom.FileSupport.Shell Headroom.FileSupport.TemplateData Headroom.FileSupport.Types - Headroom.FileSystem Headroom.FileType Headroom.FileType.Types Headroom.Header @@ -179,6 +178,7 @@ library Headroom.HeaderFn Headroom.HeaderFn.Types Headroom.HeaderFn.UpdateCopyright + Headroom.IO.FileSystem Headroom.Meta Headroom.Meta.Version Headroom.SourceCode @@ -277,13 +277,13 @@ test-suite spec Headroom.FileSupport.ScalaSpec Headroom.FileSupport.ShellSpec Headroom.FileSupportSpec - Headroom.FileSystemSpec Headroom.FileTypeSpec Headroom.Header.SanitizeSpec Headroom.HeaderFn.TypesSpec Headroom.HeaderFn.UpdateCopyrightSpec Headroom.HeaderFnSpec Headroom.HeaderSpec + Headroom.IO.FileSystemSpec Headroom.Meta.VersionSpec Headroom.SourceCodeSpec Headroom.Template.MustacheSpec diff --git a/src/Headroom/Command/Init.hs b/src/Headroom/Command/Init.hs index a124f6b..d626de1 100644 --- a/src/Headroom/Command/Init.hs +++ b/src/Headroom/Command/Init.hs @@ -54,13 +54,13 @@ import Headroom.Embedded ( configFileStub , defaultConfig , licenseTemplate ) -import Headroom.FileSystem ( FileSystem(..) +import Headroom.FileType ( fileTypeByExt ) +import Headroom.FileType.Types ( FileType(..) ) +import Headroom.IO.FileSystem ( FileSystem(..) , fileExtension , findFiles , mkFileSystem ) -import Headroom.FileType ( fileTypeByExt ) -import Headroom.FileType.Types ( FileType(..) ) import Headroom.Meta ( TemplateType , buildVersion , configFileName diff --git a/src/Headroom/Command/Run.hs b/src/Headroom/Command/Run.hs index 6b86793..4ecd9d9 100644 --- a/src/Headroom/Command/Run.hs +++ b/src/Headroom/Command/Run.hs @@ -66,11 +66,6 @@ import Headroom.Embedded ( defaultConfig import Headroom.FileSupport ( analyzeSourceCode , fileSupport ) -import Headroom.FileSystem ( FileSystem(..) - , excludePaths - , fileExtension - , mkFileSystem - ) import Headroom.FileType ( fileTypeByExt ) import Headroom.FileType.Types ( FileType(..) ) import Headroom.Header ( addHeader @@ -86,6 +81,11 @@ import Headroom.Header.Types ( HeaderInfo(..) import Headroom.HeaderFn ( mkConfiguredEnv , postProcessHeader ) +import Headroom.IO.FileSystem ( FileSystem(..) + , excludePaths + , fileExtension + , mkFileSystem + ) import Headroom.Meta ( TemplateType , configFileName , productInfo diff --git a/src/Headroom/FileSystem.hs b/src/Headroom/IO/FileSystem.hs similarity index 99% rename from src/Headroom/FileSystem.hs rename to src/Headroom/IO/FileSystem.hs index 15d89e3..205513e 100644 --- a/src/Headroom/FileSystem.hs +++ b/src/Headroom/IO/FileSystem.hs @@ -2,7 +2,7 @@ {-# LANGUAGE ViewPatterns #-} {-| -Module : Headroom.FileSystem +Module : Headroom.IO.FileSystem Description : Operations related to files and file system Copyright : (c) 2019-2021 Vaclav Svejcar License : BSD-3-Clause @@ -14,7 +14,7 @@ Module providing functions for working with the local file system, its file and directories. -} -module Headroom.FileSystem +module Headroom.IO.FileSystem ( -- * Type Aliases CreateDirectoryFn , DoesFileExistFn diff --git a/test/Headroom/Command/InitSpec.hs b/test/Headroom/Command/InitSpec.hs index e0b92ae..eea0836 100644 --- a/test/Headroom/Command/InitSpec.hs +++ b/test/Headroom/Command/InitSpec.hs @@ -17,8 +17,8 @@ import Headroom.Data.Has ( Has(..) ) import Headroom.Data.Lens ( suffixLenses , suffixLensesFor ) -import Headroom.FileSystem ( FileSystem(..) ) import Headroom.FileType.Types ( FileType(..) ) +import Headroom.IO.FileSystem ( FileSystem(..) ) import RIO import RIO.FilePath ( () ) import qualified RIO.List as L diff --git a/test/Headroom/Command/RunSpec.hs b/test/Headroom/Command/RunSpec.hs index e76b092..36c0531 100644 --- a/test/Headroom/Command/RunSpec.hs +++ b/test/Headroom/Command/RunSpec.hs @@ -30,8 +30,8 @@ import Headroom.Data.Lens ( suffixLenses ) import Headroom.Data.Regex ( re ) import Headroom.Data.Text ( fromLines ) -import Headroom.FileSystem ( FileSystem(..) ) import Headroom.FileType.Types ( FileType(..) ) +import Headroom.IO.FileSystem ( FileSystem(..) ) import Headroom.Meta ( TemplateType ) import Headroom.Template ( Template(..) ) import Headroom.Types ( CurrentYear(..) ) diff --git a/test/Headroom/FileSupport/Haskell/HaddockSpec.hs b/test/Headroom/FileSupport/Haskell/HaddockSpec.hs index f9a2a9d..2aa3f86 100644 --- a/test/Headroom/FileSupport/Haskell/HaddockSpec.hs +++ b/test/Headroom/FileSupport/Haskell/HaddockSpec.hs @@ -21,8 +21,8 @@ import Headroom.FileSupport.Haskell.Haddock import Headroom.FileSupport.TemplateData ( HaddockOffsets(..) , TemplateData(..) ) -import Headroom.FileSystem ( loadFile ) import Headroom.FileType.Types ( FileType(..) ) +import Headroom.IO.FileSystem ( loadFile ) import Headroom.Template ( Template(..) ) import Headroom.Template.Mustache ( Mustache(..) ) import RIO diff --git a/test/Headroom/FileSupport/HaskellSpec.hs b/test/Headroom/FileSupport/HaskellSpec.hs index 722f367..25bd068 100644 --- a/test/Headroom/FileSupport/HaskellSpec.hs +++ b/test/Headroom/FileSupport/HaskellSpec.hs @@ -31,9 +31,9 @@ import Headroom.FileSupport.TemplateData ( HaddockOffsets(..) import Headroom.FileSupport.Types ( FileSupport(..) , SyntaxAnalysis(..) ) -import Headroom.FileSystem ( loadFile ) import Headroom.FileType.Types ( FileType(..) ) import Headroom.Header ( extractHeaderTemplate ) +import Headroom.IO.FileSystem ( loadFile ) import Headroom.Template ( Template(..) , emptyTemplate ) diff --git a/test/Headroom/FileSupport/JavaSpec.hs b/test/Headroom/FileSupport/JavaSpec.hs index 3a5cdf6..75db9d0 100644 --- a/test/Headroom/FileSupport/JavaSpec.hs +++ b/test/Headroom/FileSupport/JavaSpec.hs @@ -20,9 +20,9 @@ import Headroom.FileSupport.TemplateData ( TemplateData(..) ) import Headroom.FileSupport.Types ( FileSupport(..) , SyntaxAnalysis(..) ) -import Headroom.FileSystem ( loadFile ) import Headroom.FileType.Types ( FileType(..) ) import Headroom.Header ( extractHeaderTemplate ) +import Headroom.IO.FileSystem ( loadFile ) import Headroom.Template ( emptyTemplate ) import Headroom.Template.Mustache ( Mustache ) import Headroom.Variables ( mkVariables ) diff --git a/test/Headroom/FileSupport/PureScriptSpec.hs b/test/Headroom/FileSupport/PureScriptSpec.hs index 9ca569e..cb72cc0 100644 --- a/test/Headroom/FileSupport/PureScriptSpec.hs +++ b/test/Headroom/FileSupport/PureScriptSpec.hs @@ -20,9 +20,9 @@ import Headroom.FileSupport.TemplateData ( TemplateData(..) ) import Headroom.FileSupport.Types ( FileSupport(..) , SyntaxAnalysis(..) ) -import Headroom.FileSystem ( loadFile ) import Headroom.FileType.Types ( FileType(..) ) import Headroom.Header ( extractHeaderTemplate ) +import Headroom.IO.FileSystem ( loadFile ) import Headroom.Template ( emptyTemplate ) import Headroom.Template.Mustache ( Mustache ) import Headroom.Variables ( mkVariables ) diff --git a/test/Headroom/FileSupportSpec.hs b/test/Headroom/FileSupportSpec.hs index 2e8524f..05dc7e9 100644 --- a/test/Headroom/FileSupportSpec.hs +++ b/test/Headroom/FileSupportSpec.hs @@ -7,8 +7,8 @@ module Headroom.FileSupportSpec where import Headroom.FileSupport -import Headroom.FileSystem ( loadFile ) import Headroom.FileType.Types ( FileType(..) ) +import Headroom.IO.FileSystem ( loadFile ) import Headroom.SourceCode ( LineType(..) , SourceCode(..) ) diff --git a/test/Headroom/HeaderSpec.hs b/test/Headroom/HeaderSpec.hs index 260a4aa..4bf8ad1 100644 --- a/test/Headroom/HeaderSpec.hs +++ b/test/Headroom/HeaderSpec.hs @@ -23,10 +23,10 @@ import Headroom.Embedded ( defaultConfig ) import Headroom.FileSupport ( analyzeSourceCode , fileSupport ) -import Headroom.FileSystem ( loadFile ) import Headroom.FileType.Types ( FileType(..) ) import Headroom.Header import Headroom.Header.Types ( HeaderInfo(..) ) +import Headroom.IO.FileSystem ( loadFile ) import Headroom.SourceCode ( LineType(..) , SourceCode(..) ) diff --git a/test/Headroom/FileSystemSpec.hs b/test/Headroom/IO/FileSystemSpec.hs similarity index 97% rename from test/Headroom/FileSystemSpec.hs rename to test/Headroom/IO/FileSystemSpec.hs index 1f3a48d..a51b8ec 100644 --- a/test/Headroom/FileSystemSpec.hs +++ b/test/Headroom/IO/FileSystemSpec.hs @@ -2,13 +2,13 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} -module Headroom.FileSystemSpec +module Headroom.IO.FileSystemSpec ( spec ) where import Headroom.Data.Regex ( re ) -import Headroom.FileSystem +import Headroom.IO.FileSystem import RIO import RIO.FilePath ( () ) import RIO.List ( sort )