<div dir="ltr"><div><div>Oh, thank you, Sir, for pointing that out.<br><br></div>I was aware of this hackish vim-script. I even tried to use that but fell into lots of corner cases and dropped. It does not handle inter-package dependencies, haskell language extensions, different code or sandbox layout.<br>
</div><div><div class="gmail_extra">Although currently it has limitations (locked to particular ghc and cabal versions) I personally find it way more easy to use.<br></div><div class="gmail_extra">I believe, with release of GHC-7.8, Cabal-1.18 will become ubiquitous, bringing sandbox support out of the box. With evolving of the compiler I do not see why dev tools shouldn't evolve too. If someone uses cabal-dev, I would happy to see him adding support for it to hdevtools. BTW, cabal-dev just changes the sandbox layout, other things are left unchanged, so you can still benefit from having cabal support in hdevtools. You just need to pass location of cabal-dev sandboxed package db explicitly (via "-g" option).<br>
<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 21, 2014 at 2:11 PM, Daniel Trstenjak <span dir="ltr"><<a href="mailto:daniel.trstenjak@gmail.com" target="_blank">daniel.trstenjak@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Hi Maxim,<br>
<div class=""><br>
> I'm pretty new to Haskell, but was doing Haskell development for<br>
> several month. I'm fan of Vim editor and was happy to find out that<br>
> there are good tools to support Haskell development with Vim, e.g.<br>
> vim-hdevtools. But it turned out that it not of much use in my project<br>
> where we rely on Cabal packages and sandboxes.<br>
<br>
</div><div class="">You don't need to modify hdevtools to get support for cabal sandboxes.<br>
But you have to tell hdevtools the position of the package database of<br>
the cabal sandbox.<br>
<br>
<br>
For vim you could use something like:<br>
<br>
function! s:FindCabalSandbox()<br>
let l:sandbox = finddir('.cabal-sandbox', './;')<br>
let l:absSandbox = fnamemodify(l:sandbox, ':p')<br>
return l:absSandbox<br>
endfunction<br>
<br>
function! s:FindCabalSandboxPackageConf()<br>
return glob(s:FindCabalSandbox() . '*-packages.conf.d')<br>
endfunction<br>
<br>
function! s:HaskellSourceDir()<br>
return fnamemodify(s:FindCabalSandbox(), ':h:h') . '/src'<br>
endfunction<br>
<br>
let g:hdevtools_options = '-g-package-conf=' . s:FindCabalSandboxPackageConf()<br>
let g:hdevtools_options .= ' ' . '-g-i' . s:HaskellSourceDir()<br>
<br>
<br>
This also assumes, that your Haskell source code is contained in a<br>
directory named 'src' which lies in the same directory then your<br>
projects cabal file.<br>
<br>
<br>
Using hdevtools this way is more generic than modify it, because this<br>
solution also works for cabal-dev or any other package database.<br>
<br>
<br>
Greetings,<br>
Daniel<br>
</div>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div></div></div>