Closed
Description
Which lsp-client do you use:
VS Code
Steps to reproduce
Type -- >>> head []
in the editor and click on Evaluate...
Expected behaviour
Output:
*** Exception: Prelude.head: empty list
as in ghci.
Actual behaviour
Output:
-- Ambiguous type variable ‘f0’
-- prevents the constraint ‘(Show f0)’ from being solved.
-- Probable fix: use a type annotation to specify what ‘f0’ should be.
-- These potential instances exist:
-- instance Show a => Show (ZipList a)
-- -- Defined in ‘Control.Applicative’
-- instance Show NestedAtomically
-- -- Defined in ‘Control.Exception.Base’
-- instance Show NoMethodError -- Defined in ‘Control.Exception.Base’
-- ...plus 215 others
-- (use -fprint-potential-instances to see them all)
Workaround
Specifying a concrete type, such as -- >>> head ([]::[Int])
does not result in this error, but is not pretty.