From 8903b08d71029cbec266551478e7a2d42805fd4d Mon Sep 17 00:00:00 2001 From: Bob Blackmon <bob.blackmon@ymail.com> Date: Wed, 27 Jun 2018 13:03:05 -0700 Subject: [PATCH] Fixed withCurrentRepo examples The previous versions had two major errors: One parse error and one ambiguous type error. --- Data/Git/Monad.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Data/Git/Monad.hs b/Data/Git/Monad.hs index 08a9ae4..480af9f 100644 --- a/Data/Git/Monad.hs +++ b/Data/Git/Monad.hs @@ -581,8 +581,8 @@ deleteFile path = do -- -- Example: -- --- > withCurrentRepo $ --- > (r, ()) <- withNewCommit person Nothing $ do +-- > withCurrentRepo $ do +-- > (r, ()) <- withNewCommit person (Nothing :: Maybe (Ref SHA1)) $ do -- > setMessage "inital commit" -- > setFile ["README.md"] "# My awesome project\n\nthis is a new project\n" -- > branchWrite "master" r @@ -592,7 +592,7 @@ deleteFile path = do -- parent is already set to the Reference associated to the revision. -- You can, change the parents if you wish to erase, or replace, this value. -- --- > withCurrentRepo $ +-- > withCurrentRepo $ do -- > readmeContent <- withCommit (Just "master") $ getFile ["README.md"] -- > (r, ()) <- withNewCommit person (Just "master") $ do -- > setMessage "update the README" -- GitLab