[GHC] #15843: Tuple sections can't be quoted

GHC ghc-devs at haskell.org
Thu Nov 1 21:40:05 UTC 2018


#15843: Tuple sections can't be quoted
-------------------------------------+-------------------------------------
           Reporter:  mpickering     |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.6.1
           Keywords:  newcomer       |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 There are quite a few forms that are not supported in template haskell
 quotes. It seems that it would be at least a good warm up patch to add
 support for tuple sections which you can do simply by desugaring to a
 lambda and the normal tuple constructor.

 {{{
 {-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE TupleSections #-}
 module Foo where

 foo = [|| (,5) ||]
 }}}

 1. Modify `DsMeta.repE` to handle tuple sections. You can desugar `(,5) =>
 `\x -> (x, 5)`.
 2. Add the above test to the test suite.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15843>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list