[GHC] #13795: :kind! is not expanding type synonyms anymore

GHC ghc-devs at haskell.org
Thu Jun 15 13:54:22 UTC 2017


#13795: :kind! is not expanding type synonyms anymore
-------------------------------------+-------------------------------------
        Reporter:  Hjulle            |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  GHCi              |              Version:  8.0.2
      Resolution:                    |             Keywords:  newcomer
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 vl.still):

 I found a possible workaround (usable more with appropriate HINT or GHC
 API functions such as Language.Haskell.Interpreter.normalizeType) and
 inconsistency in behavior of current GHC(i) (8.0.2):

 Let's have following type family:

 {{{#!hs
 type family Id a
 type instance Id a = a
 }}}

 now in GHCi:

 {{{
 >λ= :kind! String
 String :: *
 = String

 >λ= :kind! Id String
 Id String :: *
 = [Char]

 >λ= :kind! Id String -> String
 Id String -> String :: *
 = [Char] -> String
 }}}

 So it seems that type synonyms are expanded as long as they are in
 subexpression of an expression with type family.

 I personally would appriciate in :kind! expanded type synonyms as well as
 type families.

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


More information about the ghc-tickets mailing list