[Haskell-cafe] Which is the most "hackable" compiler?

Ben Lippmeier benl at ouroborus.net
Sun Aug 14 03:06:42 UTC 2016


> On 14 Aug 2016, at 12:53 PM, amindfv at gmail.com wrote:
> 
> GHC compiler plugins may also be what you're looking for.
> 
> Also, does ghc not compile core files anymore? It used to; you can always use an older ghc version.

IIRC GHC once could produce external core files, but it was never able to parse them back. The support rotted, so it was removed a few years ago. 

The way GHC is engineered makes it difficult/impossible for core-to-core plugins to introduce names into the core file that were not already present. Plugins can *rearrange* code that contains existing identifiers, but once the front-end type checker/desugarer is finished there isn’t an easy way to load more interface files to get at other names of things. This was the state of GHC in 2013 when I was working on the Repa plugin [1], it might have changed since then.

Ben.

[1]  https://hackage.haskell.org/package/repa-plugin <https://hackage.haskell.org/package/repa-plugin>





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160814/e46421f4/attachment.html>


More information about the Haskell-Cafe mailing list