DimaSamoz/mezzo

ghc-typelits-natnormalise-0.6

christiaanb opened this issue · 0 comments

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.