Overlap6.hs 320 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{-# LANGUAGE TypeFamilies, DataKinds, PolyKinds #-}

module Overlap6 where

type family And (a :: Bool) (b :: Bool) :: Bool
type instance where
  And False x = False
  And True x = False -- this is wrong!
  And x False = False
  And x True = x
  And x x = x

data Proxy p = P

g :: Proxy x -> Proxy (And x True)
g x = x