[Haskell-cafe] Re: ghc -e with standard input
>> 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, Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: ghc -e with standard input
Maurício <[EMAIL PROTECTED]> writes: > 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. -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: ghc -e with standard input
On Nov 6, 2007, at 0:48 , Maurí cio wrote: Brandon S. Allbery KF8NH escreveu: On Nov 6, 2007, at 0:16 , Maurí cio wrote: 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, since I'll use it all the time. Maybe I should learn how to write a small shell script that in turn would call xargs ghc. You might want to take a look at Shim: http://shim.haskellco.de/ trac/ Both 'shim.haskellco.de/trac' and 'shim.haskellco.de' says "500 Internal Server Error". Just 'haskellco.de' says "Nothing to see here - move along". What was I supposed to see there? Huh, that's unfortunate. The code is on http://code.haskell.org/shim at least. Shim is a small external program and a collection of elisp which adds "live" typechecking and expression evaluation (among other things) to Emacs haskell-mode. I didn't have much luck with it myself, but I use xemacs instead of FSF and Shim (and, for that matter, haskell- mode!) don't play well with xemacs. (the README still references the URL I gave you, so maybe this is a temporary outage...) -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED] electrical and computer engineering, carnegie mellon universityKF8NH ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: ghc -e with standard input
Brandon S. Allbery KF8NH escreveu: On Nov 6, 2007, at 0:16 , Maurí cio wrote: 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, since I'll use it all the time. Maybe I should learn how to write a small shell script that in turn would call xargs ghc. You might want to take a look at Shim: http://shim.haskellco.de/trac/ Both 'shim.haskellco.de/trac' and 'shim.haskellco.de' says "500 Internal Server Error". Just 'haskellco.de' says "Nothing to see here - move along". What was I supposed to see there? Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: ghc -e with standard input
On Nov 6, 2007, at 0:16 , Maurí cio wrote: 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, since I'll use it all the time. Maybe I should learn how to write a small shell script that in turn would call xargs ghc. You might want to take a look at Shim: http://shim.haskellco.de/trac/ -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED] electrical and computer engineering, carnegie mellon universityKF8NH ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: ghc -e with standard input
>>> Hi, >>> >>> Is there a way to run 'ghc -e' taking input >>> from standard input? (...) >>It seems to me that you can use getContents, >>et. al., as you would from any other Haskell >>program: (...) > hm, which raises the question of exactly what > Maurício meant. (...) > 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, since I'll use it all the time. Maybe I should learn how to write a small shell script that in turn would call xargs ghc. Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe