Re: Re[2]: [Haskell-cafe] Re: Error message reform (was: Strange type error with associated type synonyms)

2009-05-27 Thread Jeff Wheeler
On Wed, 2009-05-27 at 23:59 -0400, John Dorsey wrote:


> There was one hang-up; it wasn't at all clear which referred to the term,
> and which referred to the context.  (Really both types are inferred.) This
> stopped bothering me when I decided it didn't matter which was which, and I
> could generally find the problem pretty quickly just knowing the location
> and the types involved.
> 
> Of course, I can see how the messages are probably much less useful to
> non-native speakers, and that's quite important.  Something along the lines
> of "inferred type  for term, but expected type  in
> context".

As a native English speaker myself, I've also found it awkward because
both types are inferred, I suppose.

The alternate format you've suggested would make it much more clear, in
my opinion, and I strongly feel that the current version should be
replaced with yours.

Jeff Wheeler

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re[2]: [Haskell-cafe] Re: Error message reform (was: Strange type error with associated type synonyms)

2009-05-27 Thread John Dorsey
> I like the "expected/inferred" vocabulary. Maybe it comes from being a
> native English speaker, but to me, it says "this is what we expected
> to get, but instead (through type inference), we got this type for
> this term".

As another native English speaker, I found "expected/inferred" very
intuitive when I was new to GHC, and to Haskell.  I even think that
"expected/inferred" helped me form my intuition about Haskell's type
inference.

There was one hang-up; it wasn't at all clear which referred to the term,
and which referred to the context.  (Really both types are inferred.) This
stopped bothering me when I decided it didn't matter which was which, and I
could generally find the problem pretty quickly just knowing the location
and the types involved.

Of course, I can see how the messages are probably much less useful to
non-native speakers, and that's quite important.  Something along the lines
of "inferred type  for term, but expected type  in
context".

John

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re[2]: [Haskell-cafe] Re: Error message reform (was: Strange type error with associated type synonyms)

2009-05-27 Thread Alexander Dunlap
On Wed, May 27, 2009 at 3:24 PM, Bulat Ziganshin
 wrote:
> Hello Max,
>
> Thursday, May 28, 2009, 2:14:19 AM, you wrote:
>
>>> I absolutely agree about expected/inferred. I always forget which is
>>> which, because I can figure both could apply to each.
>
>> That's actually true for me too. When you say it like that, I remember
>> times when I've had the same confusion.
>
> it's why i asked beginners. it seems that we all go through times
> when ghc errmsgs looks cryptic but then we start to live with it and
> forget the first period
>
> actually, i don't have much problems with errrmsgs now, but trying to
> grok how i interpret them i've found that i mainly use *position*
> part of message, it's enough for me most times :)
>
>
> --
> Best regards,
>  Bulat                            mailto:bulat.zigans...@gmail.com
>

Hi,

I like the "expected/inferred" vocabulary. Maybe it comes from being a
native English speaker, but to me, it says "this is what we expected
to get, but instead (through type inference), we got this type for
this term".

Of course, I've also been reading GHC error messages for a while, so
I've gotten used to understanding what they mean. When I was new, I
had more of a problem...but I'm not sure you can really eliminate
that. Everything takes practice. :)

Alex
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Re: Error message reform (was: Strange type error with associated type synonyms)

2009-05-27 Thread Bulat Ziganshin
Hello Max,

Thursday, May 28, 2009, 2:14:19 AM, you wrote:

>> I absolutely agree about expected/inferred. I always forget which is
>> which, because I can figure both could apply to each.

> That's actually true for me too. When you say it like that, I remember
> times when I've had the same confusion.

it's why i asked beginners. it seems that we all go through times
when ghc errmsgs looks cryptic but then we start to live with it and
forget the first period

actually, i don't have much problems with errrmsgs now, but trying to
grok how i interpret them i've found that i mainly use *position*
part of message, it's enough for me most times :)


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Re: Error message reform (was: Strange type error with associated type synonyms)

2009-05-27 Thread Bulat Ziganshin
Hello Jeff,

Thursday, May 28, 2009, 2:03:30 AM, you wrote:

> I absolutely agree about expected/inferred. I always forget which is
> which, because I can figure both could apply to each.

thank you, it's what i meant! compiler infers types of both caller and
its argument and then expect to see types inferred. these two words are
actually describe two stages of process, not two opposite processes!


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe