]> gitweb.michael.orlitzky.com - hath.git/blobdiff - src/Maskbits.hs
Simplify Read instance code.
[hath.git] / src / Maskbits.hs
index 51701f562276ece9cc216a0d9cb649624ff7fe1c..5eb7649972a29b18e760c693351258a7bed8330b 100644 (file)
@@ -118,12 +118,12 @@ instance Arbitrary Maskbits where
 
 
 instance Read Maskbits where
-  readsPrec _ = \s ->
+  readsPrec _ s =
     case (reads s :: [(Int, String)]) of
       []              -> []
       (x,leftover):_  -> go x leftover
     where
       go :: Int -> String -> [(Maskbits, String)]
-      go y s
-        | y < minBound || y > maxBound = []
-        | otherwise = [(toEnum y, s)]
+      go x' leftover'
+        | x' < minBound || x' > maxBound = []
+        | otherwise = [(toEnum x', leftover')]