[Haskell-cafe] ANN: scion 0.1

Thomas Schilling nominolo at googlemail.com
Thu Aug 27 05:44:32 EDT 2009

On 27 Aug 2009, at 09:17, Johan Tibell wrote:

> Hi Thomas,
> This is really cool stuff. I played with it this morning and found a
> potential bug. Both the emacs and vim client libraries refer to the
> binary "scion_server" but the binary that gets built and put in
> ~/.cabal/bin is called "scion-server" (note the dash). I worked around
> the problem by putting this in my .emacs:

Right, I changed that before the release and apparently forgot to  
change a few places.  Will be fixed in the next minor version.

> (setq scion-program "scion-server")
> Also, I tried to play with the scion-open-cabal-project function. I'm
> not sure I understand how it's intended to be used. Does it make sure
> that if you compile a file using C-c C-x C-l the right source
> directories are used? Could you give a usage example?

I eventually want to get rid of it and let scion-load figure out  
itself when the project needs to be reconfigured.  At the moment you  
have to delete the .dist-scion directory if you changed your .cabal  
file. :/

> One problem I frequently have with emacs-mode is that you can't use it
> to load a file if
>  * your sources don't live in the same directory as the Cabal file, or

Actually, the latest version of haskell-mode has some heuristics.  It  
sets the working directory to where the .cabal file lives.

>  * the file needs preprocessing (e.g. it's a .hsc) file.
> Now when we have the Cabal file loaded would it be possible to have
> Cabal compile the project and then try to load the .hs file generated
> from the .hsc file that is currently opened?

Right, so those files should be generated, but it's quite difficult to  
update them automatically and recompile the necessary files.  Also,  
some preprocessers don't add the proper {-# LINE #-} markers, so the  
error messages will be all wrong.

So, I think it should work this way:  User opens a .hsc / .y / .x  
file, Scion figures out that the file needs preprocessing, loads the  
generated file and highlights the error messages and highlights them  
in the original file.

> Thanks!
> -- Johan

/ Thomas
Push the envelope.  Watch it bend.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090827/4c345863/PGP.bin

More information about the Haskell-Cafe mailing list