]> gitweb.michael.orlitzky.com - hath.git/blobdiff - src/Octet.hs
Simplify Read instance code.
[hath.git] / src / Octet.hs
index c472f8da6e8c85552c32256f5409e0daeb86c5b8..6d6c8c85f79265ab95eb6013082a8ef61c4af5ee 100644 (file)
@@ -136,15 +136,15 @@ instance Enum Octet where
 
 
 instance Read Octet where
-  readsPrec _ = \s ->
+  readsPrec _ s =
     case (reads s :: [(Int, String)]) of
       []              -> []
       (x,leftover):_  -> go x leftover
     where
       go :: Int -> String -> [(Octet, String)]
-      go y s
-        | y < minBound || y > maxBound = []
-        | otherwise = [(toEnum y, s)]
+      go x' leftover'
+        | x' < minBound || x' > maxBound = []
+        | otherwise = [(toEnum x', leftover')]
 
 
 -- Test lists.