From bf460a0a98d7e4c7f4eac525fcf300629db582b6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Nov 2011 15:34:10 -0400 Subject: reorder repo parameters last Many functions took the repo as their first parameter. Changing it consistently to be the last parameter allows doing some useful things with currying, that reduce boilerplate. In particular, g <- gitRepo is almost never needed now, instead use inRepo to run an IO action in the repo, and fromRepo to get a value from the repo. This also provides more opportunities to use monadic and applicative combinators. --- git-union-merge.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git-union-merge.hs') diff --git a/git-union-merge.hs b/git-union-merge.hs index 0d1d0819d..10ae84217 100644 --- a/git-union-merge.hs +++ b/git-union-merge.hs @@ -41,6 +41,6 @@ main = do g <- Git.configRead =<< Git.repoFromCwd _ <- Git.useIndex (tmpIndex g) setup g - Git.UnionMerge.merge g aref bref - Git.commit g "union merge" newref [aref, bref] + Git.UnionMerge.merge aref bref g + Git.commit "union merge" newref [aref, bref] g cleanup g -- cgit v1.2.3