[GHC] #8884: Reifying closed type families is broken

GHC ghc-devs at haskell.org
Fri Mar 14 13:31:17 UTC 2014


#8884: Reifying closed type families is broken
-------------------------------------+------------------------------------
        Reporter:  goldfire          |            Owner:  goldfire
            Type:  bug               |           Status:  merge
        Priority:  normal            |        Milestone:  7.8.1
       Component:  Template Haskell  |          Version:  7.8.1-rc2
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:  th/T8884          |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by goldfire):

 Replying to [comment:4 carter]:
 > how would they even use the incorrect behavior constructively?

 Note that the incorrect behavior applied to ''open'' type families as well
 as closed, so this isn't a new bug in 7.8. How could they use it
 constructively? Reifying a type family gives the list of arguments and the
 result kind. By counting the number of arguments, a program could remove
 the same number of arrows from the returned kind to get the actual result
 kind. It's not too hard, actually. As for the extra kind parameters, I
 suppose a program could do dependency analysis to discover which variables
 are kind variables and remove them.

 In any case, my library (a branch of `singletons`) was able to use the
 incorrect behavior without too much trouble (once we figured out what was
 going on), so there's an evidence proof for you. :)

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8884#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list