[GHC] #10087: DefaultSignatures: error message mentions internal name
GHC
ghc-devs at haskell.org
Sun Apr 17 16:29:59 UTC 2016
#10087: DefaultSignatures: error message mentions internal name
-------------------------------------+-------------------------------------
Reporter: andreas.abel | Owner:
Type: feature request | Status: infoneeded
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.8.4
checker) |
Resolution: | Keywords: Generics
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* status: new => infoneeded
Comment:
I'm a bit confused about the state of affairs for this ticket.
Pedro, I don't really understand what you mean when you say "So perhaps
that's what we should do in this case, too." After all, this code:
{{{#!hs
{-# LANGUAGE DefaultSignatures #-}
class C a where
reflexive :: a -> Bool
default reflexive :: Eq a => a -> Bool
reflexive x = x == x
data D
instance C D where
}}}
and this code:
{{{#!hs
class C a where
reflexive :: Eq a => a -> Bool
reflexive x = x == x
data D
instance C D
}}}
appear to be fundamentally different. In the former, `reflexive` defines a
function that //requires// an `Eq a` constraint when the user doesn't
implement it. In the latter, `reflexive` defines a function that
//presupposes// that `a` is an instance of `Eq`. When viewed in this
light, shouldn't the former code error and the latter code be OK?
Simon, what are `GenDefMeth` and `NoDefMeth`? I can't find anything in the
source about them (save for one possibly outdated comment on `NoDefMeth`).
Were they replaced by `DefMethSpec` (i.e,
[http://git.haskell.org/ghc.git/blob/93d85af9fec968b43452891ec7b10382a4a99a38:/compiler/basicTypes/BasicTypes.hs#l774
this]) at some point? If so, are your comments about a proposed
refactoring still relevant?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10087#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list