packages feed

base-noprelude 4.7.0.2 → 4.8.0.0

raw patch · 2 files changed

+215/−86 lines, 2 filesdep ~basesetup-changed

Dependency ranges changed: base

Files

Setup.hs view
@@ -1,79 +1,2 @@-{-# LANGUAGE RecordWildCards #-}--import Data.List (isPrefixOf)-import           Control.Monad-import           Data.Maybe-import qualified Distribution.InstalledPackageInfo  as IPI-import qualified Distribution.ModuleName            as MN-import           Distribution.PackageDescription    as PD-import           Distribution.Simple-import           Distribution.Simple.BuildPaths-import           Distribution.Simple.LocalBuildInfo-import qualified Distribution.Simple.PackageIndex   as PI-import           Distribution.Simple.Setup-import           Distribution.Simple.Utils          (createDirectoryIfMissingVerbose, die,-                                                     info, notice, warn, rewriteFile, cabalVersion)-import           Distribution.Text                  (display)-import           System.FilePath                    (takeDirectory, (<.>),-                                                   (</>))-import           Data.Version--main :: IO ()-main = defaultMainWithHooks-         simpleUserHooks { confHook = confHook',  buildHook = buildHook' }--confHook' :: (GenericPackageDescription, HookedBuildInfo) -> ConfigFlags -> IO LocalBuildInfo-confHook' gpd_hbi cflags = do-    unless (versionBranch cabalVersion < [1,21]) $-        die ("base-noprelude cannot be built with Cabal versions newer than 1.20 (`Setup.hs` imported Cabal library version " ++ showVersion cabalVersion ++ ")")--    lbi <- confHook simpleUserHooks gpd_hbi cflags--    let pkgver = pkgVersion . PD.package . localPkgDescr $ lbi--    let (baseVer,baseMods0) = case PI.lookupPackageName (installedPkgs lbi) (PackageName "base") of-                     [(ver', [IPI.InstalledPackageInfo {..}])] -> (ver',map stringlyCoerce exposedModules)--        -- filter out Prelude module from `base`'s exposed module list-        baseMods = filter (/= MN.fromString "Prelude") baseMods0--    unless (versionBranch baseVer `isPrefixOf` versionBranch pkgver) $-        die ("version doesn't match base package version" ++ show (pkgver,baseVer))--    return $! (mapLocalPkgDescr . mapLibrary . fmap . mapExposedModules) (const baseMods) lbi-  where-    -- needed to make compile w/ Cabal >= 1.22-    stringlyCoerce = MN.fromString . display--    -- pseudo-functors-    mapLocalPkgDescr  f lbi = lbi { localPkgDescr  = f (localPkgDescr lbi) }-    mapLibrary        f pd  = pd  { library        = f (library       pd)  }-    mapExposedModules f l   = l   { exposedModules = f (exposedModules l)  }--    verbosity = fromFlag $ configVerbosity cflags---- buildHook' :: PackageDescription -> LocalBuildInfo -> UserHooks -> BuildFlags -> IO ()-buildHook' pd lbi uh bflags = do-    notice verbosity "creating wrapper modules..."--    forM_ baseMods $ \m -> do-        info verbosity ("generating wrapper module for " ++ display m)-        createDirectoryIfMissingVerbose verbosity True (takeDirectory $ apath m)-        rewriteFile (apath m) (genWrapper m)--    buildHook simpleUserHooks pd lbi uh bflags-  where-    genWrapper mn = unlines-                    [ "module " ++ display mn ++ "(module M) where"-                    , "import \"base\" " ++ display mn ++ " as M"-                    ]--    apath mn = autogenModulesDir lbi </> MN.toFilePath mn <.> "hs"--    baseMods = (exposedModules . fromJust . library) pd-    verbosity = fromFlag $ buildVerbosity bflags---- postBuild' :: Args -> BuildFlags -> PackageDescription -> LocalBuildInfo -> IO ()-postBuild' args bflags pd lbi = do-    putStrLn "postBuild"-    postBuild simpleUserHooks args bflags pd lbi+import Distribution.Simple+main = defaultMain
base-noprelude.cabal view
@@ -1,5 +1,5 @@ name:                base-noprelude-version:             4.7.0.2+version:             4.8.0.0 synopsis:            "base" package sans "Prelude" module homepage:            https://github.com/hvr/base-noprelude bug-reports:         https://github.com/hvr/base-noprelude/issues@@ -8,15 +8,18 @@ author:              Herbert Valerio Riedel maintainer:          hvr@gnu.org category:            Development-build-type:          Custom-cabal-version:       >=1.10+build-type:          Simple+cabal-version:       >=1.22 description:     This package simplifies defining custom "Prelude"s without having     to use @-XNoImplicitPrelude@ by re-exporting the full     module-hierarchy of the-    <http://hackage.haskell.org/package/base-4.7.0.2 base-4.7.0.2>+    <http://hackage.haskell.org/package/base-4.8.0.0 base-4.8.0.0>     package /except/ for the "Prelude" module.     .+    Starting with GHC 7.10 & Cabal-1.22 this package makes use of the+    package-level @reexported-modules@ feature.+    .     Each version of @base-noprelude@ depends on a specific     @base@-version and thus mirrors @base@'s     versioning (with the exception that @base-noprelude@ needs to add an@@ -24,8 +27,211 @@     .     See <https://github.com/hvr/base-noprelude> for more information. +source-repository head+    type:     git+    location: https://github.com/hvr/base-noprelude.git+ library-    build-depends:       base ==4.7.0.2+    build-depends:       base ==4.8.0.0     default-language:    Haskell2010-    default-extensions:  PackageImports-    exposed:             False++    -- not really needed since reexported-modules wouldn't clash with+    -- base's modules, but kept nevertheless for consistency with+    -- pre-GHC-7.10 versions of base-noprelude which were non-exposed+    -- as well+    exposed: False++    -- re-exported modules copied from base-4.8.0.0's exposed-modules+    reexported-modules:+        Control.Applicative,+        Control.Arrow,+        Control.Category,+        Control.Concurrent,+        Control.Concurrent.Chan,+        Control.Concurrent.MVar,+        Control.Concurrent.QSem,+        Control.Concurrent.QSemN,+        Control.Exception,+        Control.Exception.Base,+        Control.Monad,+        Control.Monad.Fix,+        Control.Monad.Instances,+        Control.Monad.ST,+        Control.Monad.ST.Lazy,+        Control.Monad.ST.Lazy.Safe,+        Control.Monad.ST.Lazy.Unsafe,+        Control.Monad.ST.Safe,+        Control.Monad.ST.Strict,+        Control.Monad.ST.Unsafe,+        Control.Monad.Zip,+        Data.Bifunctor,+        Data.Bits,+        Data.Bool,+        Data.Char,+        Data.Coerce,+        Data.Complex,+        Data.Data,+        Data.Dynamic,+        Data.Either,+        Data.Eq,+        Data.Fixed,+        Data.Foldable,+        Data.Function,+        Data.Functor,+        Data.Functor.Identity,+        Data.IORef,+        Data.Int,+        Data.Ix,+        Data.List,+        Data.Maybe,+        Data.Monoid,+        Data.Ord,+        Data.Proxy,+        Data.Ratio,+        Data.STRef,+        Data.STRef.Lazy,+        Data.STRef.Strict,+        Data.String,+        Data.Traversable,+        Data.Tuple,+        Data.Type.Bool,+        Data.Type.Coercion,+        Data.Type.Equality,+        Data.Typeable,+        Data.Typeable.Internal,+        Data.Unique,+        Data.Version,+        Data.Void,+        Data.Word,+        Debug.Trace,+        Foreign,+        Foreign.C,+        Foreign.C.Error,+        Foreign.C.String,+        Foreign.C.Types,+        Foreign.Concurrent,+        Foreign.ForeignPtr,+        Foreign.ForeignPtr.Safe,+        Foreign.ForeignPtr.Unsafe,+        Foreign.Marshal,+        Foreign.Marshal.Alloc,+        Foreign.Marshal.Array,+        Foreign.Marshal.Error,+        Foreign.Marshal.Pool,+        Foreign.Marshal.Safe,+        Foreign.Marshal.Unsafe,+        Foreign.Marshal.Utils,+        Foreign.Ptr,+        Foreign.Safe,+        Foreign.StablePtr,+        Foreign.Storable,+        GHC.Arr,+        GHC.Base,+        GHC.Char,+        GHC.Conc,+        GHC.Conc.IO,+        GHC.Conc.Signal,+        GHC.Conc.Sync,+        GHC.ConsoleHandler,+        GHC.Constants,+        GHC.Desugar,+        GHC.Enum,+        GHC.Environment,+        GHC.Err,+        GHC.Exception,+        GHC.Exts,+        GHC.Fingerprint,+        GHC.Fingerprint.Type,+        GHC.Float,+        GHC.Float.ConversionUtils,+        GHC.Float.RealFracMethods,+        GHC.Foreign,+        GHC.ForeignPtr,+        GHC.GHCi,+        GHC.Generics,+        GHC.IO,+        GHC.IO.Buffer,+        GHC.IO.BufferedIO,+        GHC.IO.Device,+        GHC.IO.Encoding,+        GHC.IO.Encoding.CodePage,+        GHC.IO.Encoding.Failure,+        GHC.IO.Encoding.Iconv,+        GHC.IO.Encoding.Latin1,+        GHC.IO.Encoding.Types,+        GHC.IO.Encoding.UTF16,+        GHC.IO.Encoding.UTF32,+        GHC.IO.Encoding.UTF8,+        GHC.IO.Exception,+        GHC.IO.FD,+        GHC.IO.Handle,+        GHC.IO.Handle.FD,+        GHC.IO.Handle.Internals,+        GHC.IO.Handle.Text,+        GHC.IO.Handle.Types,+        GHC.IO.IOMode,+        GHC.IOArray,+        GHC.IORef,+        GHC.IP,+        GHC.Int,+        GHC.List,+        GHC.MVar,+        GHC.Natural,+        GHC.Num,+        GHC.OldList,+        GHC.PArr,+        GHC.Pack,+        GHC.Profiling,+        GHC.Ptr,+        GHC.Read,+        GHC.Real,+        GHC.RTS.Flags,+        GHC.ST,+        GHC.StaticPtr,+        GHC.STRef,+        GHC.Show,+        GHC.Stable,+        GHC.Stack,+        GHC.Stats,+        GHC.Storable,+        GHC.TopHandler,+        GHC.TypeLits,+        GHC.Unicode,+        GHC.Weak,+        GHC.Word,+        Numeric,+        Numeric.Natural,+        -- Prelude,+        System.CPUTime,+        System.Console.GetOpt,+        System.Environment,+        System.Exit,+        System.IO,+        System.IO.Error,+        System.IO.Unsafe,+        System.Info,+        System.Mem,+        System.Mem.StableName,+        System.Mem.Weak,+        System.Posix.Internals,+        System.Posix.Types,+        System.Timeout,+        Text.ParserCombinators.ReadP,+        Text.ParserCombinators.ReadPrec,+        Text.Printf,+        Text.Read,+        Text.Read.Lex,+        Text.Show,+        Text.Show.Functions,+        Unsafe.Coerce++    -- OS Specific+    if os(windows)+        reexported-modules:+            GHC.IO.Encoding.CodePage.API,+            GHC.IO.Encoding.CodePage.Table,+            GHC.Conc.Windows,+            GHC.Windows+    else+        reexported-modules:+            GHC.Event