@@ -40,6 +40,8 @@ import Data.Kind
40import GHC.Generics
40import GHC.Generics
41import GHC.TypeLits
41import GHC.TypeLits
43+import Data.Type.Bool (type (&&), If, Not)
43-- $example
45-- $example
45-- module Example where
47-- module Example where
@@ -154,24 +156,7 @@ type family Size f :: Nat where
155--------------------------------------------------------------------------------
157--------------------------------------------------------------------------------
157−type family Not (b :: Bool) where
161−type family (<?) (x :: Nat) (y :: Nat) :: Bool where
162− x <? y = Not (y <=? x)
159+type x <? y = Not (y <=? x)
164infixl 4 <?
160infixl 4 <?
166−type family If (c :: Bool) (x :: k) (y :: k) :: k where
170−type family Min (a :: Nat) (b :: Nat) :: Nat where
171− Min a b = If (a <? b) a b
162+type Min a b = If (a <? b) a b
173−type family (a :: Bool) && (b :: Bool) :: Bool where
174− 'True && 'True = 'True