[GHC] #10960: Closed type families don't reduce on data family instances

GHC ghc-devs at haskell.org
Tue Oct 13 10:02:46 UTC 2015


#10960: Closed type families don't reduce on data family instances
-------------------------------------+-------------------------------------
        Reporter:  exFalso           |                Owner:
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.2
      Resolution:  duplicate         |             Keywords:  closed type
                                     |  family data
Operating System:  Linux             |         Architecture:  x86_64
 Type of failure:  GHC rejects       |  (amd64)
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by exFalso):

 A note to anyone encountering this same problem: There is a weird
 workaround, at least for the above problem:

 {{{#!hs
 type family T a where
   T () = ()
   T (f a) = Char -- (D ()) reduces here
   T a = Char
 }}}

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


More information about the ghc-tickets mailing list