Permalink
Browse files

Eq instances for Js Nums.

  • Loading branch information...
1 parent c0cebd0 commit ade0d93a641b94c41ea4b88bc2435b085c7c2ae0 Sebastiaan Visser committed Dec 20, 2009
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/Lang/JavaScript.hs
View
@@ -61,6 +61,10 @@ instance Eq (Val JavaScript) Bool where
(==) = fun2 "eq" (\a b -> a ++ " == " ++ b)
(/=) = fun2 "neq" (\a b -> a ++ " /= " ++ b)
+instance Eq (Val JavaScript) Num where
+ (==) = fun2 "eq" (\a b -> a ++ " == " ++ b)
+ (/=) = fun2 "neq" (\a b -> a ++ " /= " ++ b)
+
instance (Eq (Val JavaScript) a, Eq (Val JavaScript) b) => Eq (Val JavaScript) (a, b) where
(==) = fun2 "eq" (\a b -> a ++ " == " ++ b)
(/=) = fun2 "neq" (\a b -> a ++ " /= " ++ b)

0 comments on commit ade0d93

Please sign in to comment.