[GHC] #7910: ConstraintKinds and reifyInstances

#7910: ConstraintKinds and reifyInstances ----------------------------------------+----------------------------------- Reporter: elliottt | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.3 | Keywords: ConstraintKinds, TemplateHaskell Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Incorrect result at runtime | Blockedby: Blocking: | Related: ----------------------------------------+----------------------------------- reifyInstances doesn't appear to know how to deal with a constraint that is just an alias. For example, the following prints (True,False): {{{ {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TemplateHaskell #-} import Language.Haskell.TH import Language.Haskell.TH.Syntax class C a instance C Int type D a = C a main = print $( do isCInst <- isInstance ''C [ConT ''Int] isDInst <- isInstance ''D [ConT ''Int] lift (isCInst,isDInst)) }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7910 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7910: ConstraintKinds and reifyInstances ----------------------------------------+----------------------------------- Reporter: elliottt | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.7 | Keywords: ConstraintKinds, TemplateHaskell Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Incorrect result at runtime | Blockedby: Blocking: | Related: ----------------------------------------+----------------------------------- Changes (by elliottt): * version: 7.6.3 => 7.7 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7910#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7910: ConstraintKinds and reifyInstances
----------------------------------------+-----------------------------------
Reporter: elliottt | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.7 | Keywords: ConstraintKinds, TemplateHaskell
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: Incorrect result at runtime | Blockedby:
Blocking: | Related:
----------------------------------------+-----------------------------------
Comment(by simonpj@…):
commit 672553ee9b995e2bc22e5c40c73189f85058bd00
{{{
Author: Simon Peyton Jones

#7910: ConstraintKinds and reifyInstances ------------------------------------------+--------------------------------- Reporter: elliottt | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: ConstraintKinds, TemplateHaskell Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Incorrect result at runtime | Difficulty: Unknown Testcase: th/T7901 | Blockedby: Blocking: | Related: ------------------------------------------+--------------------------------- Changes (by simonpj): * status: new => closed * difficulty: => Unknown * resolution: => fixed * testcase: => th/T7901 Comment: Good point thank you! There's a slight question about the "right" behaviour here (i.e. maybe you *really* want to look up instances for D), but I think you are right that the more permissive behaviour is more convenient and useful. So I've done that. Simon -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7910#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC