[GHC] #1503: GHC doesn't respect monomorphism restrictions for
non-type-class-restricted values that are bound
GHC
trac at galois.com
Fri Jul 6 12:33:05 EDT 2007
#1503: GHC doesn't respect monomorphism restrictions for non-type-class-restricted
values that are bound
-----------------------------+----------------------------------------------
Reporter: Isaac Dupree | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.6.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Unknown | Testcase:
Architecture: Unknown |
-----------------------------+----------------------------------------------
Comment (by Isaac Dupree):
Okay, I admit that was a bit of a mess. I believe that this code should
compile, but it doesn't under GHC:
{{{
loop = undefined
int = show loop
req :: Int; req = loop
}}}
Because the binding for 'loop' falls under the monomorphism restriction,
it must have a monomorphic type; the 'req' line ensures that that type is
"Int", which is in class Show, so "show loop" should compile, using the
Show Int dictionary.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1503>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list