base-noprelude 4.7.0.2 → 4.13.0.0
raw patch · 2 files changed
Files
- Setup.hs +0/−79
- base-noprelude.cabal +241/−10
− Setup.hs
@@ -1,79 +0,0 @@-{-# 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
base-noprelude.cabal view
@@ -1,22 +1,27 @@+cabal-version: 2.2 name: base-noprelude-version: 4.7.0.2+version: 4.13.0.0+ synopsis: "base" package sans "Prelude" module homepage: https://github.com/hvr/base-noprelude bug-reports: https://github.com/hvr/base-noprelude/issues-license: BSD3+license: BSD-3-Clause license-file: LICENSE author: Herbert Valerio Riedel maintainer: hvr@gnu.org category: Development-build-type: Custom-cabal-version: >=1.10 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>+ to use @-XNoImplicitPrelude@ by re-exporting the full module-hierarchy of+ the [base-4.13.0.0](https://hackage.haskell.org/package/base-4.13.0.0) package /except/ for the "Prelude" module. .+ An usage example for such a "Prelude"-replacement is available with+ the [Prelude](http://hackage.haskell.org/package/Prelude) package.+ .+ 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 +29,234 @@ . 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.13.0.0 default-language: Haskell2010- default-extensions: PackageImports- exposed: False++ -- re-exported modules copied from base-4.13.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.Fail+ , Control.Monad.Fix+ , Control.Monad.Instances+ , Control.Monad.IO.Class+ , 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.Bifoldable+ , Data.Bifunctor+ , Data.Bitraversable+ , 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.Classes+ , Data.Functor.Contravariant+ , Data.Functor.Compose+ , Data.Functor.Const+ , Data.Functor.Identity+ , Data.Functor.Product+ , Data.Functor.Sum+ , Data.IORef+ , Data.Int+ , Data.Ix+ , Data.Kind+ , Data.List+ , Data.List.NonEmpty+ , Data.Maybe+ , Data.Monoid+ , Data.Ord+ , Data.Proxy+ , Data.Ratio+ , Data.Semigroup+ , 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.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.ByteOrder+ , GHC.Char+ , GHC.Clock+ , 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.Exception.Type+ , GHC.ExecutionStack+ , GHC.ExecutionStack.Internal+ , GHC.Exts+ , GHC.Fingerprint+ , GHC.Fingerprint.Type+ , GHC.Float+ , GHC.Float.ConversionUtils+ , GHC.Float.RealFracMethods+ , GHC.Foreign+ , GHC.ForeignPtr+ , GHC.GHCi+ , GHC.GHCi.Helpers+ , 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.Lock+ , GHC.IO.Handle.Text+ , GHC.IO.Handle.Types+ , GHC.IO.IOMode+ , GHC.IO.Unsafe+ , GHC.IOArray+ , GHC.IORef+ , GHC.Int+ , GHC.List+ , GHC.Maybe+ , GHC.MVar+ , GHC.Natural+ , GHC.Num+ , GHC.OldList+ , GHC.OverloadedLabels+ , GHC.Pack+ , GHC.Profiling+ , GHC.Ptr+ , GHC.Read+ , GHC.Real+ , GHC.Records+ , GHC.ResponseFile+ , GHC.RTS.Flags+ , GHC.ST+ , GHC.StaticPtr+ , GHC.STRef+ , GHC.Show+ , GHC.Stable+ , GHC.StableName+ , GHC.Stack+ , GHC.Stack.CCS+ , GHC.Stack.Types+ , GHC.Stats+ , GHC.Storable+ , GHC.TopHandler+ , GHC.TypeLits+ , GHC.TypeNats+ , GHC.Unicode+ , GHC.Weak+ , GHC.Word+ , Numeric+ , Numeric.Natural+-- , Prelude+ , System.CPUTime+ , System.Console.GetOpt+ , System.Environment+ , System.Environment.Blank+ , 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+ , Type.Reflection+ , Type.Reflection.Unsafe+ , 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