Permalink
Browse files

Read -arch KEYWORDS too

  • Loading branch information...
1 parent 6bc8e8f commit 8a4bfa74dcedf4f990bee126728f66f6318b9328 @kolmodin kolmodin committed Feb 25, 2009
Showing with 7 additions and 1 deletion.
  1. +7 −1 Main.hs
View
@@ -117,19 +117,25 @@ b <-> n = b ++ '-':n
-- Arches
-----------------------------------------------------------------------
-data Arch = Stable String | Masked String deriving (Eq,Show)
+data Arch
+ = Stable String
+ | Masked String
+ | Unavailable String deriving (Eq,Show)
fromArch (Stable a) = a
fromArch (Masked a) = a
+fromArch (Unavailable a) = a
toArch str =
case str of
('~':arch) -> Masked arch
+ ('-':arch) -> Unavailable arch
_ -> Stable str
sameArch a b = (fromArch a) == (fromArch b)
showArch (Stable a) = a
showArch (Masked a) = '~' : a
+showArch (Unavailable a) = '-' : a
instance Ord Arch where
compare a b = compare (fromArch a) (fromArch b)

0 comments on commit 8a4bfa7

Please sign in to comment.