debug-info test

This commit is contained in:
Lei Zhu
2023-07-22 16:07:49 +08:00
parent 83b82c328b
commit bcdf2b23f1
5 changed files with 43 additions and 15 deletions

View File

@@ -0,0 +1,17 @@
module Utils where
import GHCup.OptParse as GHCup
import Options.Applicative
import Data.Bifunctor
parseWith :: [String] -> IO Command
parseWith args =
optCommand <$> handleParseResult
(execParserPure defaultPrefs (info GHCup.opts fullDesc) args)
padLeft :: Int -> String -> String
padLeft desiredLength s = padding ++ s
where padding = replicate (desiredLength - length s) ' '
mapSecond :: (b -> c) -> [(a,b)] -> [(a,c)]
mapSecond = map . second