X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FOctet.hs;h=6d6c8c85f79265ab95eb6013082a8ef61c4af5ee;hb=fe04fa7a5572f7bf46dacb960d82da3f2a2c44cf;hp=c472f8da6e8c85552c32256f5409e0daeb86c5b8;hpb=45ac9baca360d0f0dabe4576fb44c1634a50dbf7;p=hath.git diff --git a/src/Octet.hs b/src/Octet.hs index c472f8d..6d6c8c8 100644 --- a/src/Octet.hs +++ b/src/Octet.hs @@ -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.