[GHC] #11084: Some type families don't reduce with :kind!

GHC ghc-devs at haskell.org
Sun Feb 3 14:06:15 UTC 2019


#11084: Some type families don't reduce with :kind!
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.2
      Resolution:                    |             Keywords:  TypeFamilies
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 I've trimmed down this example even more:

 {{{#!hs
 {-# LANGUAGE TypeFamilies #-}
 module T11084Aux where

 type family F a
 type instance F a = Int
 }}}
 {{{#!hs
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE UndecidableInstances #-}
 module T11084 where

 import T11084Aux

 type family G where
   G = F Char
 }}}

 Moreover, `cabal new-build` makes it much easier to reproduce this bug
 than it used to be. Now all you have to do is this:

 {{{
 $ git clone https://github.com/RyanGlScott/ghc-t11084
 $ cd ghc-t11084/
 $ cabal new-build -w /opt/ghc/8.6.3/bin/ghc
 $ /opt/ghc/8.6.3/bin/ghci -package-env .ghc.environment.x86_64-linux-8.6.3
 GHCi, version 8.6.3: http://www.haskell.org/ghc/  :? for help
 Loaded package environment from .ghc.environment.x86_64-linux-8.6.3
 Loaded package environment from .ghc.environment.x86_64-linux-8.6.3
 Loaded GHCi configuration from /home/rgscott/.ghci
 λ> import T11084
 λ> :kind! G
 G :: *
 = ghc-t11084-0.1:T11084Aux.F Char
 λ> :kind! G
 G :: *
 = Int
 }}}

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


More information about the ghc-tickets mailing list