[GHC] #14045: Data family instances must list all patterns of family, despite documentation's claims to the contrary

GHC ghc-devs at haskell.org
Mon Jul 31 13:08:43 UTC 2017


#14045: Data family instances must list all patterns of family, despite
documentation's claims to the contrary
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.3
  checker)                           |
      Resolution:                    |             Keywords:  TypeFamilies
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHC rejects       |            Test Case:  indexed-
  valid program                      |  types/should_compile/T14045,
                                     |  indexed-types/should_fail/T14045a
      Blocked By:                    |             Blocking:
 Related Tickets:  #12369            |  Differential Rev(s):  Phab:D3804
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Ah I missed the reference to `Note [Arity of data families]`.  Thanks.
 But
 {{{
      This instance is very nearly equivalent to
         data instance Sing (a :: Bool) where ...
      but without the last pattern, we have an under-saturated data
      family instance.  On its own, this example is not compelling
 }}}
 Can you say more precisely what /is/ the difference?  Is it only the
 newtype-eta thing?  Or is there anything else?

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


More information about the ghc-tickets mailing list