Skip to content

Instantly share code, notes, and snippets.

@tizoc
Created March 21, 2014 21:59
Show Gist options
  • Save tizoc/9697388 to your computer and use it in GitHub Desktop.
Save tizoc/9697388 to your computer and use it in GitHub Desktop.
class Eq a where
(==) :: a -> a -> Bool
(/=) :: a -> a -> Bool
x /= y = not (x == y)
instance Eq Integer where
x == y = compareIntegers x y
instance Eq Float where
x == y = compareFloats x y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment