Created
September 6, 2009 07:40
-
-
Save javascripter/181701 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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