[GHC] #9518: Improve error message for unacceptable role annotations

#9518: Improve error message for unacceptable role annotations -------------------------------------+------------------------------------- Reporter: dmcclean | Owner: Type: feature request | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.8.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- It would be nice if this message: {{{ Role mismatch on variable a: Annotation says representational but role nominal is required while checking a role annotation for `Point' }}} Could be extended to say where the requirement arises. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9518 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9518: Improve error message for unacceptable role annotations -------------------------------------+------------------------------------- Reporter: dmcclean | Owner: Type: feature | Status: new request | Milestone: Priority: low | Version: 7.8.3 Component: Compiler | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by simonpj): Can you give a concrete example? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9518#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9518: Improve error message for unacceptable role annotations -------------------------------------+------------------------------------- Reporter: dmcclean | Owner: Type: feature | Status: infoneeded request | Milestone: Priority: low | Version: 7.8.3 Component: Compiler | Keywords: (Type checker) | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => infoneeded * component: Compiler => Compiler (Type checker) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9518#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9518: Improve error message for unacceptable role annotations -------------------------------------+------------------------------------- Reporter: dmcclean | Owner: Type: feature | Status: infoneeded request | Milestone: Priority: low | Version: 7.8.3 Component: Compiler | Keywords: (Type checker) | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by dmcclean): I'm sorry guys, I haven't been haskelling much in the last couple of months. I can't remember how to construct an example, in part because I am still confused by what the rules are, which is why I had trouble interpreting the original error message. To elaborate on what I find confusing about it, I think that it would help if it said *where* `a` was used in a context that required a nominal type role, in the same way that some of the other type error messages do. Annotation says representation but role nominal is required, arising from use of (type constructor) in the type expression (...) at (...) I have a terrible headache or I would research the rules again to figure out how to write a program that produces this error on purpose. I'll attempt it tomorrow if there's time. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9518#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9518: Improve error message for unacceptable role annotations -------------------------------------+------------------------------------- Reporter: dmcclean | Owner: Type: feature | Status: infoneeded request | Milestone: Priority: low | Version: 7.8.3 Component: Compiler | Keywords: newcomer (Type checker) | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by goldfire): * keywords: => newcomer Comment: This is appropriate for a newcomer to GHC, but who has a decent understanding of roles. I am happy to advise. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9518#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9518: Improve error message for unacceptable role annotations -------------------------------------+------------------------------------- Reporter: dmcclean | Owner: Type: feature request | Status: infoneeded Priority: low | Milestone: Component: Compiler (Type | Version: 7.8.3 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * keywords: newcomer => Comment: goldfire: I'm removing the newcomer keyword from this ticket, as it didn't see any takers in 15 months. It might be too difficult or uninteresting, but please put the keyword back if you disagree. By keeping the newcomers list fresh, I hope we will see newcomer activity pick up a little. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9518#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC