[GHC] #15198: `Language.Haskell.TH.Syntax.reify` returns * rather than Constraint

#15198: `Language.Haskell.TH.Syntax.reify` returns * rather than Constraint -------------------------------------+------------------------------------- Reporter: benzrf | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.4.4 Component: Template | Version: 8.4.2 Haskell | Keywords: reify | Operating System: Linux constraint constraintkinds | Architecture: x86_64 | Type of failure: Incorrect result (amd64) | at runtime Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This module is sufficient to demonstrate the mistake: {{{#!hs {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} module Bug where import Data.Kind import Data.Proxy import Language.Haskell.TH foo :: forall (k :: Constraint). Proxy k foo = Proxy return [] -- delimit declaration groups main :: IO () main = putStrLn $(do VarI _ ty _ <- reify 'foo let p = pprint ty [| p |]) }}} Running this in GHC 8.0.2 correctly prints out `forall (k_0 :: Constraint) . Data.Proxy.Proxy k_0`, but GHC 8.2.2 and 8.4.2 both print `forall (k_0 :: *) . Data.Proxy.Proxy k_0`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15198 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15198: `Language.Haskell.TH.Syntax.reify` returns * rather than Constraint -------------------------------------+------------------------------------- Reporter: benzrf | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.4.4 Component: Template Haskell | Version: 8.4.2 Resolution: | Keywords: reify | constraint constraintkinds Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: Blocked By: 11715 | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * blockedby: => 11715 Comment: This is very likely a manifestation of #11715. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15198#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15198: `Language.Haskell.TH.Syntax.reify` returns * rather than Constraint -------------------------------------+------------------------------------- Reporter: benzrf | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.4.4 Component: Template Haskell | Version: 8.4.2 Resolution: duplicate | Keywords: reify | constraint constraintkinds Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: Blocked By: | Blocking: Related Tickets: #14869 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => duplicate * blockedby: 11715 => * related: => #14869 Comment: Thankfully, this was fixed in GHC HEAD in commit 49ac3f0f2a13f66fea31a258fa98b0de39bfbf10 (Fix #14869 by being more mindful of Type vs. Constraint). See also the `tests/th/T14869` test case. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15198#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC