File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,20 +21,20 @@ Example Usage
2121 import qualified Github.Repos.Commits as Github
2222
2323 main = do
24- possibleCommits <- Github.commitsFor "thoughtbot" "paperclip"
24+ possibleCommits ← Github.commitsFor "thoughtbot" "paperclip"
2525 case possibleCommits of
26- (Left error) -> putStrLn $ "Error: " ++ (show error)
27- (Right commits) -> putStrLn $ show $ map formatCommit commits
28-
29- formatCommit :: Commit -> String
26+ (Left error) → putStrLn $ "Error: " ++ (show error)
27+ (Right commits) → putStrLn $ intercalate "λnλn" $ map formatCommit commits
28+
29+ formatCommit :: Github. Commit → String
3030 formatCommit commit =
3131 "commit " ++ (Github.commitSha commit) ++
32- "\nAuthor : " ++ (formatAuthor author) ++
33- "\nDate : " ++ (show $ Github.authorDate author) ++
34- "\n\n\t " ++ (Github.commitMessage commit)
32+ "λnAuthor : " ++ (formatAuthor author) ++
33+ "λnDate : " ++ (show $ Github.fromGithubDate $ Github.authorDate author) ++
34+ "λnλnλt " ++ (Github.commitMessage commit)
3535 where author = Github.commitAuthor commit
36-
37- formatAuthor :: Author -> String
36+
37+ formatAuthor :: Github. Author → String
3838 formatAuthor author =
3939 (Github.authorName author) ++ " <" ++ (Github.authorEmail author) ++ ">"
4040
You can’t perform that action at this time.
0 commit comments