[Haskell-cafe] Re: develop new Haskell shell?
u.stenzel at web.de
Fri May 12 12:10:41 EDT 2006
Ben Rudiak-Gould wrote:
> My reaction to this thread is the same as Donn Cave's: even after reading
> through the whole thread, I don't understand what a Haskell shell is
> supposed to be.
I'd like one as a scripting environment, a bit like scsh, just strongly
typed and easier on the eyes. Haskell as interactive shell would be a
nightmare indeed, having to type 'system "foo"' instead of simply 'foo'
for everyday commands just won't cut it.
On the other hand, as soon as a script has at least some programming
logic in it, bash (or anything similar) soon becomes a huge PITA. Just
think of all the different quotes and how difficult it is to write a
script that doesn't go bonkers if it encounters a filename with a space
in it (or a parenthesis, a bracket, an asterisk or anything of a myriad
special chars I forgot). Haskell shines here; in a combinator library
no quoting is necessary and the typechecker will detect most blunders in
the equivalent code.
Besides, Cabal could benefit from a good file manipulation library, as
could a lot of other programs.
> I long ago wrote a Perl script to do a far
> more general form of the renaming example you gave above.
So did I, but I don't want to experience that ever again. Anyway, for
complex renaming, there's always mmv.
> On the other hand, I'm entirely in favor of extending Haskell with
> functions like glob :: String -> IO [String]. That would be useful.
Yes, of course. More specific types would be a good thing, though.
Representing both file names and globs by strings will soon reproduce
the mess of quote chars that makes sh such a bad programming language.
It is explained that all relationships require a little give and take. This is
untrue. Any partnership demands that we give and give and give and at the last,
as we flop into our graves exhausted, we are told that we didn't give enough.
-- Quentin Crisp, "How to Become a Virgin"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20060512/5355b636/attachment-0001.bin
More information about the Haskell-Cafe