logo       

Re: bug?: msg#00070

lang.haskell.glasgow.bugs

Subject: Re: bug?

Hi Levent,

See the reply to your bug report here:

http://hackage.haskell.org/trac/ghc/ticket/771

bottom line: it isn't a bug, Hugs is implementing an extension, and GHC will have the same extension in version 6.6.

Cheers,
Simon

Levent Erkok wrote:
for the following program:
----------------------------
module Bug where

f :: Maybe Bool
f = g ()

g () = do f
error "bug?"
----------------------------

If I ask ghci (version: 6.4.1) what the type of g is, it says:
----------------------------
*Bug> :t g
g :: () -> Maybe Bool
----------------------------

However, I think it should be:
----------------------------
Bug> :t g
g :: () -> Maybe a
----------------------------
as reported by Hugs (version: March 2005).

I first thought this was a monomorphism-restriction gotcha, but g is obviously a function, not a constant. And Hugs reports the more general expected type anyhow.

I'm curious to see if this is a real bug or some weird interaction with ghci..

-Levent.

PS. I've submitted through "trac" as well, but the formatting was all messed up; so resending via e-mail.


------------------------------------------------------------------------

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise