[GHC] #13408: Consider inferring a higher-rank kind for type synonyms

GHC ghc-devs at haskell.org
Sat Nov 24 11:13:54 UTC 2018


#13408: Consider inferring a higher-rank kind for type synonyms
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:  TypeInType
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 should also mention that there is actually a feasible workaround to the
 problem in comment:3: just use `ImpredicativeTypes`! That is to say, the
 following works:

 {{{#!hs
 {-# LANGUAGE DataKinds #-}
 {-# LANGUAGE ImpredicativeTypes #-}
 {-# LANGUAGE PolyKinds #-}
 module Foo where

 import Data.Kind

 data A :: Type -> Type
 data B a :: A a -> Type
 type C = B
 }}}

 Until someone fixes this bug, I can profitably use this workaround in
 `singletons`, where the inability to define something like `C` was
 particularly irksome: https://github.com/goldfirere/singletons/pull/373

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


More information about the ghc-tickets mailing list