开发者

Supero (Haskell supercompiler) usage?

I'm having a look at this project http://community.haskell.org/~ndm/supero/

I have downloaded and compiled the program, and could use it on the included samples. But I tried it on my source code and it looks like the program only understands a subset of Haskell.

I got something like this:

supercompiler: Unhandled fromDecl: PatBind (SrcLoc {srcFilename = "unknown.hs", srcLine = 15, srcColumn = 1}) (PTuple [PVar (Ident "width"),PVar (Ident "height")]) Nothing (UnGuardedRhs (Tuple [Lit (Int 7),Lit (Int 6)])) (BDecls [])

The code is available here https://github.com/phuc/Score4-haskell/blob/master/Main.hs

How do I get GHC to outputs the kind of Haskell t开发者_JAVA技巧hat Supero understands?

Thank you very much.


The slides here seem to suggest that it is first run through Yhc, then transformed into an intermediate form HILL (First order Haskell Intermediate Little Language - see slides), and then, finally, the analysis can be done.

Another slideshow provides this diagram:

Supero (Haskell supercompiler) usage?


As I understand it, the current version of Supero only handles a subset of Haskell described in the ICFP 2010 paper.

The previous version did integrate with the YHC pipeline and could handle a larger subset. This was quite a while back and the compilation of YHC itself is pretty soul destroying. I wouldn't recommend it.

Max Bolingbroke is currently integrating his own supercompiler into GHC. However, I can't see the code on his GitHub repository so it might not yet be ready for public consumption.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜