[GHC] #13249: Default signature check can be quite onerous
GHC
ghc-devs at haskell.org
Thu Feb 9 10:48:34 UTC 2017
#13249: Default signature check can be quite onerous
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 8.2.1
Component: Compiler (Type | Version: 8.1
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: #12918 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
Well it's true, isn't it? We are simply listing the conditions under
which you can use the generic default instance. The more constraints you
need, the less generally-applicable it is.
In this case you are saying that you can say
{{{
instance MonadGet ty where
type Remaining ty = blah
-- no code for 'remaining'
}}}
only if:
* `ty` is of form `(t n)`
* We have `MonadTrans t, MonadGet n, Monad n`
* `Remaining (t n)` equals `Remaining n`.
Fair enough
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13249#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list