[GHC] #11484: Type synonym using -XTypeInType can't be spliced with TH

GHC ghc-devs at haskell.org
Sun Apr 3 23:45:09 UTC 2016


#11484: Type synonym using -XTypeInType can't be spliced with TH
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  8.0.1-rc1
      Resolution:                    |             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:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 (1) is fixed now. `Any` no longer appears in the error message, which is
 good, but now it fails with a different error message:

 {{{
 $ /opt/ghc/8.0.1/bin/ghci
 GHCi, version 8.0.0.20160330: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/ryanglscott/.ghci
 λ> :set -XTemplateHaskell -XTypeInType -ddump-splices
 λ> import Data.Kind
 λ> data X; $([d| type TySyn2 (k :: *) (a :: k) = () |])
 <interactive>:3:11-51: Splicing declarations
     [d| type TySyn2_a1aV (k_a1aW :: *) (a_a1aX :: k_a1aW) = () |]
   ======>
     type TySyn2_a5hC (k_a5hD :: Type) (a_a5hE :: k_a5hD) = ()

 <interactive>:3:11: error:
     • Invalid declaration for ‘TySyn2’; you must explicitly
       declare which variables are dependent on which others.
       Inferred variable kinds:
         k_a5hD :: Type
         a_a5hE :: k
     • In the type synonym declaration for ‘TySyn2’
 }}}

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


More information about the ghc-tickets mailing list