packages feed

ghc-exactprint-0.5.0.0: tests/examples/ghc8/T6018failclosed2.hs

{-# LANGUAGE TypeFamilies  #-}

module T6018failclosed2 where

-- this one is a strange beast. Last equation is unreachable and thus it is
-- removed. It is then impossible to typecheck barapp and thus we generate an
-- error
type family Bar a = r | r -> a where
    Bar Int  = Bool
    Bar Bool = Int
    Bar Bool = Char

bar :: Bar a -> Bar a
bar x = x

barapp :: Char
barapp = bar 'c'