From ac1fc0f0b375fcd7dc9f35404a992b0b7f544d33 Mon Sep 17 00:00:00 2001
From: Mikhail Glushenkov <mikhail.glushenkov@gmail.com>
Date: Tue, 25 Jun 2019 03:31:20 +0100
Subject: [PATCH] Small refactoring.

---
 Cabal/Distribution/Simple/ShowBuildInfo.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Cabal/Distribution/Simple/ShowBuildInfo.hs b/Cabal/Distribution/Simple/ShowBuildInfo.hs
index f242ca7d49..2a41962fb6 100644
--- a/Cabal/Distribution/Simple/ShowBuildInfo.hs
+++ b/Cabal/Distribution/Simple/ShowBuildInfo.hs
@@ -82,7 +82,9 @@ mkBuildInfo
   -> Json
 mkBuildInfo pkg_descr lbi _flags targetsToBuild = info
   where
-    componentsToBuild = map (\target -> (componentLocalName $ targetCLBI target,targetCLBI target)) targetsToBuild
+    targetToNameAndLBI target =
+      (componentLocalName $ targetCLBI target, targetCLBI target)
+    componentsToBuild = map targetToNameAndLBI targetsToBuild
     (.=) :: String -> Json -> (String, Json)
     k .= v = (k, v)
 
-- 
GitLab