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

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Please see the included README or visit https://github.com/bergmark/base-compat-migrate#readme.


[Skip to Readme]

Properties

Versions 0.1.0.0, 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.11.0 && <4.11.1), base-compat (>=0.10.1 && <0.10.2) [details]
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 2018-04-15T16:54:37Z

Modules

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


Readme for base-compat-migrate-0.1.0.0

[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:
  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.

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 running generate-library/Main.hs.