-- Initial imports.cabal generated by cabal init. For further -- documentation, see http://haskell.org/cabal/users-guide/ name: imports version: 0.1.0.0 synopsis: Generate code for importing directories automatically description: This module helps to automatically generate code for importing all the haskell files from directories. . = Synopsis . For inited project, we customize @Setup.hs@ file to generate the importing code. . * Be sure to modify the @build-type@ field in the @.cabal@ file from @Simple@ to @Custom@. . * Then modify the @main@ function in @Setup.hs@ to generate importing code by either header file or a module file. . Setup.hs: . > import Distribution.Simple > import System.Imports (writeImportsHeader, writeImportsModule) > > main = do > writeImportsHeader "imports.header" "Export" "Some.Where" "Some/Where" > -- or > writeImportsModule "ImportAll.hs" "ImportAll" "Some.Where" "Some/Where" > > defaultMain . Target.hs: (by header) . @ {\-\# LANGUAGE CPP \#\-} module Target where . #include "imports.header" . func = Export.funcFromSomeWhere @ . Target.hs: (by module) . @ module Target where . import qualified ImportAll . func = ImportAll.funcFromSomeWhere @ homepage: https://github.com/CindyLinz/Haskell-imports license: MIT license-file: LICENSE author: Cindy Wang (CindyLinz) maintainer: Cindy Wang (CindyLinz) copyright: Copyright (C) 2015 Cindy Wang (CindyLinz) category: Development build-type: Simple extra-source-files: test/Material/A.hs , test/Material/B/C/D.hs cabal-version: >=1.10 library exposed-modules: System.Imports -- other-modules: -- other-extensions: build-depends: base >=4.7 && <4.8 , directory ==1.2.* , filepath ==1.3.* , mtl ==2.2.* hs-source-dirs: src default-language: Haskell2010 test-suite test type: exitcode-stdio-1.0 build-depends: base >=4.7 && <4.8 , directory ==1.2.* , filepath ==1.3.* , mtl ==2.2.* hs-source-dirs: test , src main-is: Main.hs