Core Lint error
This produces a long Core lint error:
{-# Language DerivingStrategies #-}
{-# Language GADTs #-}
{-# Language GeneralizedNewtypeDeriving #-}
{-# Language InstanceSigs #-}
{-# Language KindSignatures #-}
{-# Language TypeFamilies #-}
{-# Language TypeInType #-}
{-# Language TypeOperators #-}
import Data.Kind
data DEFUNC :: Type -> Type -> Type where
(:~>) :: a -> b -> DEFUNC a b
type a ~> b = DEFUNC a b -> Type
data LamCons a :: Type ~> Type where
LamCons :: a -> LamCons a ([a] :~> [a])
class Mk (app :: Type ~> Type) where
type Arg app :: Type
mk :: Arg app -> app (a :~> b)
instance Mk (LamCons a :: Type ~> Type) where
type Arg (LamCons a) = a
mk :: a -> LamCons (a :~> b)
mk = LamCons
with ghci -ignore-dot-ghci -fdefer-type-errors -dcore-lint bug.hs
on GHC 8.2.1 and 8.3.20171208.