From e9adab129b90ee593672f61ee523b4723617d6e5 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Sun, 10 Feb 2019 21:10:04 +0200 Subject: [PATCH] Rename modules --- Main.hs | 2 - cli/Main.hs | 2 + haskell-ci.cabal | 127 +++++++++++++------------ src/{MakeTravisYml.hs => HaskellCI.hs} | 6 +- src/{ => HaskellCI}/Config.hs | 2 +- src/{ => HaskellCI}/Glob.hs | 2 +- test/Tests.hs | 2 +- 7 files changed, 74 insertions(+), 69 deletions(-) delete mode 100644 Main.hs create mode 100644 cli/Main.hs rename src/{MakeTravisYml.hs => HaskellCI.hs} (99%) rename src/{ => HaskellCI}/Config.hs (98%) rename src/{ => HaskellCI}/Glob.hs (99%) diff --git a/Main.hs b/Main.hs deleted file mode 100644 index b2d0fb3b..00000000 --- a/Main.hs +++ /dev/null @@ -1,2 +0,0 @@ -module Main (main) where -import MakeTravisYml (main) diff --git a/cli/Main.hs b/cli/Main.hs new file mode 100644 index 00000000..b5e93fca --- /dev/null +++ b/cli/Main.hs @@ -0,0 +1,2 @@ +module Main (main) where +import HaskellCI (main) diff --git a/haskell-ci.cabal b/haskell-ci.cabal index ce21dbcd..538fa0ae 100644 --- a/haskell-ci.cabal +++ b/haskell-ci.cabal @@ -1,8 +1,7 @@ -cabal-version: 2.2 -name: haskell-ci -version: 0.1.0.0 - -synopsis: Cabal package script generator for Travis-CI +cabal-version: 2.2 +name: haskell-ci +version: 0.1.0.0 +synopsis: Cabal package script generator for Travis-CI description: Script generator (@make-travis-yml@) for [Travis-CI](https://travis-ci.org/) for continuous-integration testing of Haskell Cabal packages. . @@ -22,20 +21,15 @@ description: . See @make-travis-yml --help@ for more information. - -homepage: http://haskell-ci.rtfd.org/ -bug-reports: https://github.com/haskell-CI/haskell-ci/issues -license: BSD-3-Clause -license-file: LICENSE -author: Herbert Valerio Riedel, Oleg Grenrus -maintainer: hvr@gnu.org -category: Development -build-type: Simple -tested-with: - GHC == 8.0.2, - GHC == 8.2.2, - GHC == 8.4.4, - GHC == 8.6.3 +homepage: http://haskell-ci.rtfd.org/ +bug-reports: https://github.com/haskell-CI/haskell-ci/issues +license: BSD-3-Clause +license-file: LICENSE +author: Herbert Valerio Riedel, Oleg Grenrus +maintainer: hvr@gnu.org +category: Development +build-type: Simple +tested-with: GHC ==8.6.3 || ==8.4.4 || ==8.2.2 || ==8.0.2 extra-source-files: fixtures/cabal.haskell-ci fixtures/haskell-ci.cabal @@ -58,65 +52,76 @@ extra-source-files: fixtures/servant/*.cabal source-repository head - type: git + type: git location: https://github.com/haskell-CI/haskell-ci.git flag ShellCheck default: True - manual: True + manual: True library exposed-modules: - MakeTravisYml - Config - Glob + HaskellCI + HaskellCI.Config + HaskellCI.Glob + ghc-options: - -Wall - -Wcompat - -Wnoncanonical-monad-instances + -Wall -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances - hs-source-dirs: src - other-extensions: CPP, ViewPatterns, NamedFieldPuns, OverloadedLabels + + hs-source-dirs: src + other-extensions: + CPP + NamedFieldPuns + OverloadedLabels + ViewPatterns + build-depends: - , base >= 4.7 && < 4.13 - , Cabal ^>= 2.4 - , containers >= 0.4 && < 0.7 - , directory >= 1.1 && < 1.4 - , filepath >= 1.2 && < 1.5 - , transformers >= 0.3 && < 0.6 - , deepseq >= 1.3 && < 1.5 + , base >=4.7 && <4.13 + , Cabal ^>=2.4 + , containers >=0.4 && <0.7 + , deepseq >=1.3 && <1.5 + , directory >=1.1 && <1.4 + , filepath >=1.2 && <1.5 + , transformers >=0.3 && <0.6 -- other dependencies build-depends: - , generic-lens ^>=1.1.0.0 - , microlens ^>=0.4.10 - default-language: Haskell2010 + , generic-lens ^>=1.1.0.0 + , microlens ^>=0.4.10 + + default-language: Haskell2010 -- ShellCheck. Would need newer transformers for older GHC - if flag(ShellCheck) && impl(ghc >= 7.10 && <8.7) - build-depends: ShellCheck == 0.6.0 + if (flag(shellcheck) && impl(ghc >=7.10 && <8.7)) + build-depends: ShellCheck ==0.6.0 executable haskell-ci - main-is: Main.hs - ghc-options: -Wall - build-depends: base, haskell-ci - default-language: Haskell2010 + main-is: Main.hs + ghc-options: -Wall + hs-source-dirs: cli + build-depends: + , base + , haskell-ci + + default-language: Haskell2010 test-suite golden - type: exitcode-stdio-1.0 - main-is: Tests.hs - hs-source-dirs: test - build-depends: haskell-ci - -- inherited constraints via lib:haskell-ci - , base - , bytestring - , directory - , filepath - , transformers - -- dependencies needing explicit constraints - , tasty >= 1.0 && < 1.2 - , tasty-golden >= 2.3.1.1 && < 2.4 - , ansi-terminal >= 0.8.0.2 && <0.9 - , Diff >= 0.3.4 && < 0.4 + type: exitcode-stdio-1.0 + main-is: Tests.hs + hs-source-dirs: test + build-depends: + , ansi-terminal ^>=0.8.0.2 + , base + , bytestring + , Diff ^>=0.3.4 + , directory + , filepath + , haskell-ci + , tasty >=1.0 && <1.2 + , tasty-golden ^>=2.3.1.1 + , transformers - default-language: Haskell2010 + -- inherited constraints via lib:haskell-ci + -- dependencies needing explicit constraints + default-language: Haskell2010 diff --git a/src/MakeTravisYml.hs b/src/HaskellCI.hs similarity index 99% rename from src/MakeTravisYml.hs rename to src/HaskellCI.hs index c45ba2cf..0273a88d 100644 --- a/src/MakeTravisYml.hs +++ b/src/HaskellCI.hs @@ -21,7 +21,7 @@ -- -- NB: This code deliberately avoids relying on non-standard packages and -- is expected to compile/work with at least GHC 7.0 through GHC 8.0 -module MakeTravisYml ( +module HaskellCI ( main, -- * for tests Result (..), @@ -97,8 +97,8 @@ import Data.Monoid ((<>)) import Lens.Micro import Data.Generics.Labels () -- IsLabel (->) ... -import Config -import Glob +import HaskellCI.Config +import HaskellCI.Glob #if !(MIN_VERSION_Cabal(2,0,0)) -- compat helpers for pre-2.0 diff --git a/src/Config.hs b/src/HaskellCI/Config.hs similarity index 98% rename from src/Config.hs rename to src/HaskellCI/Config.hs index 37dfe93e..ced1ce61 100644 --- a/src/Config.hs +++ b/src/HaskellCI/Config.hs @@ -1,5 +1,5 @@ {-# LANGUAGE DeriveGeneric #-} -module Config where +module HaskellCI.Config where import Distribution.Version import GHC.Generics (Generic) diff --git a/src/Glob.hs b/src/HaskellCI/Glob.hs similarity index 99% rename from src/Glob.hs rename to src/HaskellCI/Glob.hs index 92d92e96..f5ce511a 100644 --- a/src/Glob.hs +++ b/src/HaskellCI/Glob.hs @@ -1,4 +1,4 @@ -module Glob where +module HaskellCI.Glob where import Control.Applicative as App ((<$>)) import Control.Monad (void, filterM, liftM2) diff --git a/test/Tests.hs b/test/Tests.hs index 2cdf674a..798f4ba6 100644 --- a/test/Tests.hs +++ b/test/Tests.hs @@ -1,7 +1,7 @@ {-# LANGUAGE ViewPatterns #-} module Main (main) where -import MakeTravisYml hiding (main) +import HaskellCI hiding (main) import Control.Applicative ((<$>), (<*>)) import Control.Exception (ErrorCall(..), throwIO, try)