A deferred type error inferferes with the monomorphism restriction
Here is a fairly simple program:
{-# OPTIONS_GHC -fdefer-type-errors #-}
module Bug where
other = ['a', True]
x = 5
The monomorphism restriction is in effect, and note that the two definitions do not refer to each other.
GHC embarrassingly infers the type Any
for x
, affected by the presence of the ill-typed other
.