on master help sign in
Migrate mkVty docs on table loading to Config
b54772aJonathan Daugherty
src/Graphics/Vty.hs−9
@@ -112,15 +112,6 @@ data Vty =
112-- precedence. See "Graphics.Vty.Config".
112-- precedence. See "Graphics.Vty.Config".
113--
113--
114-- For most applications @mkVty defaultConfig@ is sufficient.
114-- For most applications @mkVty defaultConfig@ is sufficient.
115−--
116−-- If the configuration's 'allowCustomUnicodeWidthTables' is set
117−-- to 'Nothing' or 'Just True', this will use the current value of
118−-- 'TERM' and the configuation's width table settings to attempt to
119−-- load a custom unicode character width table if one has not already
120−-- been loaded in this process. If the load is attempted and fails,
121−-- information about the failure will be logged to the debug log if the
122−-- configuration specifies one. If no custom table is loaded (or if a
123−-- load fails), the built-in character width table will be used.
124mkVty :: Config -> IO Vty
115mkVty :: Config -> IO Vty
125mkVty appConfig = do
116mkVty appConfig = do
126 config <- (<> appConfig) <$> userConfig
117 config <- (<> appConfig) <$> userConfig
src/Graphics/Vty/Config.hs+10−3
@@ -178,9 +178,16 @@ data Config =
178 , termWidthMaps :: [(String, FilePath)]
178 , termWidthMaps :: [(String, FilePath)]
179 -- ^ Terminal width map files.
179 -- ^ Terminal width map files.
180 , allowCustomUnicodeWidthTables :: Maybe Bool
180 , allowCustomUnicodeWidthTables :: Maybe Bool
181− -- ^ Whether to permit custom Unicode width table loading.
181+ -- ^ Whether to permit custom Unicode width table loading by
182− -- 'Just False' indicates that table loading should not be
182+ -- 'Graphics.Vty.mkVty'. @'Just' 'False'@ indicates that
183− -- performed. Other values permit table loading.
183+ -- table loading should not be performed. Other values permit
184+ -- table loading.
185+ --
186+ -- If a table load is attempted and fails, information
187+ -- about the failure will be logged to the debug log if the
188+ -- configuration specifies one. If no custom table is loaded
189+ -- (or if a load fails), the built-in character width table
190+ -- will be used.
184 }
191 }
185 deriving (Show, Eq)
192 deriving (Show, Eq)
186
193