PrettyShow

This commit is contained in:
Julian Ospald 2021-06-07 20:09:18 +02:00
parent 810870e3a5
commit aa992c0e5d
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F

View File

@ -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 (== '.')