Typechecker / OverloadedStrings question 7.8 vs. 7.10

Simon Peyton Jones simonpj at microsoft.com
Mon Aug 3 20:08:42 UTC 2015


Would someone feel able to open a Trac ticket summarising this thread (as well as pointing to it), and making a proposal?

Thanks

Simon

| -----Original Message-----
| From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Daniel
| Bergey
| Sent: 03 August 2015 17:47
| To: Phil Ruffwind; Reid Barton
| Cc: ghc-devs
| Subject: Re: Typechecker / OverloadedStrings question 7.8 vs. 7.10
| 
| On 2015-08-03 at 04:43, Phil Ruffwind <rf at rufflewind.com> wrote:
| > 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)'.
| 
| Yes, I think that message would be fine.
| _______________________________________________
| ghc-devs mailing list
| ghc-devs at haskell.org
| http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


More information about the ghc-devs mailing list