[GHC] #14141: Custom type errors don't trigger when matching on a GADT constructor with an error in the constraint

#14141: Custom type errors don't trigger when matching on a GADT constructor with an error in the constraint -------------------------------------+------------------------------------- Reporter: Darwin226 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Keywords: | Operating System: Windows Architecture: x86_64 | Type of failure: GHC accepts (amd64) | invalid program Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The following code fails to compile (as it should) {{{#!hs data D where A :: C => D type family C :: Constraint where C = 'True ~ 'False f :: D -> () f A = () }}} with the error "Couldn't match type 'True with 'False". This code, however, does compile without an issue: {{{#!hs data D where A :: C => D type family C :: Constraint where C = TypeError ('Text "error") f :: D -> () f A = () }}} I feel that this is a bug. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14141 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14141: Custom type errors don't trigger when matching on a GADT constructor with an error in the constraint -------------------------------------+------------------------------------- Reporter: Darwin226 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: | Keywords: | CustomTypeErrors Operating System: Windows | Architecture: x86_64 Type of failure: GHC accepts | (amd64) invalid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Darwin226): * keywords: => CustomTypeErrors -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14141#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14141: Custom type errors don't trigger when matching on a GADT constructor with an error in the constraint -------------------------------------+------------------------------------- Reporter: Darwin226 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.2 checker) | Keywords: Resolution: | CustomTypeErrors Operating System: Unknown/Multiple | Architecture: x86_64 Type of failure: GHC accepts | (amd64) invalid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * os: Windows => Unknown/Multiple * component: Compiler => Compiler (Type checker) Comment: Thanks for the report, reclassifying it as this isn't a Windows specific error and I'm not too familiar with this feature. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14141#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14141: Custom type errors don't trigger when matching on a GADT constructor with an error in the constraint -------------------------------------+------------------------------------- Reporter: Darwin226 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.2 checker) | Keywords: Resolution: | CustomTypeErrors Operating System: Unknown/Multiple | Architecture: x86_64 Type of failure: GHC accepts | (amd64) invalid program | Test Case: Blocked By: | Blocking: Related Tickets: #11503 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * related: => #11503 Comment: I think this ticket is #11503 in disguise (or at least shares a symptom with it). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14141#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC