Terrible error message from eta expansion due to linearity
Consider this
data T = MkT Int
f :: Bool -> T
f x = MkT x
I get the terrible error message
Bar.hs:6:11: error:
• Couldn't match expected type ‘Int’ with actual type ‘Bool’
• In the first argument of ‘\(x::['Many]Int). MkT x’, namely ‘x’
In the expression: MkT x
In an equation for ‘f’: f x = MkT x
What on earth is that eta-expanded constructor doing in the error message?