I am using ghc-mod in vim and would like GhcModCheck (:GhcModCheck) to be called every time I save a file (:w). Could you please tell me how I can achieve that? I guess there's a more general question: how can I invoke a function on save?
Thank you!