diff --git a/boom.hs b/boom.hs index 3bacdb0..7bfb0f8 100644 --- a/boom.hs +++ b/boom.hs @@ -69,43 +69,18 @@ class BoomOrNum n r | n -> r instance (Map EqualThree' n bs, AnyTrue bs a, Boom' a n r) => BoomOrNum n r -data Nil -data Cons x xs - -class First list x | list -> x -instance First Nil Nil -instance First (Cons x more) x - -class ListConcat a b c | a b -> c -instance ListConcat Nil x x -instance (ListConcat as bs cs) - => ListConcat (Cons a as) bs (Cons a cs) - -class ListConcatAll ls l | ls -> l -instance ListConcatAll Nil Nil -instance (ListConcat chunk acc result, - ListConcatAll rest acc) - => ListConcatAll (Cons chunk rest) result - class AnyTrue list t | list -> t instance AnyTrue Nil False instance AnyTrue (Cons True more) True instance (AnyTrue list t) => AnyTrue (Cons False list) t +data Nil +data Cons x xs + data True data False -class Not b1 b | b1 -> b -instance Not False True -instance Not True False - -class Or b1 b2 b | b1 b2 -> b -instance Or True True True -instance Or True False True -instance Or False True True -instance Or False False False - data Z data S n @@ -116,13 +91,6 @@ instance Equal Z (S b) False instance (Equal a b t) => Equal (S a) (S b) t -class LessThan a b t | a b -> t -instance LessThan Z Z False -instance LessThan (S x) Z False -instance LessThan Z (S x) True -instance (LessThan a b t) - => LessThan (S a) (S b) t - class Add x y z | x y -> z instance Add x Z x instance Add Z y y