projects
/
matthijs
/
master-project
/
cλash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add another higher order testcase, highordtest2.
[matthijs/master-project/cλash.git]
/
Adders.hs
diff --git
a/Adders.hs
b/Adders.hs
index 2ee1de69534f144ab6f41d627fdfc7ce950e4f05..d4dbbf8c99d851b5c7cf7b49222ca994b42c8878 100644
(file)
--- a/
Adders.hs
+++ b/
Adders.hs
@@
-165,6
+165,16
@@
highordtest = \x ->
in
\c d -> op' d c
in
\c d -> op' d c
+highordtest2 = \a b ->
+ case a of
+ High -> \c d -> d
+ Low -> let
+ op' :: Bit -> Bit -> Bit
+ op' = case b of
+ High -> \c d -> d
+ Low -> \c d -> c
+ in
+ \c d -> op' d c
-- Four bit adder, using the continous adder below
-- [a] -> [b] -> ([s], cout)
--con_adder_4 as bs =
-- Four bit adder, using the continous adder below
-- [a] -> [b] -> ([s], cout)
--con_adder_4 as bs =