Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Eq instances for Js Nums.

  • Loading branch information...
commit ade0d93a641b94c41ea4b88bc2435b085c7c2ae0 1 parent c0cebd0
Sebastiaan Visser authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/Lang/JavaScript.hs
4 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)
Please sign in to comment.
Something went wrong with that request. Please try again.