RE: GhcPlugin-writing and "finding things"

2014-07-25 Thread Simon Peyton Jones
Philip You are right: there are some missing pieces. * First you need to ask where your plugin's special library module "Foo" is in the file system. This is what findImportedModule is for, and it seems quite reasonable. However, it (or some variant) should be available to you in CoreM. * Next

RE: GhcPlugin-writing and "finding things"

2014-07-24 Thread p.k.f.holzenspies
hilip > -Original Message- > From: xicheko...@gmail.com [mailto:xicheko...@gmail.com] On Behalf Of > Andrew Farmer > Sent: woensdag 23 juli 2014 19:22 > To: Holzenspies, P.K.F. (EWI) > Cc: glasgow-haskell-users@haskell.org > Subject: Re: GhcPlugin-writing and &quo

Re: GhcPlugin-writing and "finding things"

2014-07-23 Thread Andrew Farmer
Have you considered using HERMIT for this? I think this is a rough approximation of what you are trying to do (using HERMIT): import HERMIT.Plugin import HERMIT.Dictionary plugin = hermitPlugin $ \ opts -> firstPhase $ run $ tryR $ innermostR $ promoteBindR compileFooBindR compileFooBindR :: Rew