
#10092: lex doesn't handle binary literals -------------------------------------+------------------------------------- Reporter: | Owner: RyanGlScott | Status: new Type: bug | Milestone: Priority: normal | Version: 7.10.1-rc2 Component: | Operating System: Unknown/Multiple libraries/base | Type of failure: Incorrect result Keywords: | at runtime Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- The {{{lex}}} function from {{{Text.Read.Lex}}} (on which the {{{Read}}} instance for {{{Lexeme}}} is based) can't read binary literals on GHC 7.10.1-rc2: {{{ $ ghci -XBinaryLiterals GHCi, version 7.10.0.20150123: http://www.haskell.org/ghc/ :? for help λ> 0b101010 42 λ> import Text.Read.Lex λ> read "0b101010" :: Lexeme *** Exception: Prelude.read: no parse }}} This should be a simple fix, but I'm not sure if this is the intended behavior or not, since {{{BinaryLiterals}}} isn't a part of the Haskell 2010 standard (and I'm not sure how closely {{{lex}}} adheres to that). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10092 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler