Skip to content

[wip] Remove inferred cabal include paths #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions autoload/ghcmod.vim
Original file line number Diff line number Diff line change
Expand Up @@ -246,27 +246,6 @@ endfunction "}}}

function! ghcmod#build_command(args) "{{{
let l:cmd = ['ghc-mod']

let l:dist_top = s:find_basedir() . '/dist'
let l:sandboxes = split(glob(l:dist_top . '/dist-*', 1), '\n')
for l:dist_dir in [l:dist_top] + l:sandboxes
let l:build_dir = l:dist_dir . '/build'
if isdirectory(l:build_dir)
call ghcmod#add_autogen_dir(l:build_dir, l:cmd)

let l:tmps = ghcmod#util#globlist(l:build_dir . '/*/*-tmp')
if !empty(l:tmps)
" add *-tmp directory to include path for executable project
for l:tmp in l:tmps
call extend(l:cmd, ['-g', '-i' . l:tmp, '-g', '-I' . l:tmp])
endfor
else
" add build directory to include path for library project
call extend(l:cmd, ['-g', '-i' . l:build_dir, '-g', '-I' . l:build_dir])
endif
endif
endfor

if exists('b:ghcmod_ghc_options')
let l:opts = b:ghcmod_ghc_options
else
Expand Down