[GHC] #8674: User output should not show eta-contracted data instances

GHC ghc-devs at haskell.org
Fri Jan 17 14:01:21 UTC 2014


#8674: User output should not show eta-contracted data instances
------------------------------------+-------------------------------------
       Reporter:  simonpj           |             Owner:
           Type:  bug               |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  Compiler          |           Version:  7.6.3
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 Consider
 {{{
 data family Sing (a :: k)
 data instance Sing (a :: [k]) = SNil
 data instance Sing Bool = SBool
 }}}
 If you load this into ghci and say `:info Sing` you get
 {{{
 :i Sing
 type role Sing nominal
 data family Sing (a :: k)
         -- Defined at T8557.hs:4:1
 data instance Sing Bool -- Defined at T8557.hs:6:15
 data instance Sing -- Defined at T8557.hs:5:15
 }}}
 The `data instance` is eta-contracted (see `Note [Eta reduction for data
 family axioms]` in `TcInstDcls`).

 This is jolly confusing for our users.  We should eta-expand before
 displaying.

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


More information about the ghc-tickets mailing list