Skip to content

Instantly share code, notes, and snippets.

@javascripter
Created September 6, 2009 07:40
Show Gist options
  • Save javascripter/181701 to your computer and use it in GitHub Desktop.
Save javascripter/181701 to your computer and use it in GitHub Desktop.
data Rank = S | A | B | C | D | E | F
deriving (Eq, Show)
instance Ord Rank where
S > S = False
S > _ = True
_ > S = False
x > y = (show x) < (show y) -- A < Z in ASCII Code.
x <= y = not $ x > y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment