[Haskell-cafe] ANNOUNCE: bash script for haskell

James Crayne jim.crayne at gmail.com
Fri Feb 6 01:00:50 UTC 2015


Sorry to reply to myself, but actually passwords on the command line are
never secure. The secure thing is to use a file descripter to input that
information such as STDIN. Thus this is not really a failing of hk.

On Thu, Feb 5, 2015 at 7:35 PM, James Crayne <jim.crayne at gmail.com> wrote:

> Note the hk script gives you a richer default environment, including
> System.Environment and a bunch of other commonly used modules.
>
> Also, some magic to sort of detect what you want, in the case of whether
> you give it a pure function vs an IO etc. For one offs on the command line,
> a slightly less picky type check seems to make sense in my opinion. In the
> case that it doesn't work, it lets you edit the script in a text editor,
> there by showing you what the real haskell looks like.
>
> Not that I am especially proud, the implementation could be cleaned up a
> lot I am sure, but the user interface is failry nice I think.
>
> One caveat I probably should mention in the README but didn't, is that
> your script is copied to a file stored under /tmp, so you don't want to put
> passwords or anything of that matter in it.
>
>
>
> On Thu, Feb 5, 2015 at 6:46 PM, Tom Ellis <
> tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk> wrote:
>
>> On Fri, Feb 06, 2015 at 12:42:14AM +0100, Peter Simons wrote:
>> > This announcement left me totally amazed at the realization that neither
>> > "runhaskell" nor "ghci" seem to have a command-line option equivalent to
>> > "-c" in Bourne shell.
>> >
>> > Am I missing something terribly obvious?
>>
>> How about
>>
>>   ghc -e 'do { putStrLn "What is your name?"; name <- getLine; putStrLn $
>> "Hello " ++ name }'
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20150205/7b951258/attachment.html>


More information about the Haskell-Cafe mailing list