#3843: Merge plugins into HEAD
---------------------------------+------------------------------------------
Reporter: dreixel | Owner: simonpj
Type: task | Status: new
Priority: normal | Milestone: 7.2.1
Component: Compiler | Version: 6.13
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by batterseapower):
simon: I've restored the home-package plugin support. This is basically
just the ability to write:
{{{
{-# OPTIONS_GHC -fplugin Foo #-}
module Bar
...
}}}
And then if you use ghc --make on Bar.hs Foo.hs, will be compiled if is
not already. Have a look at e49dae36a00b2af8f6ad583dd24f9bacf5711242 if
you want to see what is required.
~~~
thoughtpolice: As I thought, linking is not working properly: see the
newly-commited test plugins06. In this test, the plugin seqs the static
flags, which provokes the error:
{{{
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 7.1.20110630 for i386-apple-darwin):
Static flags have not been initialised!
Please call GHC.newSession or GHC.parseStaticFlags early enough.
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
This is because a new instance of the GHC package has been loaded, which
does not have its staticFlags initialised since it does not share state
with the initial copy.
The fix is to do export-dynamic and change Linker.hs to get ghc package
symbols from the current executable (which is what I did in my original
patch), or use dynamic linking for the ghc package in which case
everything will work.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3843#comment:32>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs