[GHC] #8807: Variable constraints not handled properly in TH

GHC ghc-devs at haskell.org
Thu Feb 20 04:08:26 UTC 2014


#8807: Variable constraints not handled properly in TH
------------------------------------+-------------------------------------
       Reporter:  goldfire          |             Owner:  goldfire
           Type:  bug               |            Status:  new
       Priority:  normal            |         Milestone:  7.10.1
      Component:  Template Haskell  |           Version:  7.9
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 When I compile

 {{{
 {-# LANGUAGE TemplateHaskell, ConstraintKinds #-}

 module Scratch where

 import Data.Proxy

 foo :: $( [t| a b => Proxy a -> b -> b |] )
 foo = undefined
 }}}

 I get

 {{{
     Illegal type constructor or class name: ‛a’
     When splicing a TH type:
       forall a_0 b_1 . a_0 b_1 => Data.Proxy.Proxy a_0 -> b_1 -> b_1
     In the splice: $([t| a b => Proxy a -> b -> b |])
 }}}

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


More information about the ghc-tickets mailing list