base-compat-migrate: Helps migrating projects to base-compat(-batteries).

[ bsd3, development, library ] [ Propose Tags ] [ Report a vulnerability ]

Temporarily replace your base & base-compat(-batteries) dependencies with base-compat-migrate to verify that you are using all available base-compat modules. Please see the included README or visit https://github.com/bergmark/base-compat-migrate#readme for more information.


[Skip to Readme]

Modules

[Last Documentation]

  • Control
    • Control.Applicative
    • Control.Arrow
    • Control.Category
    • Concurrent
      • Control.Concurrent.Chan
      • Control.Concurrent.Compat
      • MVar
        • Control.Concurrent.MVar.Compat
      • Control.Concurrent.QSem
      • Control.Concurrent.QSemN
    • Exception
      • Control.Exception.Base
      • Control.Exception.Compat
    • Monad
      • Control.Monad.Compat
      • Fail
        • Control.Monad.Fail.Compat
      • Control.Monad.Fix
      • IO
        • Class
          • Control.Monad.IO.Class.Compat
      • Control.Monad.Instances
      • Control.Monad.ST
        • Control.Monad.ST.Lazy
          • Control.Monad.ST.Lazy.Safe
          • Unsafe
            • Control.Monad.ST.Lazy.Unsafe.Compat
        • Control.Monad.ST.Safe
        • Control.Monad.ST.Strict
        • Unsafe
          • Control.Monad.ST.Unsafe.Compat
      • Control.Monad.Zip
  • Data
    • Bifoldable
      • Data.Bifoldable.Compat
    • Bifunctor
      • Data.Bifunctor.Compat
    • Bitraversable
      • Data.Bitraversable.Compat
    • Bits
      • Data.Bits.Compat
    • Bool
      • Data.Bool.Compat
    • Data.Char
    • Data.Coerce
    • Complex
      • Data.Complex.Compat
    • Data.Data
    • Data.Dynamic
    • Either
      • Data.Either.Compat
    • Data.Eq
    • Data.Fixed
    • Foldable
      • Data.Foldable.Compat
    • Function
      • Data.Function.Compat
    • Functor
      • Data.Functor.Classes
      • Data.Functor.Compat
      • Compose
        • Data.Functor.Compose.Compat
      • Const
        • Data.Functor.Const.Compat
      • Contravariant
        • Data.Functor.Contravariant.Compat
      • Identity
        • Data.Functor.Identity.Compat
      • Product
        • Data.Functor.Product.Compat
      • Sum
        • Data.Functor.Sum.Compat
    • IORef
      • Data.IORef.Compat
    • Data.Int
    • Data.Ix
    • Data.Kind
    • List
      • Data.List.Compat
      • NonEmpty
        • Data.List.NonEmpty.Compat
    • Data.Maybe
    • Monoid
      • Data.Monoid.Compat
    • Data.Ord
    • Proxy
      • Data.Proxy.Compat
    • Ratio
      • Data.Ratio.Compat
    • STRef
      • Data.STRef.Compat
      • Data.STRef.Lazy
      • Data.STRef.Strict
    • Semigroup
      • Data.Semigroup.Compat
    • String
      • Data.String.Compat
    • Data.Traversable
    • Data.Tuple
    • Type
      • Data.Type.Bool
      • Coercion
        • Data.Type.Coercion.Compat
      • Equality
        • Data.Type.Equality.Compat
    • Data.Typeable
    • Data.Unique
    • Version
      • Data.Version.Compat
    • Void
      • Data.Void.Compat
    • Word
      • Data.Word.Compat
  • Debug
    • Trace
      • Debug.Trace.Compat
  • Foreign
    • Foreign.C
      • Foreign.C.Error
      • Foreign.C.String
      • Foreign.C.Types
    • Foreign.Compat
    • Foreign.Concurrent
    • ForeignPtr
      • Foreign.ForeignPtr.Compat
      • Safe
        • Foreign.ForeignPtr.Safe.Compat
      • Unsafe
        • Foreign.ForeignPtr.Unsafe.Compat
    • Marshal
      • Alloc
        • Foreign.Marshal.Alloc.Compat
      • Array
        • Foreign.Marshal.Array.Compat
      • Foreign.Marshal.Compat
      • Foreign.Marshal.Error
      • Foreign.Marshal.Pool
      • Safe
        • Foreign.Marshal.Safe.Compat
      • Unsafe
        • Foreign.Marshal.Unsafe.Compat
      • Utils
        • Foreign.Marshal.Utils.Compat
    • Foreign.Ptr
    • Foreign.Safe
    • Foreign.StablePtr
    • Foreign.Storable
  • GHC
    • 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.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.MVar
    • GHC.Maybe
    • GHC.Natural
    • GHC.Num
    • GHC.OldList
    • GHC.OverloadedLabels
    • GHC.Pack
    • GHC.Profiling
    • GHC.Ptr
    • RTS
      • GHC.RTS.Flags
    • GHC.Read
    • GHC.Real
    • GHC.Records
    • GHC.ResponseFile
    • GHC.ST
    • GHC.STRef
    • GHC.Show
    • GHC.Stable
    • GHC.StableName
    • GHC.Stack
      • GHC.Stack.CCS
      • GHC.Stack.Types
    • GHC.StaticPtr
    • GHC.Stats
    • GHC.Storable
    • GHC.TopHandler
    • GHC.TypeLits
    • GHC.TypeNats
    • GHC.Unicode
    • GHC.Weak
    • GHC.Word
  • Numeric
    • Numeric.Compat
    • Natural
      • Numeric.Natural.Compat
  • Prelude
    • Prelude.Compat
  • System
    • System.CPUTime
    • Console
      • System.Console.GetOpt
    • Environment
      • System.Environment.Blank
      • System.Environment.Compat
    • Exit
      • System.Exit.Compat
    • System.IO
      • Error
        • System.IO.Error.Compat
      • Unsafe
        • System.IO.Unsafe.Compat
    • System.Info
    • System.Mem
      • System.Mem.StableName
      • System.Mem.Weak
    • Posix
      • System.Posix.Internals
      • System.Posix.Types
    • System.Timeout
  • Text
    • ParserCombinators
      • Text.ParserCombinators.ReadP
      • Text.ParserCombinators.ReadPrec
    • Text.Printf
    • Read
      • Text.Read.Compat
      • Text.Read.Lex
    • Text.Show
      • Text.Show.Functions
  • Type
    • Reflection
      • Type.Reflection.Compat
      • Type.Reflection.Unsafe
  • Unsafe
    • Unsafe.Coerce

Flags

Manual Flags

NameDescriptionDefault
exeDisabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.1.0, 0.2.0.0, 0.2.0.1
Change log CHANGELOG.md
Dependencies base (>=4.13.0 && <4.13.1), base-compat (>=0.11.1 && <0.11.2) [details]
Tested with ghc ==8.8.3
License BSD-3-Clause
Copyright (c) 2018 Adam Bergmark
Author Adam Bergmark
Maintainer adam@bergmark.nl
Category Development
Home page https://github.com/bergmark/base-compat-migrate#readme
Bug tracker https://github.com/bergmark/base-compat-migrate/issues
Source repo head: git clone https://github.com/bergmark/base-compat-migrate
Uploaded by AdamBergmark at 2020-03-25T16:43:23Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables base-compat-migrate-generate
Downloads 2343 total (19 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2020-03-25 [all 3 reports]

Readme for base-compat-migrate-0.2.0.1

[back to package description]

base-compat-migrate Hackage Build Status

This library is meant as a temporary migration library when moving a library to base-compat or upgrading it. Replace base-compat with base-compat-batteries in the rest of the README if you want to use that library instead.

base-compat defines backwards compatible versions of some base modules; If you for example want to make sure import Prelude does the same thing on all GHC versions you can instead import Prelude.Compat. If a Compat module exists it means it has some backwards compatibility fix, it also re-exports everything that is unchanged from the corresponding base module.

base-compat notably does not have Compat modules for every base module so you often need to depend on both base and base-compat. The standard recommended work-flow is to build your project with the oldest GHC you want to support and add Compat imports accordingly.

If you don't have quick access to old GHCs it can be error-prone to migrate to upgrade base-compat since you need to look through all base imports to see if you should be using Compat versions instead.

Workflow

This library offers a different work flow:

  1. Make sure you are using a GHC version compatible with this project (At the time of writing it is GHC 8.4.1)
  2. Replace any base and base-compat dependencies in your project with base-compat-migrate.
  3. Add default-extensions: NoImplicitPrelude to each build component (libraries, executables, test suites, benchmarks).
  4. Compile your project and fix issues:
  • Add any needed Prelude.Compat imports
  • If a base module can't be found change the import to the Compat version instead.
  1. Finally, replace the base-compat-migrate dependency with base and base-compat.

Whenever you wish to support newer versions of base or base-compat you can repeat these steps.

Common Issues with Solutions

  • If your package declares Paths modules it won't compile without access to base. You can drop the Paths module until the affected component builds, and then add it again along with the base dependency.

Dependencies

Since base-compat-migrate re-exports modules, we depend on minor versions of base and base-compat. A new minor version of either may require a new release of this library. This project's cabal file is generated by compiling this package with -fexe with cabal-install, or stack build with stack and then running the generated executable.