[Haskell-cafe] UPDATE: haskellmode for Vim now at
projects.haskell.org (+screencast; -)
Matthijs Kooijman
matthijs at stdin.nl
Tue Apr 7 08:29:07 EDT 2009
Hi Claus,
I've installed the vimball, and it spit a few errors at me. In particular, it
couldn't find the haddock documentation directory. A quick look at
haskell_doc.vim shows that it should autodetect the directory. However, for
some reason my ghc-pkg command returns the doc directory twice:
$ ghc-pkg field base haddock-html
haddock-html: /usr/local/ghc-6.10.1/share/doc/ghc/libraries/base
haddock-html: /usr/local/ghc-6.10.1/share/doc/ghc/libraries/base
The haskell_doc.vim contains the following line, which seems to deal with
multiple lines:
let field = substitute(system(g:ghc_pkg . ' field base haddock-html'),'\n','','')
However, this simply concats the lines, which obviously makes a mess of the
output and makes the detection fail. I've made things work by throwing away
everything except for the first line, by replacing the above line with:
let field = substitute(system(g:ghc_pkg . ' field base haddock-html'),'\n.*','','')
This solution works for me, though it might be better to iterate all lines and
try each of them in turn, for the case that ghc-pkg returns different paths? I
can't really think of a case why this would be needed, though.
Gr.
Matthijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090407/a4f98433/attachment.bin
More information about the Haskell-Cafe
mailing list