combine writeHaskell and writeBinding