#3377: [Patch] Support Python-style tuple sections
---------------------------------+------------------------------------------
Reporter: batterseapower | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.4
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Comment (by NeilMitchell):
It should be noted that Python style tuple sections are slightly
different, in Python (1,) is the 1-element tuple. This patch doesn't
implement that, but instead the reasonably sensible generalisation:
{{{(a,,c,) ==> \b d -> (a,b,c,d)}}}
I really like this feature, I often do {{{map ((,) 1) xs}}} or {{{map (\x
-> (1,x)) xs}}}, both of which are a bit too clunky. This feature would
fix both of them.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3377#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs