Skip to content
Snippets Groups Projects
Commit 4c730f58 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

Introduce `Distribution.Compat.Prelude.Internal` + WARNING

This unexposes `Distribution.Compat.Prelude` again, and adds
an exposed `.Internal` module which reexports the `.Prelude` module with
an attached module-level `WARNING` pragma.

This way users are discouraged to use this in `Setup.hs` files as they'd
see compile warning like:

    Foo.hs:19:1-55: warning: [-Wdeprecations]
      Module ‘Distribution.Compat.Prelude.Internal’:
        This modules' API is not stable. Use at your own risk, or better yet, use @base-compat@!

In `cabal-install` we import the `.Internal` module exactly once, and
use -Wno-deprecations to suppress that the warning of that single
import.
parent 81c2d4f7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment