1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00
This commit is contained in:
Patrick Thomson 2018-04-04 15:41:21 -04:00
parent faf246ff1e
commit e44b8dfb46

View File

@ -53,7 +53,7 @@ parser = signed (choice [hex, oct, bin, dec]) where
fromIntegral <$> attempt @Integer (unpack ("0o" <> digs)) fromIntegral <$> attempt @Integer (unpack ("0o" <> digs))
-- The case for binary literals is somewhat baroque. Despite having binary literal support, Integer's -- The case for binary literals is somewhat baroque. Despite having binary literal support, Integer's
-- Read instance does not handle binary literals. So we have to shell out to Numeric.readInt, which is -- Read instance does not handle binary literals. So we have to shell out to Numeric.readInt, which
-- is a very strange API, but works for our use case. The use of 'error' looks partial, but if Attoparsec -- is a very strange API, but works for our use case. The use of 'error' looks partial, but if Attoparsec
-- and readInt do their jobs, it should never happen. -- and readInt do their jobs, it should never happen.
bin = do bin = do