[GHC] #15796: Core Lint error with visible kind application

GHC ghc-devs at haskell.org
Thu Nov 1 19:58:26 UTC 2018


#15796: Core Lint error with visible kind application
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.6.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:                    |
-------------------------------------+-------------------------------------
Changes (by goldfire):

 * cc: mnguyen (removed)
 * keywords:  TypeApplications => TypeInType
 * related:  #12045 =>


Comment:

 Can be triggered without visible kind application:

 {{{#!hs
 {-# Language QuantifiedConstraints #-}
 {-# Language TypeApplications      #-}
 {-# Language TypeOperators         #-}
 {-# Language PolyKinds             #-}
 {-# Language FlexibleInstances     #-}
 {-# Language DataKinds             #-}
 {-# Language TypeFamilies          #-}
 {-# Language MultiParamTypeClasses #-}
 {-# Language ConstraintKinds       #-}
 {-# Language UndecidableInstances  #-}
 {-# Language GADTs                 #-}

 {-# Options_GHC -dcore-lint #-}

 import Data.Kind

 type Cat ob = ob -> ob -> Type

 class Ríki (obj :: Type) where
   type (-->) :: Cat obj

 class Varpi (f :: dom -> cod)

 newtype
   (··>) :: Cat (a -> b) where
   Natu :: Varpi f
        => (forall xx. f xx --> f' xx)
        -> (f ··> f')

 instance
      Ríki cod
   => -------------
      Ríki (dom -> cod)
   where

   type (-->) = ((··>) :: Cat (dom -> cod))
 }}}

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


More information about the ghc-tickets mailing list