Workaround for Geany comment toggling in Haskell source files

Published:  2016-07-05
Status:      finished

The Geany shortcut Ctrl e to toggle single line comments is useful. For some reason the inserted comment characters for Haskell, .hs, files include a trailing tilde, producing --~. Unfortunately the compiler (GHC) does not seem to like the ~ character following the comment characters.

A workaround is to edit filetypes.haskell located in /usr/share/geany/. I found adding a single space at the end of the line comment_single=-- did the trick. Now Ctrl e inserts -- ~. The compiler is happy and comment toggling works.