X-Git-Url: http://gitweb.michael.orlitzky.com/?p=hath.git;a=blobdiff_plain;f=src%2FMaskbits.hs;h=5eb7649972a29b18e760c693351258a7bed8330b;hp=51701f562276ece9cc216a0d9cb649624ff7fe1c;hb=cca5aba75c313151878a98344c289827c94151e7;hpb=a5dfa1fd4dde2d79f42c606a56b4aea303d273e8 diff --git a/src/Maskbits.hs b/src/Maskbits.hs index 51701f5..5eb7649 100644 --- a/src/Maskbits.hs +++ b/src/Maskbits.hs @@ -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')]