Re: Problems using/installing plugin example
Daniel Vainsencher <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cvs.ghc |
|---|---|
| Message-ID | <[email protected]> |
Trying the same on a completely different machine (7.4.2) just works, so it appears to be an account/machine/version problem. I didn't see anything on the release notes for 7.4.2 that looks relevant, so I'll be guessing an account/machine issue. How can GHC be reporting that CSE.Pass imports CSE.Plugin when it doesn't? What are the account specific variables that might cause CSE/Plugin.hs:6:8: Could not find module `GhcPlugins' It is a member of the hidden package `ghc-7.4.1'. Use -v to see a list of the files searched for. to appear? (since that appears to be the first deviation from normal behavior) I know of the --user package database, I'll try to clear that and retry. Daniel On 11/20/2012 06:58 PM, Daniel Vainsencher wrote: Hi everyone. Trying to write a GHC plugin according to [1], but setup is failing on what seems a standard example [2]. [1] http://hackage.haskell.org/trac/ghc/wiki/NewPlugins [2] https://github.com/thoughtpolice/cse-ghc-plugin Using GHC 7.4.1... 0 $ cabal install cse-ghc-plugin --reinstall Resolving dependencies... In order, the following will be installed: cse-ghc-plugin-0.1.1 (reinstall) Warning: Note that reinstalls are always dangerous. Continuing anyway... Downloading cse-ghc-plugin-0.1.1... Configuring cse-ghc-plugin-0.1.1... Building cse-ghc-plugin-0.1.1... Preprocessing library cse-ghc-plugin-0.1.1... [1 of 2] Compiling CSE.Pass ( CSE/Pass.lhs, dist/build/CSE/Pass.o ) [2 of 2] Compiling CSE.Plugin ( CSE/Plugin.hs, dist/build/CSE/Plugin.o ) Registering cse-ghc-plugin-0.1.1... Installing library in /home/t-davain/.cabal/lib/cse-ghc-plugin-0.1.1/ghc-7.4.1 Registering cse-ghc-plugin-0.1.1... 0 $ ghc -fplugin=CSE.Plugin Test.hs CSE/Plugin.hs:6:8: Could not find module `GhcPlugins' It is a member of the hidden package `ghc-7.4.1'. Use -v to see a list of the files searched for. 0 $ ghc -package ghc -fplugin=CSE.Plugin Test.hs Module imports form a cycle: module `CSE.Pass' (./CSE/Pass.lhs) imports `CSE.Plugin' (./CSE/Plugin.hs) which imports `CSE.Pass' (./CSE/Pass.lhs) 0 $ I don't see that CSE.Pass imports CSE.Plugin anywhere... I note that I needed to pass "-package ghc" to ghc, which the guide [3] does not mention. [3] http://www.haskell.org/ghc/docs/7.4.1/html/users_guide/compiler-plugins.html The --reinstall is because I installed it from source first. Ideas what is wrong? -- Daniel Vainsencher _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc