[Haskell-beginners] Just wanted to share some GHCI macros with fellow beginners
Andrew Bernard
andrew.bernard at gmail.com
Sat Oct 1 10:42:47 UTC 2016
Hi Boon,
What's wrong with these?
> :!pwd
> :!git
Andrew
On 1 October 2016 at 14:54, Lai Boon Hui <laiboonh at gmail.com> wrote:
> Hi fellow beginners,
>
> wanted to share some macros you can add to your ghci config file so that
> you don't have to keep switching between ghci and command line. In my case
> i use Git a lot
>
> :def pwd (\_-> System.Directory.getCurrentDirectory >>= print >> return "")
> :def gitA (\_ -> System.Process.rawSystem "git" ["add", "-A"] >>= print >> return "")
> :def gitC (\m -> System.Process.rawSystem "git" ["commit", "-am", m] >>= print >> return "")
> :def gitP (\_ -> System.Process.rawSystem "git" ["push"] >>= print >> return "")
>
>
> --
> Best Regards,
> Boon Hui
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20161001/76360dfe/attachment.html>
More information about the Beginners
mailing list