Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingH 1.4.0.1 and parsec 3.1.12.0 are not compatible #88

Closed
Rufflewind opened this issue Feb 4, 2018 · 3 comments
Closed

MissingH 1.4.0.1 and parsec 3.1.12.0 are not compatible #88

Rufflewind opened this issue Feb 4, 2018 · 3 comments

Comments

@Rufflewind
Copy link
Member

MissingH 1.4.0.1 and parsec 3.1.12.0 are not compatible because the Text.ParserCombinators.Parsec module is no longer Safe. It used to be Safe in version 3.1.11.

This incompatibility breaks upstream packages such as Gitit (see comment by cidig on 2018-02-04).

Issue in MissingH repo: haskell-hvr/missingh#42

src/Text/ParserCombinators/Parsec/Utils.hs:33:1: error:
    Text.ParserCombinators.Parsec: Can't be safely imported!
    The module itself isn't safe.
   |
33 | import Text.ParserCombinators.Parsec
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@hvr
Copy link
Member

hvr commented Feb 5, 2018

safe

SafeHaskell strikes again... why do people keep relying on not-advertised module safety properties? :-/

PS: btw, I was wondering if anyone was still using the legacy Text.ParserCombinators.* namespace, as I was considering removing it at some point (we have a parsec2 package that would provide the legacy API).

PS2: This is gonna take a bit of time to figure out a way how to get this done w/o CPP; in the mean-time I've tweaked the preferred-versions on Hackage to discourage the solver from picking up parsec-3.1.12.0 unless forced to.

hvr added a commit that referenced this issue Feb 5, 2018
This is the first version whose `SafeHaskell` properties have become
an intentional part of the API contract; previous versions were merely
accidentally safe-inferred (or not depending on various factors; in
other words, this was a fragile property). If you rely on
`SafeHaskell` to consider module imports from `parsec` *safe*, this is
the first version of `parsec` which actually guarantees a well-defined
state.

Support for GHC 7.0, GHC 7.2, and GHC 7.4.1 has been dropped,
consequently the support window starts with GHC 7.4.2.

This addresses #88
@hvr
Copy link
Member

hvr commented Feb 6, 2018

This should be resolved with the release of parsec-3.1.13.0 which is the first release to intentionally provide SafeHaskell support; iow, if your package breaks unless parsec has Safe/Trustworthy modules, then parsec-3.1.13.0 is the first version that actually guarantees this as part of its API contract; see also https://hackage.haskell.org/package/parsec-3.1.13.0/changelog

TLDR: if you require SafeHaskell, declare this API requirement by either specifying

build-depends: parsec >= 3.1.13.0 && < 3.2

or, starting with cabal-version:2.0 (c.f. cabal user guide), via

build-depends: parsec ^>= 3.1.13.0

@hvr hvr closed this as completed Feb 6, 2018
@Rufflewind
Copy link
Member Author

Thanks for the quick resolution!

Rufflewind added a commit to Rufflewind/aur-packages that referenced this issue Feb 8, 2018
bergmark added a commit to commercialhaskell/stackage that referenced this issue Feb 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants