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 that 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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With