Overlap6.hs 306 Bytes
Newer Older
1 2 3 4
{-# LANGUAGE TypeFamilies, DataKinds, PolyKinds #-}

module Overlap6 where

5
type family And (a :: Bool) (b :: Bool) :: Bool where
6 7 8 9 10 11 12 13 14 15
  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