[GHC] #13347: Abstract classes in hs-boot should not be treated as injective
GHC
ghc-devs at haskell.org
Thu Mar 2 23:59:11 UTC 2017
#13347: Abstract classes in hs-boot should not be treated as injective
-------------------------------------+-------------------------------------
Reporter: ezyang | Owner: (none)
Type: bug | Status: patch
Priority: low | Milestone:
Component: Compiler (Type | Version: 8.1
checker) |
Resolution: | Keywords: hs-boot
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3236
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Edward Z. Yang <ezyang@…>):
In [changeset:"fb5cd9d6d6185afe6d4ef2f3df3f895b6d0abf4c/ghc" fb5cd9d/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="fb5cd9d6d6185afe6d4ef2f3df3f895b6d0abf4c"
Properly represent abstract classes in Class and IfaceDecl
Summary:
Previously, abstract classes looked very much like normal
classes, except that they happened to have no methods,
superclasses or ATs, and they came from boot files. This
patch gives abstract classes a proper representation in
Class and IfaceDecl, by moving the things which are never
defined for abstract classes into ClassBody/IfaceClassBody.
Because Class is abstract, this change had ~no disruption
to any of the code in GHC; if you ask about the methods of
an abstract class, we'll just give you an empty list.
This also fixes a bug where abstract type classes were incorrectly
treated as representationally injective (they're not!)
Fixes #13347, and a TODO in the code.
Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, bgamari, austin
Subscribers: goldfire, thomie
Differential Revision: https://phabricator.haskell.org/D3236
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13347#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list