[commit: ghc] wip/nfs-locking: Refactor getSingleton to avoid using list, otherwise an import of Data.Extra.List causes shadowing issues (dbe8c1e)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:35:24 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/dbe8c1e0f387f98c7edaaaf2f5dfda1ed25a9b2a/ghc

>---------------------------------------------------------------

commit dbe8c1e0f387f98c7edaaaf2f5dfda1ed25a9b2a
Author: Neil Mitchell <ndmitchell at gmail.com>
Date:   Sat Jan 9 21:45:53 2016 +0000

    Refactor getSingleton to avoid using list, otherwise an import of Data.Extra.List causes shadowing issues


>---------------------------------------------------------------

dbe8c1e0f387f98c7edaaaf2f5dfda1ed25a9b2a
 src/Expression.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Expression.hs b/src/Expression.hs
index 6e2a225..932ed80 100644
--- a/src/Expression.hs
+++ b/src/Expression.hs
@@ -204,7 +204,7 @@ getOutput = do
 
 getSingleton :: Expr [a] -> String -> Expr a
 getSingleton expr msg = do
-    list <- expr
-    case list of
+    xs <- expr
+    case xs of
         [res] -> return res
         _     -> lift $ putError msg



More information about the ghc-commits mailing list