Hi Csaba,The transformations you described already exist as core simplifier passes. For custom compilation, you may write your own pass using the core plugin mechanism, see https://downloads.haskell.org/~ghc/latest/docs/html/users_ guide/extending_ghc.html# compiler-plugins It's also possible to perform transformations on STG, but it takes extra effort to retrieve/transform the in-memory STG representations, and type safety is also not guaranteed.Regards,Shao ChengOn Tue, Apr 10, 2018 at 2:51 AM, Csaba Hruska <csaba.hruska@gmail.com> wrote:______________________________CsabaThanks,Is it possible to use GHC simplifier to transform the parsed Haskell source to supercombinators? i.e. to doHello,I wonder what is the easiest way to compile Haskell to supercombinators (top level functions) using GHC as a library.Or should it be written from scratch?
- eta expansion
- closure conversion
- lambda lifting
Is Core or STG suited better for this purpose?_________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-caf e
Only members subscribed via the mailman list are allowed to post.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell- cafe
Only members subscribed via the mailman list are allowed to post.