Clean up compilation warnings on newer GHCs

This commit is contained in:
Jonathan Daugherty 2020-02-07 16:43:36 -08:00
parent edfe565992
commit 7534f4d7be
11 changed files with 53 additions and 22 deletions

View File

@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
@ -5,7 +6,10 @@ module Main where
import Control.Applicative ((<$>))
#endif
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid ((<>))
#endif
import qualified Data.Text as T
import qualified Graphics.Vty as V

View File

@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
@ -6,7 +7,9 @@ import Control.Applicative
#endif
import Control.Monad (void)
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid ((<>))
#endif
import qualified Graphics.Vty as V
import qualified Brick.Types as T

View File

@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
@ -5,7 +6,9 @@ module Main where
import qualified Data.Text as T
import Lens.Micro ((^.))
import Lens.Micro.TH
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid ((<>))
#endif
import qualified Graphics.Vty as V
import Brick

View File

@ -1,7 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid ((<>))
#endif
import qualified Graphics.Vty as V
import Brick.Main (App(..), defaultMain, resizeOrQuit, neverShowCursor)

View File

@ -1,12 +1,17 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative ((<$>))
#endif
import Lens.Micro ((^.), (&), (.~), (%~))
import Lens.Micro.TH (makeLenses)
import Control.Monad (void)
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid ((<>))
#endif
import qualified Graphics.Vty as V
import qualified Brick.Types as T
@ -125,23 +130,24 @@ main = do
initialVty <- buildVty
void $ M.customMain initialVty buildVty Nothing app $ St [] Nothing
"Try clicking on various UI elements.\n\
\Observe that the click coordinates identify the\n\
\underlying widget coordinates.\n\
\\n\
\Lorem ipsum dolor sit amet,\n\
\consectetur adipiscing elit,\n\
\sed do eiusmod tempor incididunt ut labore\n\
\et dolore magna aliqua.\n\
\ \n\
\Ut enim ad minim veniam\n\
\quis nostrud exercitation ullamco laboris\n\
\nisi ut aliquip ex ea commodo consequat.\n\
\\n\
\Duis aute irure dolor in reprehenderit\n\
\in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n\
\\n\
\Excepteur sint occaecat cupidatat not proident,\n\
\sunt in culpa qui officia deserunt mollit\n\
\anim id est laborum.\n"
(unlines [ "Try clicking on various UI elements."
, "Observe that the click coordinates identify the"
, "underlying widget coordinates."
, ""
, "Lorem ipsum dolor sit amet,"
, "consectetur adipiscing elit,"
, "sed do eiusmod tempor incididunt ut labore"
, "et dolore magna aliqua."
, ""
, "Ut enim ad minim veniam"
, "quis nostrud exercitation ullamco laboris"
, "isi ut aliquip ex ea commodo consequat."
, ""
, "Duis aute irure dolor in reprehenderit"
, "in voluptate velit esse cillum dolore eu fugiat nulla pariatur."
, ""
, "Excepteur sint occaecat cupidatat not proident,"
, "sunt in culpa qui officia deserunt mollit"
, "anim id est laborum."
])
(E.editor TextBox Nothing "")

View File

@ -1,6 +1,9 @@
{-# LANGUAGE CPP #-}
module Main where
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid ((<>))
#endif
import Brick
import Text.Wrap (defaultWrapSettings, preserveIndentation)

View File

@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
@ -6,7 +7,9 @@ import Control.Applicative
#endif
import Control.Monad (void)
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid ((<>))
#endif
import qualified Graphics.Vty as V
import qualified Brick.Types as T

View File

@ -89,7 +89,9 @@ import Data.Tuple (swap)
import Data.List (intercalate)
import Data.Bits ((.|.), (.&.))
import Data.Maybe (fromMaybe, isNothing, catMaybes, mapMaybe)
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid ((<>))
#endif
import qualified Data.Foldable as F
import Data.Ini.Config

View File

@ -9,7 +9,9 @@ module Brick.Util
where
import Lens.Micro ((&), (%~))
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid ((<>))
#endif
import Graphics.Vty
import Brick.Types.Internal (Location(..), CursorLocation(..), cursorLocationL)

View File

@ -91,9 +91,11 @@ module Brick.Widgets.Core
)
where
#if MIN_VERSION_base(4,8,0)
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid ((<>))
#else
#endif
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
import Data.Monoid ((<>), mempty)
#endif

View File

@ -21,7 +21,7 @@ import Brick.Types
import Brick.Types.Internal
import Brick.AttrMap
import Brick.Widgets.Border.Style
import Brick.BorderMap (BorderMap, Edges(..))
import Brick.BorderMap (BorderMap)
import qualified Brick.BorderMap as BM
renderFinal :: AttrMap