[GHC] #10703: -fth-dec-file can't handle lambdas
GHC
ghc-devs at haskell.org
Tue Jul 28 20:16:25 UTC 2015
#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
More information about the ghc-tickets
mailing list