From aa992c0e5de9bf8e8765da8bd676a5a019cf44aa Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 7 Jun 2021 20:09:18 +0200 Subject: [PATCH] PrettyShow --- lib/GHCup/Platform.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/GHCup/Platform.hs b/lib/GHCup/Platform.hs index 7ee3529..e930f45 100644 --- a/lib/GHCup/Platform.hs +++ b/lib/GHCup/Platform.hs @@ -44,6 +44,7 @@ import Prelude hiding ( abs import System.Info import System.Directory import System.OsRelease +import Text.PrettyPrint.HughesPJClass ( prettyShow ) import Text.Regex.Posix import qualified Data.Text as T @@ -108,7 +109,7 @@ getPlatform = do pure $ PlatformResult { _platform = FreeBSD, _distroVersion = ver } "mingw32" -> pure PlatformResult { _platform = Windows, _distroVersion = Nothing } what -> throwE $ NoCompatiblePlatform what - lift $ $(logDebug) [i|Identified Platform as: #{pfr}|] + lift $ $(logDebug) [i|Identified Platform as: #{prettyShow pfr}|] pure pfr where getMajorVersion = T.intercalate "." . take 2 . T.split (== '.')