Just wanted to share some GHCI macros with fellow beginners

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

Hi Boon, What's wrong with these?
:!pwd :!git
Andrew
On 1 October 2016 at 14:54, Lai Boon Hui
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@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
participants (2)
-
Andrew Bernard
-
Lai Boon Hui