[GHC] #10444: Tex.Read.Lex.lex broken
#10444: Tex.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: ekmett Type: bug | Status: new Priority: normal | Milestone: Component: Core | Version: 7.10.1 Libraries | Operating System: Unknown/Multiple Keywords: | Type of failure: Incorrect result Architecture: | at runtime Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- {{{ Prelude> lex "&) = mempty" [("&",") = mempty")] Prelude> lex "∘) = mempty" [] }}} I traced this problem to Text.Read.Lex.lex -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Tex.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: ekmett Type: bug | Status: new Priority: normal | Milestone: Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by mfdyck.google): I have a patch for this but I need Google to release it; asking -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Tex.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: ekmett Type: bug | Status: patch Priority: normal | Milestone: Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by mfdyck.google): * status: new => patch -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Tex.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: ekmett Type: bug | Status: patch Priority: normal | Milestone: Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by mfdyck.google): * cc: mfdyck@… (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Tex.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: ekmett Type: bug | Status: patch Priority: normal | Milestone: 7.12.1 Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by simonpj): * milestone: => 7.12.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Tex.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: ekmett Type: bug | Status: patch Priority: normal | Milestone: 7.12.1 Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by rwbarton): * cc: hvr (added) Comment: Hi, I agree that this is a deviation from the Report-specified behavior of lex, since ∘ is a Unicode symbol character; and thanks for the patch. However, we generally try fairly hard not to introduce new boot files in base. ccing hvr, who is most likely to know off-hand: can this import cycle be worked around easily (probably by moving `isPunctuation` and `isSymbol` into `GHC.Unicode`)? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Tex.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: ekmett Type: bug | Status: patch Priority: normal | Milestone: 7.12.1 Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by mfdyck.google): isPunctuation and isSymbol are defined in terms of GeneralCategory, which derives Read, and GHC.Read imports Text.Read.Lex. We could move GeneralCategory and generalCategory to GHC.Unicode and standalone derive Read instance in GHC.Read or Data.Char; acceptable? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Tex.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: ekmett Type: bug | Status: patch Priority: normal | Milestone: 7.12.1 Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by rwbarton): Replying to [comment:6 mfdyck.google]:
isPunctuation and isSymbol are defined in terms of GeneralCategory, which derives Read, and GHC.Read imports Text.Read.Lex.
Ah, gotcha.
We could move GeneralCategory and generalCategory to GHC.Unicode and standalone derive Read instance in GHC.Read or Data.Char; acceptable?
Probably more acceptable than the boot file; I'll defer to hvr on this subject though. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Tex.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: ekmett Type: bug | Status: patch Priority: normal | Milestone: 7.12.1 Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: | Phab:D1122. -------------------------------------+------------------------------------- Changes (by bgamari): * differential: => Phab:D1122. Comment: I have opened Phab:D1122 to track an updated version of this patch. The refactoring of `GeneralCategory` is tracked in Phab:D1121. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Text.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: ekmett Type: bug | Status: patch Priority: normal | Milestone: 7.12.1 Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: | Phab:D1122. -------------------------------------+------------------------------------- Description changed by bgamari: Old description:
{{{ Prelude> lex "&) = mempty" [("&",") = mempty")] Prelude> lex "∘) = mempty" [] }}}
I traced this problem to Text.Read.Lex.lex
New description: {{{ Prelude> lex "&) = mempty" [("&",") = mempty")] Prelude> lex "∘) = mempty" [] }}} I traced this problem to Text.Read.Lex.lex -- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Text.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: ekmett Type: bug | Status: patch Priority: normal | Milestone: 7.12.1 Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: | Phab:D1122. -------------------------------------+------------------------------------- Comment (by Austin Seipp <austin@…>): In [changeset:"e4a73f4fa1cc9681aee3ce13ee15073deed54635/ghc" e4a73f4f/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="e4a73f4fa1cc9681aee3ce13ee15073deed54635" Move GeneralCategory et al to GHC.Unicode This allows these to be used from Text.Read.Lex import cycles. Reviewed By: thomie, austin Differential Revision: https://phabricator.haskell.org/D1121 GHC Trac Issues: #10444 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Text.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: Type: bug | Status: patch Priority: normal | Milestone: 8.0.1 Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: | Phab:D1122. -------------------------------------+------------------------------------- Changes (by mfdyck.google): * Attachment "0001-unbreak-Text.Read.Lex.lex.3.patch" added. Behave as GHC lexer -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Text.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: Type: bug | Status: patch Priority: normal | Milestone: 8.0.1 Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1122, Wiki Page: | Phab:D1480. -------------------------------------+------------------------------------- Changes (by mfdyck.google): * cc: ekmett (added) * differential: Phab:D1122. => Phab:D1122, Phab:D1480. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:13> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Text.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: Type: bug | Status: patch Priority: normal | Milestone: 8.0.1 Component: Core Libraries | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1122, Wiki Page: | Phab:D1480. -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"fce04651f2389d59b3355c67d9e189c62969ac76/ghc" fce0465/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="fce04651f2389d59b3355c67d9e189c62969ac76" Unbreak Text.Read.Lex.lex on Unicode symbols Reviewers: thomie, hvr, austin, bgamari Reviewed By: bgamari Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D1480 GHC Trac Issues: #10444 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:14> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Text.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Core Libraries | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1122, Wiki Page: | Phab:D1480. -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:15> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10444: Text.Read.Lex.lex broken -------------------------------------+------------------------------------- Reporter: strake888 | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Core Libraries | Version: 7.10.1 Resolution: fixed | Keywords: report-impact Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1122, Wiki Page: | Phab:D1480. -------------------------------------+------------------------------------- Changes (by ekmett): * keywords: => report-impact -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10444#comment:16> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC