[GHC] #8264: Canonical way to prevent manual instances
GHC
ghc-devs at haskell.org
Tue Sep 10 21:10:54 CEST 2013
#8264: Canonical way to prevent manual instances
-------------------------------------------+-------------------------------
Reporter: nomeata | Owner:
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version: 7.6.3
Keywords: | Operating System:
Architecture: Unknown/Multiple | Unknown/Multiple
Difficulty: Unknown | Type of failure:
Blocked By: | None/Unknown
Related Tickets: | Test Case:
| Blocking:
-------------------------------------------+-------------------------------
For some classes (Typeable) the user must not provide hand-written
instances, for other no hand-written instances in Safe mode (old Typeable)
and for others no instances at all (Coercible). Currently the Typeable
checks are in tcInstDecls1 in [source:compiler/typecheck/TcInstDcls.lhs];
but a more proper place would be in checkValidInstHead in
[source:compiler/typecheck/TcValidity.lhs].
Why file a ticket and not just do it? The latter source location does not
know whether the instance is a (stand-alone) deriving instance or a hand-
written one, so this needs a bit of refactoring.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8264>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list