[GHC] #10725: Figure out how to support type synonym implementions of abstract data
GHC
ghc-devs at haskell.org
Thu Apr 21 18:58:55 UTC 2016
#10725: Figure out how to support type synonym implementions of abstract data
-------------------------------------+-------------------------------------
Reporter: ezyang | Owner: ezyang
Type: task | Status: closed
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.10.2
checker) |
Resolution: fixed | Keywords: backpack
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by ezyang):
* status: new => closed
* resolution: => fixed
Comment:
It was really easy, and I've implemented it on my branch. Just a few minor
complications:
1. When we recompile an hsig file with the actual backing implementation,
we need to notice when we define an abstract type "data A" which is
implemented with a type synonym, and "swap in" the correct type synonym
immediately. If we don't, when we subsequently refer to A we'll get a
TyCon that is not decorated as a type synonym (despite being the same
original name as a type synonym), and then type equality chokes.
2. There was a bug when serializing out hsig interface files where I was
incorrectly grabbing fingerprints locally rather than from the backing
implementation. That's fixed now.
https://github.com/ezyang/ghc/commit/4d59c74b2381eb8e2b9c1d31111a921ed95ebd23
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10725#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list