Created
March 9, 2013 15:07
-
-
Save eagletmt/5124447 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/autoload/necoghc.vim b/autoload/necoghc.vim | |
index 9b43ec8..d1d35e6 100644 | |
--- a/autoload/necoghc.vim | |
+++ b/autoload/necoghc.vim | |
@@ -202,9 +202,17 @@ function! s:get_modules() "{{{ | |
endfunction "}}} | |
function! s:ghc_mod(cmd) "{{{ | |
+ let l:cmd = 'ghc-mod -g -package -g ghc ' . a:cmd | |
lcd `=expand('%:p:h')` | |
- let l:ret = system('ghc-mod -g -package -g ghc ' . a:cmd) | |
+ let l:ret = system(l:cmd) | |
lcd - | |
+ let l:logs = [] | |
+ let l:logfile = 'system.log' | |
+ if filereadable(l:logfile) | |
+ let l:logs = readfile(l:logfile) | |
+ endif | |
+ let l:logs += [l:cmd, l:ret] | |
+ call writefile(l:logs, l:logfile) | |
return split(l:ret, '\n') | |
endfunction "}}} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment