MarcWeber / hasktags

Produces ctags "tags" and etags "TAGS" files for Haskell programs
Other
127 stars 32 forks source link

on any input: "Prelude.head: empty list" #4

Closed BurntSushi closed 10 years ago

BurntSushi commented 10 years ago

Here's a simple example:

[andrew@Liger haskell] cat simple.hs 
module Main where

main :: IO ()
main = putStrLn "Hello, world!"

[andrew@Liger haskell] hasktags simple.hs 
hasktags: Prelude.head: empty list

Luke Palmer's hothasktags seems to output something reasonable for the same source:

[andrew@Liger haskell] hothasktags simple.hs 
Main    simple.hs       1;"     file:simple.hs
main    simple.hs       4;"     file:simple.hs
simple.hs       simple.hs       1;"     file:simple.hs

I'm using version 0.68.3. I tried building from source using commit 2ee4517, but I get an error:

[andrew@Liger hasktags] cabal build
cabal: hasktags.cabal:54: Parse of field 'build-depends' failed.
[andrew@Liger hasktags] cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library

Thanks!

MarcWeber commented 10 years ago

I know that there is a bug, I hit it, too. Just didn't get around fixing it. Thanks for sending me that simple testcase.. I'll add it to the test suite. I'll take care soon

MarcWeber commented 10 years ago

Would you mind giving the last commit a try?

BurntSushi commented 10 years ago

I'm still getting an error from cabal:

[andrew@Liger hasktags] git log --pretty=oneline -n 1
aecc32cf7065e269e8f26cb218d346a031dd9adf fix default hssuffixes - why did this break?
[andrew@Liger hasktags] cabal build
cabal: hasktags.cabal:55: Parse of field 'build-depends' failed.
[andrew@Liger hasktags] cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library

Any ideas?

BurntSushi commented 10 years ago

(Sorry about the close/open, hit the wrong button.)

MarcWeber commented 10 years ago

Don't worry. I've pushed another fix some minutes later, just drop the trailing , in that build-depends list

BurntSushi commented 10 years ago

Awesome. Works! Thanks. :-) (I missed that damn trailing comma...)