module Maskbits
( Maskbits(..),
+ decrement,
maskbits_from_string
) where
case (reads s :: [(Int, String)]) of
[] -> None
x:_ -> maskbits_from_int (fst x)
+
+
+
+decrement :: Maskbits -> Maskbits
+decrement None = None
+decrement Zero = None
+decrement One = Zero
+decrement Two = One
+decrement Three = Two
+decrement Four = Three
+decrement Five = Four
+decrement Six = Five
+decrement Seven = Six
+decrement Eight = Seven
+decrement Nine = Eight
+decrement Ten = Nine
+decrement Eleven = Ten
+decrement Twelve = Eleven
+decrement Thirteen = Twelve
+decrement Fourteen = Thirteen
+decrement Fifteen = Fourteen
+decrement Sixteen = Fifteen
+decrement Seventeen = Sixteen
+decrement Eighteen = Seventeen
+decrement Nineteen = Eighteen
+decrement Twenty = Nineteen
+decrement TwentyOne = Twenty
+decrement TwentyTwo = TwentyOne
+decrement TwentyThree = TwentyTwo
+decrement TwentyFour = TwentyThree
+decrement TwentyFive = TwentyFour
+decrement TwentySix = TwentyFive
+decrement TwentySeven = TwentySix
+decrement TwentyEight = TwentySeven
+decrement TwentyNine = TwentyEight
+decrement Thirty = TwentyNine
+decrement ThirtyOne = Thirty
+decrement ThirtyTwo = ThirtyOne