[Haskell-beginners] Just wanted to share some GHCI macros with fellow beginners

Lai Boon Hui laiboonh at gmail.com
Sat Oct 1 04:54:26 UTC 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20161001/c9c779fe/attachment-0001.html>


More information about the Beginners mailing list