Skip to content

DIfferent Typeable constraints behaviour in GHC2021 & Haskell2010

Summary

The issue and its discussion is documented in: https://discourse.haskell.org/t/different-typeable-constraints-behaviour-in-ghc2021-haskell2010/4606

In brief, using Typeable and PolyKinds (which is enabled in GHC2021) triggers a interesting head-scratching issue that results a type error during complication.

Steps to reproduce

See https://discourse.haskell.org/t/different-typeable-constraints-behaviour-in-ghc2021-haskell2010/4606

Expected behavior

The code should not fail the complication when GHC2021 is enabled.

But if it has to, at least specifying what's the most sensible way of augmenting the code, and document it as a GHC 9.x breaking change.

Environment

  • GHC version used: 9.2.2, installed using GHCUP

Optional:

  • Operating System: Ubuntu / Windows 11
  • System Architecture: x86
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information