[Haskell-cafe] Haskell mode for emacs - some questions

Jules Bean jules at jellybean.co.uk
Tue Jun 19 03:57:37 EDT 2007


peterv wrote:
> And when I will me using HopenGL, I will want performance, as I will be
> doing experiments with particle systems, 3D rendering, etc. Basically the
> stuff I did for many years but now using Haskell :)
> 
> Having to do anything more than hitting a key to compile and run an
> application would simple be unacceptable from the point of view of an imp/OO
> developer (all imp/OO IDEs have that). Furthermore, when programming
> videogames or special effects, you have to run and test a lot, because what
> you see on screen usually 
> determines your next actions. 

I don't disagree that this should be possible. If you hit C-h f compile 
then you can read the documentation for the built-in compile command. By 
default this runs make, because many code projects especially in the 
unix world use make as their build system, but you can customise this.

On the other hand a simple haskell project doesn't have any way of 
indicating which is the 'main' file (indeed most of my haskell projects 
with more than one file have more than one 'main' file with different 
purposes) so it's not immediately obvious which arguments to give to ghc 
--make.  I suspect that this itch is just not sufficiently important to 
most haskell-mode users, since the alternatives (C-c C-l, C-x b M-p 
<RET>, or alt-tab <up> <ret>) [*] work so well.

Incidentally I've developed using HOpenGL in ghci with no problem. The 
performance is not really an issue: only the 'current file' is 
interpreted, all other files are used compiled, and in any case most of 
the CPU usage is in the (compiled) GL libraries of your system.

Jules

* C-x b M-p <RET> being 'switch to your shell buffer, select previous 
command and re-run it', since your previous command is obviously ghc 
--make foo.hs && ./foo.  Alt-tab <up> <ret> is the same thing except it 
switches to a non-emacs shell window using your window manager, if you 
don't like using emacs shells :)



More information about the Haskell-Cafe mailing list