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? > > Yes, it would be a wonderful idea

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 rigth, and I better had just ask

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 coul

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 think that would be a nice thing? Jeff> Yes, it would be a

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
You also need some type of pipe functionality. There is a paper on arrows (by John Hughes?), that seems like it describes a good way to implement pipes in Haskell. -Alex- ___ S. Alexander Jacobson Shop.Com 1-212-69

Re: A Haskell-Shell

1999-08-20 Thread Ronald J. Legere
I am just learning Hugs/Haskell (Thanks for a great book ST!) but already I am using hugs as script writing tool. It occured to me to use it this way when I saw the 'illiterate' program in the hugs manual. By reading in files and using list comprehensions, it seems you express simple file manipul

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 madified since a) it ha