[GHC] #784: defining type of returned value
GHC
trac at galois.com
Mon Jun 5 07:17:59 EDT 2006
#784: defining type of returned value
----------------------------------------+-----------------------------------
Reporter: Bulat.Ziganshin at gmail.com | Owner:
Type: bug | Status: new
Priority: low | Milestone:
Component: Compiler | Version: 6.4.2
Severity: normal | Resolution:
Keywords: | Os: Unknown
Difficulty: Unknown | Architecture: Unknown
----------------------------------------+-----------------------------------
Changes (by simonpj):
* priority: normal => low
Comment:
I know what is going on here. The key code is:
{{{
foo :: IO (ForeignPtr a) = undefined
baz :: IO (ForeignPtr a)
baz = undefined
}}}
Here, the binding of {{{foo}}} is supposed to bind {{{a}}}, while the type
sig on {{{baz}}} uses {{{a}}}. Unfortunately, the dependency analyser
isn't taking scoped type variables into account, which is clearly a bug.
The exact setup for scoped type variables is under review, so I'm
reluctant to invest effort in fixing this (it's not entirely trivial). So
for now I'm going to leave it as an open bug with low priority.
Workaround: don't use a pattern binding that binds a scoped type variable.
My bet s that you didn't intend that in the first place.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/784>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list