ScopedTypeVariables

2013-08-06 Thread Evan Laforge
Occasionally I have to explicitly add a type annotation, either for clarity or to help choose a typeclass instance. Usually top-level type annotations take care of this, but sometimes it's convenient to only annotate a certain value, e.g. one argument of a lambda. I've noticed that while vanilla

Re: cascading type errors in ghc

2013-08-06 Thread Evan Laforge
On Sun, Jul 28, 2013 at 9:01 AM, Simon Peyton-Jones simo...@microsoft.com wrote: Giving good type error messages is tricky! Indeed, and I'm fully aware this is a Hard Problem. You get different behaviour for literals because 0 has type (forall a. Num a = a), whereas you declared x1 to have

Re: [Haskell-cafe] ScopedTypeVariables

2013-08-06 Thread Dan Doel
This is already a separate extension: PatternSignatures. However, that extension is deprecated for some reason. On Tue, Aug 6, 2013 at 2:46 PM, Evan Laforge qdun...@gmail.com wrote: Occasionally I have to explicitly add a type annotation, either for clarity or to help choose a typeclass