[Haskell-cafe] Re: ghc -e with standard input

Maurí­cio briqueabraque at yahoo.com
Tue Nov 6 15:46:56 EST 2007

 >> Actually, what I want is to select a region of
 >> text from emacs and get back the result of that
 >> evaluated as haskell code. So, I need something
 >> that is fast to type
 > M-| xargs ghc -e
 > almost works - but ghc -e evaluates only a single argument, so you
 > need to enclose the region with quotes (and escape any quotes inside
 > it).  A bit of elisp could probably do it fairly easily.

Cool! I tried:

M-| xargs -0 ghc -e

and it worked well in all examples I tried.

Thanks for your tips,

More information about the Haskell-Cafe mailing list