[GHC] #13781: (a :: (k :: Type)) is too exotic for Template Haskell

GHC ghc-devs at haskell.org
Fri Jun 2 21:54:37 UTC 2017


#13781: (a :: (k :: Type)) is too exotic for Template Haskell
-------------------------------------+-------------------------------------
           Reporter:  RyanGlScott    |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Template       |           Version:  8.0.1
  Haskell                            |
           Keywords:  TypeInType     |  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:
-------------------------------------+-------------------------------------
 On GHC 8.0.1 or later, GHC will choke on this code:

 {{{#!hs
 {-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE TypeInType #-}
 module Bug where

 import Data.Kind
 import Data.Proxy

 $([d| f :: Proxy (a :: (k :: Type))
       f = Proxy
     |])
 }}}

 {{{
 GHCi, version 8.2.0.20170522: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/rgscott/.ghci
 [1 of 1] Compiling Bug              ( Bug.hs, interpreted )

 Bug.hs:8:3: error:
     Exotic form of kind not (yet) handled by Template Haskell
       (k :: Type)
   |
 8 | $([d| f :: Proxy (a :: (k :: Type))
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
 }}}

 I don't think this would be too hard to support, though. I'll take a shot
 at fixing this.

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


More information about the ghc-tickets mailing list