Skip to content

Core lint failure with type families, data families, and typeclasses

I haven't been able to shrink this case smaller and still fail core lint.

{-# LANGUAGE TypeFamilies, EmptyDataDecls #-}
module CoreLint where

data Eps

data family Work a v
data instance Work Eps v = Eps v

type family Dual a
type instance Dual Eps = Eps

class Connect s where
    connect :: (Dual s ~ c, Dual c ~ s) => Work s a -> Work c b -> (a,b)

instance Connect Eps where
    connect (Eps a) (Eps b) = (a,b)

Output from ghc -dcore-lint is attached

Trac metadata
Trac field Value
Version 6.8.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information