[Haskell-cafe] [OT?] Haskell-inspired functions for BASH

Gwern Branwen gwern0 at gmail.com
Tue Apr 6 11:56:23 EDT 2010

On Tue, Apr 6, 2010 at 11:17 AM, Stephen Tetley
<stephen.tetley at gmail.com> wrote:
> On 6 April 2010 15:09, Mario Blažević <mblazevic at stilo.com> wrote:
>>        A question of my own: is there any written design (an academic paper
>> would be perfect) of a functional shell language?
> Olin Shivers has written a detailed paper on Scsh.
> ftp://www-swiss.ai.mit.edu/pub/su/scsh/scsh-paper.ps
> The link might be down permanently (it is for me at the moment), maybe
> the paper is on Citeseer or similar. There is also the Scsh manual.
> Best wishes
> Stephen

The Scsh manual is worth reading just for the introductory material.

Part of the problem is that both Clean and Scheme have relatively easy
and powerful 'eval' ability. (Esther exploits the interesting feature
of Clean that lets you serialize functions to disk.)

Haskell doesn't, so much. The GHC API isn't too great to work with
here; it's hard enough to evaluate straight Haskell fragments, and to
serve as a shell, you really need new syntax; for example, you want
literals for program names. (Who would use a shell which forces you to
write 'run "ghci" ["foo.lhs"]', instead of 'ghci foo.lhs'?) But many
filenames break in Haskell; 'ssh-agent', 'g++-4.4', 'bf_tar', etc.


More information about the Haskell-Cafe mailing list