
#10077: Providing type checker plugin on command line results in false cyclic import error -------------------------------------+------------------------------------- Reporter: jbracker | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.11 checker) | Keywords: Resolution: | typechecker plugin cycle imports Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect | (amd64) warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by jbracker): Replying to [comment:5 adamgundry]:
To try to clarify: it's not exactly true that the plugin needs to be **imported** into a module that uses it, although I believe the implementation works more-or-less like that, with some cleverness to avoid e.g. typeclass instances being brought in. The point is that if module `M` uses a plugin in module `P`, then we have to dynamically load `P` in order to typecheck `M`. Hence `P` cannot depend (directly or indirectly) on `M`!
When `-fplugin=P` is used on the command-line, GHC tries to load `P` for every module being compiled, which might include `P` itself. This isn't exactly a cyclic import, but it's pretty close.
Maybe a link to this ticket, in case someone wants to know more about
Thank you for the clarification. I understand now. the issue?
Yes. Done.
Thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10077#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler