Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request #25 from tfausak/gh-24-object-equality
Browse files Browse the repository at this point in the history
Remove object equality
  • Loading branch information
tfausak committed Nov 11, 2015
2 parents 787c083 + 91fa419 commit 5b538ff
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/Neon/Types/HasEqual.purs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ foreign import nativeEqualChar :: Char -> Char -> Boolean
foreign import nativeEqualFunction :: forall a b. (a -> b) -> (a -> b) -> Boolean
foreign import nativeEqualInt :: Int -> Int -> Boolean
foreign import nativeEqualNumber :: Number -> Number -> Boolean
foreign import nativeEqualObject :: forall o. Object o -> Object o -> Boolean
foreign import nativeEqualString :: String -> String -> Boolean

-- | Laws:
Expand Down Expand Up @@ -38,9 +37,6 @@ instance intHasEqual :: HasEqual Int where
instance numberHasEqual :: HasEqual Number where
equal x y = nativeEqualNumber x y

instance objectHasEqual :: HasEqual (Object o) where
equal x y = nativeEqualObject x y

instance stringHasEqual :: HasEqual String where
equal x y = nativeEqualString x y

Expand Down
2 changes: 0 additions & 2 deletions src/Neon/Types/Native/HasEqual.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,5 @@ module.exports = {

nativeEqualNumber: equalGeneric,

nativeEqualObject: equalGeneric,

nativeEqualString: equalGeneric
};
1 change: 0 additions & 1 deletion test/Neon/Types/HasEqual.purs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ testHasEqual = do
f == f ==> true
1 == 2 ==> false
1.0 == 1.0 ==> true
{ k: "a" } == { k: "z" } ==> false
"neon" == "neon" ==> true
[pair unit true] == [pair unit true] ==> true

0 comments on commit 5b538ff

Please sign in to comment.