Show yaml representation when dumping config
parent
1a70e4d949
commit
6011726389
|
@ -99,7 +99,7 @@ mainCmdParser = do
|
|||
Nothing -> System.Exit.exitWith (System.Exit.ExitFailure 50)
|
||||
Just x -> return x
|
||||
when (confUnpack $ _dconf_dump_config $ _conf_debug $ config) $ do
|
||||
trace (showTree config) $ return ()
|
||||
trace (showConfigYaml config) $ return ()
|
||||
let ghcOptions = config
|
||||
& _conf_forward
|
||||
& _options_ghc
|
||||
|
|
|
@ -8,6 +8,7 @@ module Language.Haskell.Brittany.Config
|
|||
, configParser
|
||||
, staticDefaultConfig
|
||||
, readMergePersConfig
|
||||
, showConfigYaml
|
||||
)
|
||||
where
|
||||
|
||||
|
@ -177,3 +178,8 @@ readMergePersConfig path shouldCreate conf = do
|
|||
return $ conf
|
||||
| otherwise -> do
|
||||
return conf
|
||||
|
||||
showConfigYaml :: Config -> String
|
||||
showConfigYaml = Data.ByteString.Char8.unpack
|
||||
. Data.Yaml.encode
|
||||
. cMap (\(Identity x) -> Just x)
|
||||
|
|
Loading…
Reference in New Issue