Typechecker / OverloadedStrings question 7.8 vs. 7.10
Phil Ruffwind
rf at rufflewind.com
Mon Aug 3 04:43:24 UTC 2015
I think the error message could be made clearer simply by emphasizing the fact
that type ambiguity over the lack of instances.
Ambiguous type variable 't0' arising from a use of
elem :: a -> t0 a -> Bool
caused by the lack of an instance 'Data.String.IsString (t0 Char)'
Either add a type annotation to dictate what 't0' should be
based on one of the potential instances:
instance Foldable (Either a) -- Defined in ‘Data.Foldable’
instance Foldable Data.Proxy.Proxy -- Defined in ‘Data.Foldable’
instance GHC.Arr.Ix i => Foldable (GHC.Arr.Array i)
-- Defined in ‘Data.Foldable’
...plus three others)
or define the required instance 'Data.String.IsString (t0 Char)'.
More information about the ghc-devs
mailing list