In message <[EMAIL PROTECTED]>, "Carl R. Witty" wri
tes:
> I believe I've found a bug in the way Hugs 971106 reports certain
> errors (the behavior was also present in Hugs 970719).
> 
> Consider the following module.
>
[snip]
>
> When you try to load this into Hugs, it prints:
> 
> ERROR "Bug2.hs" (line 18): Unresolved top-level overloading
> *** Binding             : popIndentList
> *** Outstanding context : (Monad (StateMonad b b), Monad b)
> 
> That context doesn't make any sense; in particular, (StateMonad b b)
> is not well-kinded.  I would expect a context like
>   (Monad (StateMonad a b), Monad a)
> (which of course reduces to (Monad a)).
> 
> Also, it would have been easier for me to understand the above error
> message if it had included the words "monomorphism restriction".
> 
> Carl Witty
> [EMAIL PROTECTED]


So far as my old hugs-directories tell, Hugs1.4 through 970401 says,
`Monad a is ambiguous,' as expected.  I guess that someone has decided
to print "preds" (Gofer context) instead of "hpreds" (the corresponding
simplified Haskell context).   So a plausible patch to improve the
situation at least w.r.t. the problem would be as shown later.

# By the way, were there any reasons to prefer the `raw' Gofer context?

----
Yoshihiko Ichikawa, Dept of Info Sci, Fac of Sci, Ochanomizu University
Phone:  +81-3-5978-5708 (Dial-in) / +81-3-5978-5704 (Library of Department)
Fax:    +81-3-5978-5898 (Faculty) / +81-3-5878-5705 (Library of Department)
E-mail: [EMAIL PROTECTED]


----%< choki choki -------------------------------------------------------
*** type.c.orig Sat Nov 15 14:34:15 1997
--- type.c      Sat Nov 15 14:28:38 1997
***************
*** 1286,1289 ****
            ERRTEXT     "\n*** Outstanding context : " ETHEN
!                                               ERRCONTEXT(copyPreds(preds));
            ERRTEXT     "\n"
- --- 1286,1291 ----
            ERRTEXT     "\n*** Outstanding context : " ETHEN
!                                               ERRCONTEXT(copyPreds(hpreds));
            ERRTEXT     "\n"
--------------------------------------------------------------------------

Reply via email to