diff --git a/cblrepo.cabal b/cblrepo.cabal index 2d65f10..acbe588 100644 --- a/cblrepo.cabal +++ b/cblrepo.cabal @@ -24,7 +24,7 @@ executable cblrepo hs-source-dirs: src main-is: Main.hs other-modules: PkgDB Add BumpPkgs BuildPkgs Update Versions Upgrades ListPkgs PkgBuild OldPkgDB ConvertDB Remove Extract - Util.Translation Util.Cabal Util.HackageIndex Util.Misc Util.Dist + Util.Translation Util.Cabal Util.HackageIndex Util.Misc Util.Dist Util.Cfg build-depends: base ==4.8.*, filepath ==1.4.*, directory ==1.2.*, Cabal ==1.22.*, transformers ==0.4.*, bytestring ==0.10.*, tar ==0.4.*, zlib ==0.5.*, mtl ==2.2.*, diff --git a/src/Update.hs b/src/Update.hs index 35a37f7..bcf56d2 100644 --- a/src/Update.hs +++ b/src/Update.hs @@ -17,6 +17,7 @@ module Update where import Util.Misc +import Util.Cfg import Control.Monad.Reader import System.FilePath diff --git a/src/Util/Cfg.hs b/src/Util/Cfg.hs new file mode 100644 index 0000000..7111717 --- /dev/null +++ b/src/Util/Cfg.hs @@ -0,0 +1,21 @@ +{- + - Copyright 2015 Per Magnus Therning + - + - Licensed under the Apache License, Version 2.0 (the "License"); + - you may not use this file except in compliance with the License. + - You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + -} + +module Util.Cfg + where + +indexUrl = "http://hackage.fpcomplete.com/00-index.tar.gz" +indexFileName = "index.tar.gz" diff --git a/src/Util/HackageIndex.hs b/src/Util/HackageIndex.hs index de33972..420dd30 100644 --- a/src/Util/HackageIndex.hs +++ b/src/Util/HackageIndex.hs @@ -19,6 +19,7 @@ module Util.HackageIndex import Util.Misc import Util.Dist +import Util.Cfg import qualified Codec.Archive.Tar as Tar import qualified Codec.Compression.GZip as GZip diff --git a/src/Util/Misc.hs b/src/Util/Misc.hs index 620e9cf..6582354 100644 --- a/src/Util/Misc.hs +++ b/src/Util/Misc.hs @@ -59,9 +59,6 @@ ghcDefVersion = Version [7, 10, 1] [] ghcVersionDep :: Version -> Int -> String ghcVersionDep ghcVer ghcRel = "ghc=" ++ display ghcVer ++ "-" ++ show ghcRel -indexUrl = "http://hackage.fpcomplete.com/00-index.tar.gz" -indexFileName = "index.tar.gz" - -- {{{1 command line parser helpers readPkgNVersion :: ReadP (String, Version) readPkgNVersion = do