Add an optional verbose flag to the Dhall configuration.
It is OR'd with the --verbose CLI flag. Defaults to False
when omitted, via record merge with a defaults record in
readConfig.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Change-Id: Ic3d3ef408e97a2b083c910eee685e57043ee6f7e
diff --git a/src/Mulkup/Config.hs b/src/Mulkup/Config.hs
index 8356824..b1db1a9 100644
--- a/src/Mulkup/Config.hs
+++ b/src/Mulkup/Config.hs
@@ -33,7 +33,7 @@
--- MulkupConfig ---
-data MulkupConfig = MulkupConfig {host :: Text, stashes :: [StashConfig]}
+data MulkupConfig = MulkupConfig {host :: Text, stashes :: [StashConfig], verbose :: Bool}
deriving stock (Generic, Show)
deriving anyclass (FromDhall)
@@ -41,5 +41,7 @@
--- readConfig ---
+-- | Reads a Dhall config, merging the user's record over a defaults
+-- record so optional fields can be omitted entirely.
readConfig :: Text -> IO MulkupConfig
-readConfig = Dhall.input auto
+readConfig text = Dhall.input auto ("{ verbose = False } // (" <> text <> ")")