lunes, 27 de junio de 2011

Cabal editor, HLint suggestions

The past week I've continued learning about Eclipse and integrating more Haskell tools in it. The final result is that now you can edit simple Cabal files graphically and run HLint on your code automatically. I'll add some screenshots of this:

The Overview page in the graphical Cabal editor has been renamed to Package and now contains almost all general information about a package that you can modify in a Cabal file. In particular, I've added support for a list of tested-with compilers, different build types and a tree to select if you want files from your project inside the data-files property, which you can later access programatically.


You can also configure your Haskell programs via the Executables page. From here, you can change the dependencies, the source directories and the module which will act as main. Extra options for GHC can also be provided from here.


Of course, the Dependencies part uses the information from the Haskell Browser to allow you to navigate through your list of installed packages and read the documentation for them.


The Library page is almost identical to the Executables one. The only important difference is that, instead of a Main list, you get a check-list of Exposed modules.
The main feature from Cabal which is not available here is the use of configuration flags. This is mostly due to the fact that I cannot come with a good user interface for that matter, and haven't found nothing in other similar projects.

The HLint integration is mostly invisible to the programmer until there is some suggestion, which will be shown in the editor and the Problems view as the rest of warnings from the compiler.


If you already have a Haskell project in EclipseFP and want to get this functionality, apart from installing the latest version of EclipseFP from GitHub, you need to add the HLint Builder to the list of builders that will be run automatically.

Last but not least, I spent one day making easier for the user to use the Haskell Browser. As with scion-server, now scion-browser comes bundled with the Eclipse plug-in, and is compiled and installed automatically.

1 comentario: