[GHC] #13773: Types are not normalized in instance declarations

GHC ghc-devs at haskell.org
Wed May 31 17:31:31 UTC 2017


#13773: Types are not normalized in instance declarations
-------------------------------------+-------------------------------------
           Reporter:  augustss       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Consider the example below.  It does not compile, but replacing 5*2 by 10
 makes it compile.
 This is quite annoying since it forces me to do the normalization that the
 computer is really much better at doing.

 {{{#!hs
 module NatInstance where
 import GHC.TypeLits

 type N = 5 * 2
 data D (n :: Nat) = D
 instance Show (D N) where show _ = ""
 }}}

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


More information about the ghc-tickets mailing list