[commit: packages/Cabal] ghc-head: Add a comment. (c9a57bc)
git at git.haskell.org
git at git.haskell.org
Mon Aug 26 23:24:13 CEST 2013
Repository : ssh://git@git.haskell.org/Cabal
On branch : ghc-head
Link : http://git.haskell.org/?p=packages/Cabal.git;a=commit;h=c9a57bceb98632f15ec2475490626bd9fa9cd331
>---------------------------------------------------------------
commit c9a57bceb98632f15ec2475490626bd9fa9cd331
Author: Andres Loeh <andres at well-typed.com>
Date: Fri May 3 14:12:37 2013 +0200
Add a comment.
>---------------------------------------------------------------
c9a57bceb98632f15ec2475490626bd9fa9cd331
cabal-install/Distribution/Client/Dependency/Modular/Log.hs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cabal-install/Distribution/Client/Dependency/Modular/Log.hs b/cabal-install/Distribution/Client/Dependency/Modular/Log.hs
index 3c9216f..3bfe6a9 100644
--- a/cabal-install/Distribution/Client/Dependency/Modular/Log.hs
+++ b/cabal-install/Distribution/Client/Dependency/Modular/Log.hs
@@ -18,6 +18,10 @@ import Distribution.Client.Dependency.Modular.Tree (FailReason(..))
-- Parameterized over the type of actual messages and the final result.
type Log m a = Progress m () a
+-- | Turns a log into a list of messages paired with a final result. A final result
+-- of 'Nothing' indicates failure. A final result of 'Just' indicates success.
+-- Keep in mind that forcing the second component of the returned pair will force the
+-- entire log.
runLog :: Log m a -> ([m], Maybe a)
runLog (Done x) = ([], Just x)
runLog (Fail _) = ([], Nothing)
More information about the ghc-commits
mailing list