From b54772ac1de30ed5d2411f92e9a0bf792c667033 Mon Sep 17 00:00:00 2001 From: Jonathan Daugherty Date: Thu, 5 Mar 2020 14:20:14 -0800 Subject: [PATCH] Migrate mkVty docs on table loading to Config --- src/Graphics/Vty.hs | 9 --------- src/Graphics/Vty/Config.hs | 13 ++++++++++--- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/Graphics/Vty.hs b/src/Graphics/Vty.hs index 7564780..87f8831 100644 --- a/src/Graphics/Vty.hs +++ b/src/Graphics/Vty.hs @@ -112,15 +112,6 @@ data Vty = -- precedence. See "Graphics.Vty.Config". -- -- For most applications @mkVty defaultConfig@ is sufficient. --- --- If the configuration's 'allowCustomUnicodeWidthTables' is set --- to 'Nothing' or 'Just True', this will use the current value of --- 'TERM' and the configuation's width table settings to attempt to --- load a custom unicode character width table if one has not already --- been loaded in this process. If the load is attempted and fails, --- information about the failure will be logged to the debug log if the --- configuration specifies one. If no custom table is loaded (or if a --- load fails), the built-in character width table will be used. mkVty :: Config -> IO Vty mkVty appConfig = do config <- (<> appConfig) <$> userConfig diff --git a/src/Graphics/Vty/Config.hs b/src/Graphics/Vty/Config.hs index f8b1e40..3c28a17 100644 --- a/src/Graphics/Vty/Config.hs +++ b/src/Graphics/Vty/Config.hs @@ -178,9 +178,16 @@ data Config = , termWidthMaps :: [(String, FilePath)] -- ^ Terminal width map files. , allowCustomUnicodeWidthTables :: Maybe Bool - -- ^ Whether to permit custom Unicode width table loading. - -- 'Just False' indicates that table loading should not be - -- performed. Other values permit table loading. + -- ^ Whether to permit custom Unicode width table loading by + -- 'Graphics.Vty.mkVty'. @'Just' 'False'@ indicates that + -- table loading should not be performed. Other values permit + -- table loading. + -- + -- If a table load is attempted and fails, information + -- about the failure will be logged to the debug log if the + -- configuration specifies one. If no custom table is loaded + -- (or if a load fails), the built-in character width table + -- will be used. } deriving (Show, Eq)