hasktags icon indicating copy to clipboard operation
hasktags copied to clipboard

-o- oddity

Open joeyh opened this issue 2 years ago • 0 comments

hasktags . -o-
hasktags: <stdout>: hPutStr: illegal operation (handle is closed)

This is surprising and seems broken. I eventually figured out that, since hasktags defaults to generating both ctags and etags (-b is default), with -o- it first outputs one, and then tries to output the other. Apparently the output of the first ends by closing stdout, so the output of the second one fails.

The workaround is to use -c or -e. But I think it would probably make sense to make -b not be the default when using -o. As it is, -o foo first writes the ctags to foo, then overwrites that file with the etags.

joeyh avatar Mar 24 '22 17:03 joeyh