[GHC] #10891: `reify` doesn't find associated type families
GHC
ghc-devs at haskell.org
Sat Sep 26 19:27:06 UTC 2015
#10891: `reify` doesn't find associated type families
-------------------------------------+-------------------------------------
Reporter: antalsz | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 8.0.1
Component: Template Haskell | Version: 7.10.2
Resolution: | Keywords: type
| families; newcomer
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1254
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"b4d43b4e9f4f4fba068ab1e132113c4cd305dfe3/ghc"
b4d43b4e/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="b4d43b4e9f4f4fba068ab1e132113c4cd305dfe3"
reify associated types when reifying typeclasses(#10891)
As reported in Trac #10891, Template Haskell's `reify` was not
generating Decls for associated types. This patch fixes that.
Note that even though `reifyTyCon` function used in this patch returns
some type instances, I'm ignoring that.
Here's an example of how associated types are encoded with this patch:
(Simplified representation)
class C a where
type F a :: *
-->
OpenTypeFamilyD "F" ["a"]
With default type instances:
class C a where
type F a :: *
type F a = a
-->
OpenTypeFamilyD "F" ["a"]
TySynInstD "F" (TySynEqn [VarT "a"] "a")
Test Plan:
This patch was already reviewed and even merged. The patch is later
reverted because apparently it broke the build some time between the
validation of this patch and merge. Creating this new ticket to fix the
validation.
Reviewers: goldfire, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1277
GHC Trac Issues: #10891
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10891#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list