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

ghc-typelits-natnormalise-0.6 #5

Open
christiaanb opened this issue Apr 23, 2018 · 0 comments
Open

ghc-typelits-natnormalise-0.6 #5

christiaanb opened this issue Apr 23, 2018 · 0 comments

Comments

@christiaanb
Copy link

Version 0.6 of the ghc-typelits-natnormalise plugin emits a b <= a constraints when it finds a solution for a constraint that contain a subtraction a - b. Without this b <= a constraint, the found solution for the equation involving a subtraction might otherwise potentially lead to unsound behaviour.

As a result this change, your package will no longer type-check if you build it with version 0.6 of the plugin. As a work-around you can add the

{-# OPTIONS_GHC -fplugin-opt GHC.TypeLits.Normalise:allow-negated-numbers #-}

pragma to the Mezzo.Model.Prim, Mezzo.Model.Harmony.Chords, Mezzo.Model.Harmony.Functional, and Mezzo.Compose.Combine module. However, I advice you to check: https://hackage.haskell.org/package/ghc-typelits-natnormalise-0.6/docs/GHC-TypeLits-Normalise.html and see if you can fix your code by adding b <= a constraints instead of that above pragma.

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

1 participant