From: Christiaan Baaij Date: Mon, 1 Mar 2010 16:01:58 +0000 (+0100) Subject: Update code examples in choice section to use Equiv instead of Eq so not to confuse... X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=b838590367678681d4d7948a7463eb7dcfa82b42;p=matthijs%2Fmaster-project%2Fdsd-paper.git Update code examples in choice section to use Equiv instead of Eq so not to confuse with the Eq type class --- diff --git "a/c\316\273ash.lhs" "b/c\316\273ash.lhs" index c690e8e..998e6a6 100644 --- "a/c\316\273ash.lhs" +++ "b/c\316\273ash.lhs" @@ -645,7 +645,7 @@ circuit~\cite{reductioncircuit} for floating point numbers. \begin{code} sumif pred a b = - if pred == Eq then + if pred == Equiv then if a == b then a + b else 0 else if a != b then a + b else 0 @@ -676,10 +676,10 @@ circuit~\cite{reductioncircuit} for floating point numbers. versions of the example. \begin{code} - sumif Eq a b | a == b = a + b - | otherwise = 0 - sumif Neq a b | a != b = a + b - | otherwise = 0 + sumif Equiv a b | a == b = a + b + | otherwise = 0 + sumif NotEquiv a b | a != b = a + b + | otherwise = 0 \end{code} % \begin{figure}