[GHC] #15243: -ddump-splices shenanigans: promoted tycons aren't ticked

GHC ghc-devs at haskell.org
Thu Jun 7 14:57:47 UTC 2018


#15243: -ddump-splices shenanigans: promoted tycons aren't ticked
-------------------------------------+-------------------------------------
           Reporter:  RyanGlScott    |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:  Compiler       |           Version:  8.4.3
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Consider the following program with a type family that contains four
 different promoted (i.e., ticked) type constructors:

 {{{#!hs
 {-# LANGUAGE DataKinds #-}
 {-# LANGUAGE PolyKinds #-}
 {-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# OPTIONS_GHC -ddump-splices #-}
 module Bug where

 data Unit = Unit

 $([d| type family F (a :: k) :: k where
         F 'Unit = 'Unit
         F '(,)  = '(,)
         F '[]   = '[]
         F '(:)  = '(:)
     |])
 }}}
 {{{
 $ /opt/ghc/8.4.3/bin/ghci Bug3.hs
 GHCi, version 8.4.3: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/rgscott/.ghci
 [1 of 1] Compiling Bug              ( Bug3.hs, interpreted )
 Bug3.hs:(10,3)-(15,6): Splicing declarations
     [d| type family F_a1xJ (a_a1xL :: k_a1xK) :: k_a1xK where
           F_a1xJ  'Unit =  'Unit
           F_a1xJ  '(,) =  '(,)
           F_a1xJ '[] = '[]
           F_a1xJ  '(:) =  '(:) |]
   ======>
     type family F_a49g (a_a49i :: k_a49h) :: k_a49h where
       F_a49g Unit = Unit
       F_a49g GHC.Tuple.(,) = GHC.Tuple.(,)
       F_a49g '[] = '[]
       F_a49g (GHC.Types.:) = (GHC.Types.:)
 Ok, one module loaded.
 }}}

 The `-ddump-splices` output is quite strange: `'[]` is ticked, but the
 other three are not! This seems off.

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


More information about the ghc-tickets mailing list