[GHC] #16115: Missing associated type instance not reported with error
GHC
ghc-devs at haskell.org
Wed Jan 9 00:36:01 UTC 2019
#16115: Missing associated type instance not reported with error
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.10.1
Component: Compiler (Type | Version: 8.6.3
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Poor/confusing | Unknown/Multiple
error message | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
Yes, that's true. But it's generally reasonable for errors to suppress
warnings. And the error isn't too bad. The user thinks "Why doesn't
`Item Nat` equal `()`? Oh, I'd better look in `instance FromList Nat`,
since `Item` is an associate type of `FromList`; and sure enough there is
no `type instance`.
So it's not too bad. If we wanted to change, I can imagine various things
we could do:
* Never suppress warnings, even if there are errors.
* Make it compulsory to give an instance for an associated type, if there
is no default in the class. That'd be a language change.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16115#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list