[Haskell-cafe] Testing one's .ghci

gwern0 at gmail.com gwern0 at gmail.com
Sun Jan 27 00:03:07 EST 2008


So I was recently going over my config files (which are version-controlled in Darcs, of course), and I was adding tests for recording patches. For some of the files, it was easy enough - the application generally provided some mean of loading in the rc file and then it would error or not based on whether the file was at least syntactically correct. For example, to test my .emacs, I have 'emacs -batch -f batch-byte-compile ~/.emacs'. If the .emacs won't byte-compile, it probably won't run!

My question is, how many I do the same thing with GHCi? No options specifically for this seem to be listed, and the normal trick doesn't work - I tried:

> ghci -read-dot-ghci -e 'let main = return() in main' && echo foo

And regardless of whether the .ghci had hideous crippling errors in it, at the end "foo" was still merrily being printed out. Does haskell-cafe have any ideas or should I just go file a feature request?

--
gwern
chameleon Vale RSA Recon 1080H beanpole advisors Harvard Texas PARKHILL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080127/92cef593/attachment.bin


More information about the Haskell-Cafe mailing list