[GHC] #12407: Template Haskell thinks an unboxed tuple name is illegal to splice in

#12407: Template Haskell thinks an unboxed tuple name is illegal to splice in -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.0.2 Component: Template | Version: 8.0.1 Haskell | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC rejects Unknown/Multiple | valid program Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UnboxedTuples #-} module Bug where import Language.Haskell.TH.Lib import Language.Haskell.TH.Syntax $(do let ubxTup = conT (unboxedTupleTypeName 2) `appT` conT ''Int `appT` conT ''Int x <- newName "x" y <- newName "y" [d| f :: $(ubxTup) -> $(ubxTup) f $(conP (unboxedTupleDataName 2) [varP x, varP y]) = $(conE (unboxedTupleDataName 2) `appE` varE x `appE` varE y) |]) }}} {{{ $ /opt/ghc/8.0.1/bin/ghc Bug.hs [1 of 1] Compiling Bug ( Bug.hs, Bug.o ) Bug.hs:8:3: error: Illegal type constructor or class name: ‘(#,#)’ When splicing a TH declaration: f_0 :: GHC.Tuple.(#,#) GHC.Types.Int GHC.Types.Int -> GHC.Tuple.(#,#) GHC.Types.Int GHC.Types.Int }}} Patch coming soon. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12407 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12407: Template Haskell thinks an unboxed tuple name is illegal to splice in -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: patch Priority: normal | Milestone: 8.0.2 Component: Template Haskell | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2410 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D2410 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12407#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12407: Template Haskell thinks an unboxed tuple name is illegal to splice in
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner:
Type: bug | Status: patch
Priority: normal | Milestone: 8.0.2
Component: Template Haskell | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2410
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott

#12407: Template Haskell thinks an unboxed tuple name is illegal to splice in -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: merge Priority: normal | Milestone: 8.0.2 Component: Template Haskell | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2410 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: patch => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12407#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12407: Template Haskell thinks an unboxed tuple name is illegal to splice in -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: merge Priority: normal | Milestone: 8.0.2 Component: Template Haskell | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: th/T12407 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2410 Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => th/T12407 Comment: Thanks Ryan. Don't forget to fill in the test casel field on the ticket. (I have done so.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12407#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12407: Template Haskell thinks an unboxed tuple name is illegal to splice in -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.2 Component: Template Haskell | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: th/T12407 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2410 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-8.0` as 422ed83c210e83acbd8f6b64ba725964d726f10a. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12407#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC