I am Haskell programmer ( I generally implement algorithms in Haskell ) and trying to understand HOOPL library but I am not able to decode it. I don't have compiler background ( currently learning from Coursera and Compilers: Principles, Techniques, and Tools ) and It would be great if you can suggest me a systematic way to proceed for understanding HOOPL library ( what is the prerequisite ). Lets say I have a small Haskell code on which I want to apply data flow optimization using HOOPL
add :: Int -> Int -> Int
add x y = z where
x' = 1
y' = 1 -- this will be dead code elimination
z = x' + 1
How to write HOOPL code to optimise this. It would be great if you can give a bit better example and pardon me if I sound stupid.
A good place to start is pulling the git repo, which has lots of additional files compared to what's on Hackage. Lookin the /testing subdirectory, and you can see some simple code defining a basic imperative language and some optimizations on it.
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