#9204: Conflicting definition in hs-boot file -------------------------------------+------------------------------------ Reporter: Feuerbach | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: Component: Documentation | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by goldfire): * owner: => goldfire * component: Compiler => Documentation Comment: Replying to [comment:1 Feuerbach]:
If I add a role annotation to the hs-boot file, this works
Yes, that's the solution. .
My guess is that since the hs-boot doesn't have the information about the data constructors, it cannot infer the phantom role of the parameter.
Yes. As documented [http://www.haskell.org/ghc/docs/latest/html/users_guide/separate- compilation.html#mutual-recursion here], in the last bullet point before 4.7.10, role inference in hs-boot files defaults to representational, the most common case.
Still, I wish I didn't have to deal with this. But if this isn't possible, at least the error message should suggest adding the role annotation to the hs-boot file.
Yes, absolutely. I will fix in due course, and clarify some of this in the manual as well. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9204#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler