Infer HasCallStack where possible
Prelude> :t error error :: GHC.Stack.Types.HasCallStack => [Char] -> a Prelude> :t (\x -> error x) (\x -> error x) :: (?callStack::GHC.Stack.Types.CallStack) => [Char] -> a
We would prefer to get the same type for the latter as the former.
Moreover, when we execute on #11376 (closed) (comment 25),
:t error will show the more complicated type too.
My suggestion: during generalisation, when we see
?callStack::CallStack, use the built-in type synonym
HasCallStack. Note that this should only happen if the name used for the implicit parameter is actually
Eric would you like to consider this?