[GHC] #10703: -fth-dec-file can't handle lambdas

#10703: -fth-dec-file can't handle lambdas -------------------------------------+------------------------------------- Reporter: Fabian | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Other Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #10701 Differential Revisions: | -------------------------------------+------------------------------------- {{{#!hs instance Data.TH.Object.Object InputDropboxFiles String Language.JavaScript.Interpret.Primitive where toObject x@(InputDropboxFiles {}) = fromList (Data.Maybe.catMaybes [Just (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr) "root" (inputDropboxFilesRoot x)), Just (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr) "path" (inputDropboxFilesPath x)), fmap (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr) "rev") (inputDropboxFilesRev x), Just (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr) "access_token" (inputDropboxFilesAccess_token x))]) }}} {{{#!hs (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr)) "root" (inputDropboxFilesRoot x) }}} should be {{{#!hs ((\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr))) "root" (inputDropboxFilesRoot x) }}} ie. the lambda needs parentheses around it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10703 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10703: -fth-dec-file can't handle lambdas -------------------------------------+------------------------------------- Reporter: Fabian | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: #10701 | Differential Revisions: -------------------------------------+------------------------------------- Old description:
{{{#!hs instance Data.TH.Object.Object InputDropboxFiles String Language.JavaScript.Interpret.Primitive where toObject x@(InputDropboxFiles {}) = fromList (Data.Maybe.catMaybes [Just (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr) "root" (inputDropboxFilesRoot x)), Just (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr) "path" (inputDropboxFilesPath x)), fmap (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr) "rev") (inputDropboxFilesRev x), Just (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr) "access_token" (inputDropboxFilesAccess_token x))]) }}}
{{{#!hs (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr)) "root" (inputDropboxFilesRoot x) }}}
should be
{{{#!hs ((\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr))) "root" (inputDropboxFilesRoot x) }}}
ie. the lambda needs parentheses around it.
New description: {{{#!hs instance Data.TH.Object.Object InputDropboxFiles String Language.JavaScript.Interpret.Primitive where toObject x@(InputDropboxFiles {}) = fromList (Data.Maybe.catMaybes [Just (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr) "root" (inputDropboxFilesRoot x)), Just (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr) "path" (inputDropboxFilesPath x)), fmap (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr) "rev") (inputDropboxFilesRev x), Just (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr) "access_token" (inputDropboxFilesAccess_token x))]) }}} {{{#!hs (\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr) "root" (inputDropboxFilesRoot x)) }}} should be {{{#!hs ((\ k_axsq v_axsr -> (k_axsq, Data.TH.Convert.convert v_axsr)) "root" (inputDropboxFilesRoot x)) }}} ie. the lambda needs parentheses around it. -- Comment (by rwbarton): Edited to what I think you meant. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10703#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10703: -fth-dec-file can't handle lambdas -------------------------------------+------------------------------------- Reporter: Fabian | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: #10701 | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Fabian): Replying to [comment:1 rwbarton]:
Edited to what I think you meant.
Yes thanks -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10703#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10703: -fth-dec-file can't handle lambdas -------------------------------------+------------------------------------- Reporter: Fabian | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: #10701 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by Fabian): * Attachment "Test10702.hs" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10703 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10703: -fth-dec-file can't handle lambdas -------------------------------------+------------------------------------- Reporter: Fabian | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: #10701 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by goldfire): * component: Compiler => Template Haskell * milestone: => 7.12.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10703#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10703: -fth-dec-file can't handle lambdas -------------------------------------+------------------------------------- Reporter: Fabian | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: #10701 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * cc: GregWeber (added) Comment: Fabian: if you change your test to not depend on any external libraries, that would be great. The problem is we can't put it in the testsuite ''as is''. cc GregWeber, who implemented this feature recently. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10703#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10703: -fth-dec-file can't handle lambdas -------------------------------------+------------------------------------- Reporter: Fabian | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: #10701 | Differential Revisions: -------------------------------------+------------------------------------- Comment (by GregWeber): This probably indicates a general problem with TH pretty-printing. Is the problem the same with -ddump-splices ? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10703#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

This probably indicates a general problem with TH pretty-printing. Is
#10703: -fth-dec-file can't handle lambdas -------------------------------------+------------------------------------- Reporter: Fabian | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: #10701 | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Fabian): Replying to [comment:5 GregWeber]: the problem the same with -ddump-splices ? Yes, I have updated the test with output from both -dth-dec-file and -ddump-splices -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10703#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10703: -fth-dec-file can't handle lambdas -------------------------------------+------------------------------------- Reporter: Fabian | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: #10701 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by Fabian): * Attachment "Test10702.hs" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10703 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

Fabian: if you change your test to not depend on any external libraries,
#10703: -fth-dec-file can't handle lambdas -------------------------------------+------------------------------------- Reporter: Fabian | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: #10701 | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Fabian): Replying to [comment:4 thomie]: that would be great. The problem is we can't put it in the testsuite ''as is''.
cc GregWeber, who implemented this feature recently.
Done -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10703#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10703: -fth-dec-file can't handle lambdas -------------------------------------+------------------------------------- Reporter: Fabian | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: #10701 | Differential Revisions: -------------------------------------+------------------------------------- Comment (by thomie): Great. To summarize, the output of `ghc -ddump-splices Test10702.hs` is: {{{ instance Read Name where readsPrec x = \ k_a46F v_a46G -> undefined "test" "test2" }}} And it should be: {{{ instance Read Name where readsPrec x = (\ k_a46F v_a46G -> undefined) "test" "test2" }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10703#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10703: -fth-dec-file can't handle lambdas -------------------------------------+------------------------------------- Reporter: Fabian | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: #10701 #10603 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * related: #10701 => #10701 #10603 Comment: This is being worked on in #10603. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10703#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10703: -fth-dec-file can't handle lambdas -------------------------------------+------------------------------------- Reporter: Fabian | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Template Haskell | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: #10701 #10603 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed Comment: This should be fixed along with #10603. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10703#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC