mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-09-11 15:55:54 +03:00
Clean up compilation warnings on newer GHCs
This commit is contained in:
parent
edfe565992
commit
7534f4d7be
@ -1,3 +1,4 @@
|
|||||||
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
@ -5,7 +6,10 @@ module Main where
|
|||||||
import Control.Applicative ((<$>))
|
import Control.Applicative ((<$>))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !(MIN_VERSION_base(4,11,0))
|
||||||
import Data.Monoid ((<>))
|
import Data.Monoid ((<>))
|
||||||
|
#endif
|
||||||
|
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import qualified Graphics.Vty as V
|
import qualified Graphics.Vty as V
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
@ -6,7 +7,9 @@ import Control.Applicative
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
import Control.Monad (void)
|
import Control.Monad (void)
|
||||||
|
#if !(MIN_VERSION_base(4,11,0))
|
||||||
import Data.Monoid ((<>))
|
import Data.Monoid ((<>))
|
||||||
|
#endif
|
||||||
import qualified Graphics.Vty as V
|
import qualified Graphics.Vty as V
|
||||||
|
|
||||||
import qualified Brick.Types as T
|
import qualified Brick.Types as T
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module Main where
|
module Main where
|
||||||
@ -5,7 +6,9 @@ module Main where
|
|||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import Lens.Micro ((^.))
|
import Lens.Micro ((^.))
|
||||||
import Lens.Micro.TH
|
import Lens.Micro.TH
|
||||||
|
#if !(MIN_VERSION_base(4,11,0))
|
||||||
import Data.Monoid ((<>))
|
import Data.Monoid ((<>))
|
||||||
|
#endif
|
||||||
|
|
||||||
import qualified Graphics.Vty as V
|
import qualified Graphics.Vty as V
|
||||||
import Brick
|
import Brick
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
|
#if !(MIN_VERSION_base(4,11,0))
|
||||||
import Data.Monoid ((<>))
|
import Data.Monoid ((<>))
|
||||||
|
#endif
|
||||||
import qualified Graphics.Vty as V
|
import qualified Graphics.Vty as V
|
||||||
|
|
||||||
import Brick.Main (App(..), defaultMain, resizeOrQuit, neverShowCursor)
|
import Brick.Main (App(..), defaultMain, resizeOrQuit, neverShowCursor)
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
|
#if !MIN_VERSION_base(4,8,0)
|
||||||
import Control.Applicative ((<$>))
|
import Control.Applicative ((<$>))
|
||||||
|
#endif
|
||||||
import Lens.Micro ((^.), (&), (.~), (%~))
|
import Lens.Micro ((^.), (&), (.~), (%~))
|
||||||
import Lens.Micro.TH (makeLenses)
|
import Lens.Micro.TH (makeLenses)
|
||||||
import Control.Monad (void)
|
import Control.Monad (void)
|
||||||
|
#if !(MIN_VERSION_base(4,11,0))
|
||||||
import Data.Monoid ((<>))
|
import Data.Monoid ((<>))
|
||||||
|
#endif
|
||||||
import qualified Graphics.Vty as V
|
import qualified Graphics.Vty as V
|
||||||
|
|
||||||
import qualified Brick.Types as T
|
import qualified Brick.Types as T
|
||||||
@ -125,23 +130,24 @@ main = do
|
|||||||
|
|
||||||
initialVty <- buildVty
|
initialVty <- buildVty
|
||||||
void $ M.customMain initialVty buildVty Nothing app $ St [] Nothing
|
void $ M.customMain initialVty buildVty Nothing app $ St [] Nothing
|
||||||
"Try clicking on various UI elements.\n\
|
(unlines [ "Try clicking on various UI elements."
|
||||||
\Observe that the click coordinates identify the\n\
|
, "Observe that the click coordinates identify the"
|
||||||
\underlying widget coordinates.\n\
|
, "underlying widget coordinates."
|
||||||
\\n\
|
, ""
|
||||||
\Lorem ipsum dolor sit amet,\n\
|
, "Lorem ipsum dolor sit amet,"
|
||||||
\consectetur adipiscing elit,\n\
|
, "consectetur adipiscing elit,"
|
||||||
\sed do eiusmod tempor incididunt ut labore\n\
|
, "sed do eiusmod tempor incididunt ut labore"
|
||||||
\et dolore magna aliqua.\n\
|
, "et dolore magna aliqua."
|
||||||
\ \n\
|
, ""
|
||||||
\Ut enim ad minim veniam\n\
|
, "Ut enim ad minim veniam"
|
||||||
\quis nostrud exercitation ullamco laboris\n\
|
, "quis nostrud exercitation ullamco laboris"
|
||||||
\nisi ut aliquip ex ea commodo consequat.\n\
|
, "isi ut aliquip ex ea commodo consequat."
|
||||||
\\n\
|
, ""
|
||||||
\Duis aute irure dolor in reprehenderit\n\
|
, "Duis aute irure dolor in reprehenderit"
|
||||||
\in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n\
|
, "in voluptate velit esse cillum dolore eu fugiat nulla pariatur."
|
||||||
\\n\
|
, ""
|
||||||
\Excepteur sint occaecat cupidatat not proident,\n\
|
, "Excepteur sint occaecat cupidatat not proident,"
|
||||||
\sunt in culpa qui officia deserunt mollit\n\
|
, "sunt in culpa qui officia deserunt mollit"
|
||||||
\anim id est laborum.\n"
|
, "anim id est laborum."
|
||||||
|
])
|
||||||
(E.editor TextBox Nothing "")
|
(E.editor TextBox Nothing "")
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
|
{-# LANGUAGE CPP #-}
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
|
#if !(MIN_VERSION_base(4,11,0))
|
||||||
import Data.Monoid ((<>))
|
import Data.Monoid ((<>))
|
||||||
|
#endif
|
||||||
import Brick
|
import Brick
|
||||||
import Text.Wrap (defaultWrapSettings, preserveIndentation)
|
import Text.Wrap (defaultWrapSettings, preserveIndentation)
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
@ -6,7 +7,9 @@ import Control.Applicative
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
import Control.Monad (void)
|
import Control.Monad (void)
|
||||||
|
#if !(MIN_VERSION_base(4,11,0))
|
||||||
import Data.Monoid ((<>))
|
import Data.Monoid ((<>))
|
||||||
|
#endif
|
||||||
import qualified Graphics.Vty as V
|
import qualified Graphics.Vty as V
|
||||||
|
|
||||||
import qualified Brick.Types as T
|
import qualified Brick.Types as T
|
||||||
|
@ -89,7 +89,9 @@ import Data.Tuple (swap)
|
|||||||
import Data.List (intercalate)
|
import Data.List (intercalate)
|
||||||
import Data.Bits ((.|.), (.&.))
|
import Data.Bits ((.|.), (.&.))
|
||||||
import Data.Maybe (fromMaybe, isNothing, catMaybes, mapMaybe)
|
import Data.Maybe (fromMaybe, isNothing, catMaybes, mapMaybe)
|
||||||
|
#if !(MIN_VERSION_base(4,11,0))
|
||||||
import Data.Monoid ((<>))
|
import Data.Monoid ((<>))
|
||||||
|
#endif
|
||||||
import qualified Data.Foldable as F
|
import qualified Data.Foldable as F
|
||||||
|
|
||||||
import Data.Ini.Config
|
import Data.Ini.Config
|
||||||
|
@ -9,7 +9,9 @@ module Brick.Util
|
|||||||
where
|
where
|
||||||
|
|
||||||
import Lens.Micro ((&), (%~))
|
import Lens.Micro ((&), (%~))
|
||||||
|
#if !(MIN_VERSION_base(4,11,0))
|
||||||
import Data.Monoid ((<>))
|
import Data.Monoid ((<>))
|
||||||
|
#endif
|
||||||
import Graphics.Vty
|
import Graphics.Vty
|
||||||
|
|
||||||
import Brick.Types.Internal (Location(..), CursorLocation(..), cursorLocationL)
|
import Brick.Types.Internal (Location(..), CursorLocation(..), cursorLocationL)
|
||||||
|
@ -91,9 +91,11 @@ module Brick.Widgets.Core
|
|||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
|
||||||
#if MIN_VERSION_base(4,8,0)
|
#if !(MIN_VERSION_base(4,11,0))
|
||||||
import Data.Monoid ((<>))
|
import Data.Monoid ((<>))
|
||||||
#else
|
#endif
|
||||||
|
|
||||||
|
#if !MIN_VERSION_base(4,8,0)
|
||||||
import Control.Applicative
|
import Control.Applicative
|
||||||
import Data.Monoid ((<>), mempty)
|
import Data.Monoid ((<>), mempty)
|
||||||
#endif
|
#endif
|
||||||
|
@ -21,7 +21,7 @@ import Brick.Types
|
|||||||
import Brick.Types.Internal
|
import Brick.Types.Internal
|
||||||
import Brick.AttrMap
|
import Brick.AttrMap
|
||||||
import Brick.Widgets.Border.Style
|
import Brick.Widgets.Border.Style
|
||||||
import Brick.BorderMap (BorderMap, Edges(..))
|
import Brick.BorderMap (BorderMap)
|
||||||
import qualified Brick.BorderMap as BM
|
import qualified Brick.BorderMap as BM
|
||||||
|
|
||||||
renderFinal :: AttrMap
|
renderFinal :: AttrMap
|
||||||
|
Loading…
Reference in New Issue
Block a user