Minor changes

master
Abhinav Sarkar 2016-04-19 23:41:32 +05:30
parent 248672bdb2
commit 0071c7d718
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ newtype Digit = Digit { getIntOfDigit :: Int } deriving (Show, Eq, Ord)
charToDigit :: Char -> Maybe Digit
charToDigit c =
if Char.isDigit c then Just $ Digit (Char.digitToInt c) else Nothing
if Char.isDigit c then Just . Digit . Char.digitToInt $ c else Nothing
digitParser :: Parser String Digit
digitParser = Parser $ \i -> case i of