Re: [GHC] #11632: Data.Char repeated readLitChar barfs on output from show "ó1" (was: read (show "ó1") fails)
GHC
ghc-devs at haskell.org
Tue Feb 23 22:02:39 UTC 2016
#11632: Data.Char repeated readLitChar barfs on output from show "ó1"
-------------------------------------+-------------------------------------
Reporter: inversemot | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 7.10.3
Resolution: | Keywords:
Operating System: Linux | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by rwbarton):
* priority: high => normal
@@ -1,5 +1,0 @@
- {{{
- Prelude> let s = "ó1" in read (show s)
- *** Exception: Prelude.read: no parse
- }}}
-
New description:
"ó1" is "\243\&1" and when shown that's `"\"\\243\\&1\""`
{{{#!hs
readLitChar "\"\\243\\&1\"" = [('"', "\\243\\&1\"")]
readLitChar "\\243\\&1\"" = [('\243', "\\&1\"")] --should have consumed
"\\&"
readLitChar "\\&1\"" = []
}}}
--
Comment:
Wait no, I'm wrong. `read (show "ó1")` works fine, I just forgot to ask
for a string.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11632#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list