[GHC] #14843: Can't splice a partially applied PromoteTupleT type from Template Haskell

#14843: Can't splice a partially applied PromoteTupleT type from Template Haskell -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Template | Version: 8.2.2 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 DataKinds #-} {-# LANGUAGE TemplateHaskell #-} module Bug where import Language.Haskell.TH.Syntax type T1 = $(return (PromotedTupleT 2)) type T2 = $([t| '(,) |]) type T3 = $(return (PromotedT (tupleDataName 2))) }}} The splices for `T2` and `T3` both work. However, the splice for `T1` causes Template Haskell to have a conniption: {{{ $ /opt/ghc/8.2.2/bin/ghci Bug.hs GHCi, version 8.2.2: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci [1 of 1] Compiling Bug ( Bug.hs, interpreted ) Bug.hs:7:13: error: • Malformed type PromotedTupleT 2 When splicing a TH type: '(,) • In the untyped splice: $(return (PromotedTupleT 2)) | 7 | type T1 = $(return (PromotedTupleT 2)) | ^^^^^^^^^^^^^^^^^^^^^^^^^ }}} Patch incoming. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14843 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14843: Can't splice a partially applied PromoteTupleT type from Template Haskell -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Template Haskell | Version: 8.2.2 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:D4442 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D4442 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14843#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14843: Can't splice a partially applied PromoteTupleT type from Template Haskell
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Template Haskell | Version: 8.2.2
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:D4442
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#14843: Can't splice a partially applied PromoteTupleT type from Template Haskell -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Template Haskell | Version: 8.2.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: T14843 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4442 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * testcase: => T14843 * resolution: => fixed * milestone: => 8.6.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14843#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC