[GHC] #1308: Type signature in warning is wrong
GHC
trac at galois.com
Wed May 2 16:54:56 EDT 2007
#1308: Type signature in warning is wrong
-------------------------+--------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.7
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Windows | Testcase:
Architecture: Unknown |
-------------------------+--------------------------------------------------
Comment (by Isaac Dupree):
Given inferred monomorphic type `Inferred type: autoChart :: t View`,
I think it would be desirable to (additionally) report the type as if the
M-R didn't apply, to be informative and in case this is the signature that
the user wants to add.
Also it would be helpful to report the actual type GHC decides upon
(unless there's a type error?). I assume that GHC knows what 't' becomes
after applying M-R.
Now, is it useful to report `autoChart :: monomorphic t. t View`? As far
as I know, it is easy to see what this could be, just based on the fully
polymorphic type, especially if a specific example - the actual
monomorphic type GHC has chosen - is shown as well.
Hmm... is it even possible to pretend that one thing (e.g. `autochart`) is
polymorphic (as suggested above), in the presence of other things falling
under the monomorphism restriction? Or are there some cases where it
still might not be clear what to report?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1308>
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