Strategy for desugaring Haskell
        Posted  
        
            by 
                luqui
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by luqui
        
        
        
        Published on 2010-12-29T02:24:40Z
        Indexed on 
            2010/12/29
            5:54 UTC
        
        
        Read the original article
        Hit count: 262
        
I'm developing a virtual machine for purely functional programs, and I would like to be able to test and use the the wide variety of Haskell modules already available. The VM takes as input essentially terms in the untyped lambda calculus. I'm wondering what would be a good way to extract such a representation from modern Haskell modules (eg. with MPTC's, pattern guards, etc.). I did a little research and there doesn't seem to be a tool that does this already (I would be delighted to be mistaken), and that's okay. I'm looking for an approach.
GHC Core seems too operationally focused, especially since one of the things the VM does is to change the evaluation order significantly. Are there any accessible intermediate representations that correspond more closely to the lambda calculus?
© Stack Overflow or respective owner