Re: A Haskell-Shell

1999-08-24 Thread Heribert Schuetz
Hi, my patch for the use of `popen' is just an ad-hoc solution (aka hack) that might be useful for people trying to do some shell-scripting in hugs, before anything more fundamental becomes available. The security problem (thanks to Fergus Henderson and Carl Witty for pointing it out) must be dea

Re: A Haskell-Shell

1999-08-24 Thread Hannah Schroeter
Hello! On Tue, Aug 24, 1999 at 03:41:18AM +1000, Fergus Henderson wrote: > [...] > This is a convenient hack, but IMHO it is not suitable for inclusion > in the Haskell standard library, because it increases the risk of > security holes in Haskell applications. I agree. I don't like that simila

Re: A Haskell-Shell

1999-08-24 Thread Fergus Henderson
On 21-Aug-1999, Heribert Schuetz <[EMAIL PROTECTED]> wrote: > The appended patch to Hugs98 (to be applied in the src subdirectory) > might be of some help for those who want to do shell scripting in > Haskell. It modifies IO.openFile as follows: > > - If the name of a file opened in ReadMode ends

Re: A Haskell-Shell

1999-08-23 Thread Keith Wansbrough
> And there is _no_ handle to the output of the command! An obvious hack is > to use redirecting; here is how you implement a simple date function in > Haskell: > > date :: IO String > date = > do system "date > /tmp/answer" >readFile "/tmp/answer" > [..] > I implemented these fu

Re: A Haskell-Shell

1999-08-23 Thread Carl R. Witty
Heribert Schuetz <[EMAIL PROTECTED]> writes: > Hi, > > The appended patch to Hugs98 (to be applied in the src subdirectory) > might be of some help for those who want to do shell scripting in > Haskell. It modifies IO.openFile as follows: > > - If the name of a file opened in ReadMode ends in "

Re: A Haskell-Shell

1999-08-23 Thread Grigoriy Strokin
On Fri, 20 Aug 1999, Jeff Burdges wrote: > > Just wondering if someone uses Hugs for writing Unix-Shell Scripts. Or > > what would you think about a Haskell-Shell. SCSH (a Scheme-Shell) > > brought me on that idea. Don't you think that would be a nice thing? > >

Re: A Haskell-Shell

1999-08-21 Thread Will Partain
Jim Mattson's "Haskell shell" may still be distributed as misc/examples/hsh/Hsh.hs in GHC. I include what I believe to be a reasonably current (1997) version below. Will Peter Hancock <[EMAIL PROTECTED]> wrote: I found an old (and stale) URL http://www.dcs.gla.ac.uk/~mattson/Hsh.html">Unix sh

Re: A Haskell-Shell

1999-08-21 Thread Heribert Schuetz
Hi, The appended patch to Hugs98 (to be applied in the src subdirectory) might be of some help for those who want to do shell scripting in Haskell. It modifies IO.openFile as follows: - If the name of a file opened in ReadMode ends in "|", then the part before the "|" is considered a program a

Re: A Haskell-Shell

1999-08-21 Thread Friedrich Dominicus
Koen Claessen wrote: > > Hello, > > | Just wondering if someone uses Hugs for writing Unix-Shell Scripts. Or > | what would you think about a Haskell-Shell. > > These are two quite separate issues of course. I can comment on the first > one. > Of course you'

Re: A Haskell-Shell

1999-08-20 Thread Koen Claessen
Hello, | Just wondering if someone uses Hugs for writing Unix-Shell Scripts. Or | what would you think about a Haskell-Shell. These are two quite separate issues of course. I can comment on the first one. A while ago, we had a discussion among some Haskell hackers here at Chalmers how we

Re: A Haskell-Shell

1999-08-20 Thread Marko Schuetz
>>>>> "Jeff" == Jeff Burdges <[EMAIL PROTECTED]> writes: >> Just wondering if someone uses Hugs for writing Unix-Shell Scripts. Or >> what would you think about a Haskell-Shell. SCSH (a Scheme-Shell) >> brought me on that idea. Don't you thi

Re: A Haskell-Shell

1999-08-20 Thread Peter Hancock
I found an old (and stale) URL http://www.dcs.gla.ac.uk/~mattson/Hsh.html">Unix shell in GHC which may be relevant to this thread. As I dimly recall it was a few screenfulls of code, and only a "proof of concept". Perhaps one can find a non-stale link by a web search? -- Peter

Re: A Haskell-Shell

1999-08-20 Thread S. Alexander Jacobson
-697-0184 voiceThe Easiest Way To Shop On 20 Aug 1999, Marko Schuetz wrote: > >>>>> "Jeff" == Jeff Burdges <[EMAIL PROTECTED]> writes: > > >> Just wondering if someone uses Hugs for writing Unix-Shell Scripts. Or > >> wha

Re: A Haskell-Shell

1999-08-20 Thread Ronald J. Legere
imple file manipulation programs easily. A shell would be awesome! On Fri, 20 Aug 1999, Friedrich Dominicus wrote: > Just wondering if someone uses Hugs for writing Unix-Shell Scripts. Or > what would you think about a Haskell-Shell. SCSH (a Scheme-Shell) > brought me on that idea. Don't

Re: A Haskell-Shell

1999-08-20 Thread Jeff Burdges
> Just wondering if someone uses Hugs for writing Unix-Shell Scripts. Or > what would you think about a Haskell-Shell. SCSH (a Scheme-Shell) > brought me on that idea. Don't you think that would be a nice thing? Yes, it would be a wonderful idea.. but Hugs would need to be madifi

A Haskell-Shell

1999-08-20 Thread Friedrich Dominicus
Just wondering if someone uses Hugs for writing Unix-Shell Scripts. Or what would you think about a Haskell-Shell. SCSH (a Scheme-Shell) brought me on that idea. Don't you think that would be a nice thing? Regards Friedrich