From 0c70feb09c54bf06ee9ceddfaf808b2ca1027688 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Thu, 17 Mar 2022 20:04:59 +0100 Subject: [PATCH] Fix rather humongous bug in 'ghcup list' --- app/ghcup/GHCup/OptParse/List.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ghcup/GHCup/OptParse/List.hs b/app/ghcup/GHCup/OptParse/List.hs index d82e01c..7212578 100644 --- a/app/ghcup/GHCup/OptParse/List.hs +++ b/app/ghcup/GHCup/OptParse/List.hs @@ -143,7 +143,7 @@ printListResult no_color raw lr = do ) $ lr let cols = - foldr (\xs ys -> zipWith (:) xs ys) (replicate (length rows) []) rows + foldr (\xs ys -> zipWith (:) xs ys) (cycle [[]]) rows lengths = fmap (maximum . fmap strWidth) cols padded = fmap (\xs -> zipWith padTo xs lengths) rows