Note [The Unsatisfiable representation-polymorphism trick]

libraries/ghc-internal/src/GHC/Internal/TypeError.hs:161 libraries

The class method `unsatisfiableLifted :: forall (a::Type). Unsatisfiable msg => a`
works only for lifted types `a`.  What if we want an unsatisfiable value of type
`Int#`, say?  The function `unsatisfiable` has a representation-polymorphic type
   unsatisfiable :: forall {rep} (msg :: ErrorMessage) (b :: TYPE rep).
                    Unsatisfiable msg => b
and yet is defined in terms of `unsatisfiableLifted`.  How? By instantiating
`unsatisfiableLifted` at type `(##) -> b`, and applying the result to `(##)`.
Very cunning!

References 0

This Note does not link to any other.

Referenced by 1