
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