snoyberg / mono-traversable

Type classes for mapping, folding, and traversing monomorphic containers
155 stars 67 forks source link

add TypeOperators to advert future errors for ~ #227

Closed BebeSparkelSparkel closed 4 months ago

andreasabel commented 1 month ago

@BebeSparkelSparkel Thanks!

Seems like this isn't entirely resolved, GHC 9.12 is still a bit unhappy about the type equality:

Building library for mono-traversable-1.0.20.0...
[1 of 6] Compiling Data.MonoTraversable ( src/Data/MonoTraversable.hs, dist/build/Data/MonoTraversable.o, dist/build/Data/MonoTraversable.dyn_o )
src/Data/MonoTraversable.hs:179:47: warning: [GHC-12003] [-Wtype-equality-out-of-scope]
    • The ‘~’ operator is out of scope.
      Assuming it to stand for an equality constraint.
    • Note: ‘~’ used to be built-in syntax but now is a regular type operator
            exported from Data.Type.Equality and Prelude.
            If you are using a custom Prelude, consider re-exporting it.
    • This will become an error in a future GHC release.
    |
179 |     default omap :: (Functor f, Element (f a) ~ a, f a ~ mono)
    |                                               ^