Skip to content

Commit 6744f1a

Browse files
committed
+Debug
1 parent 4e2e060 commit 6744f1a

File tree

1 file changed

+4
-2
lines changed
  • Cabal-syntax/src/Distribution/Compat

1 file changed

+4
-2
lines changed

Cabal-syntax/src/Distribution/Compat/Graph.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,15 +380,17 @@ fromMap m =
380380

381381
-- | /O(V log V)/. Convert a list of nodes (with distinct keys) into a graph.
382382
fromDistinctList :: (HasCallStack, IsNode a, Show (Key a)) => [a] -> Graph a
383-
fromDistinctList =
383+
fromDistinctList xs =
384384
fromMap
385385
. Map.fromListWith (\_ -> duplicateError)
386-
. map (\n -> n `seq` (nodeKey n, n))
386+
. map (\n -> n `seq` (nodeKey n, n)) $ xs
387387
where
388388
duplicateError n =
389389
error $
390390
"Graph.fromDistinctList: duplicate key: "
391391
++ show (nodeKey n)
392+
++ " in "
393+
++ unlines (map (show . nodeKey) xs)
392394

393395
-- Map-like operations
394396

0 commit comments

Comments
 (0)