mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-09-11 15:55:54 +03:00
Use conditional imports to silence redundancy warnings on GHCs with base >= 4.8.0.0
This commit is contained in:
parent
3b604fd5af
commit
29ac664adc
@ -53,6 +53,7 @@ Flag demos
|
||||
library
|
||||
default-language: Haskell2010
|
||||
ghc-options: -Wall -fno-warn-unused-do-bind -O3
|
||||
default-extensions: CPP
|
||||
hs-source-dirs: src
|
||||
exposed-modules:
|
||||
Brick
|
||||
@ -112,6 +113,7 @@ executable brick-viewport-scroll-demo
|
||||
hs-source-dirs: programs
|
||||
ghc-options: -threaded -Wall -fno-warn-unused-do-bind -O3
|
||||
default-language: Haskell2010
|
||||
default-extensions: CPP
|
||||
main-is: ViewportScrollDemo.hs
|
||||
build-depends: base,
|
||||
brick,
|
||||
@ -271,6 +273,7 @@ executable brick-border-demo
|
||||
Buildable: False
|
||||
hs-source-dirs: programs
|
||||
ghc-options: -threaded -Wall -fno-warn-unused-do-bind -O3
|
||||
default-extensions: CPP
|
||||
default-language: Haskell2010
|
||||
main-is: BorderDemo.hs
|
||||
build-depends: base <= 5,
|
||||
|
@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module Main where
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative ((<$>))
|
||||
import Data.Monoid
|
||||
#endif
|
||||
|
||||
import Data.Monoid ((<>))
|
||||
import qualified Data.Text as T
|
||||
import qualified Graphics.Vty as V
|
||||
|
||||
|
@ -14,7 +14,6 @@ import Brick.Widgets.Core
|
||||
, (<=>)
|
||||
, hLimit
|
||||
, vLimit
|
||||
, fill
|
||||
, str
|
||||
)
|
||||
import qualified Brick.Widgets.Center as C
|
||||
|
@ -1,9 +1,12 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module Main where
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative
|
||||
#endif
|
||||
|
||||
import Control.Monad (void)
|
||||
import Data.Monoid
|
||||
import Data.Monoid ((<>))
|
||||
import Data.Default
|
||||
import qualified Graphics.Vty as V
|
||||
|
||||
|
@ -38,9 +38,12 @@ module Brick.AttrMap
|
||||
)
|
||||
where
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative ((<$>))
|
||||
import qualified Data.Map as M
|
||||
import Data.Monoid
|
||||
#endif
|
||||
|
||||
import qualified Data.Map as M
|
||||
import Data.Maybe (catMaybes)
|
||||
import Data.List (inits)
|
||||
import Data.String (IsString(..))
|
||||
|
@ -65,16 +65,17 @@ module Brick.Types
|
||||
)
|
||||
where
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative
|
||||
import Data.Monoid (Monoid(..))
|
||||
#endif
|
||||
|
||||
import Lens.Micro (_1, _2, to, (^.), (&), (.~), Lens')
|
||||
import Lens.Micro.Type (Getting)
|
||||
import Data.Monoid (Monoid(..))
|
||||
import Control.Monad.Trans.State.Lazy
|
||||
import Control.Monad.Trans.Reader
|
||||
import Control.Monad.Trans.Class (lift)
|
||||
import Graphics.Vty (Event, Image, emptyImage, Attr)
|
||||
import Data.Default (Default(..))
|
||||
import Data.Functor.Contravariant
|
||||
import qualified Data.Map as M
|
||||
import Control.Monad.IO.Class
|
||||
|
||||
|
@ -30,10 +30,13 @@ module Brick.Types.Internal
|
||||
)
|
||||
where
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Data.Monoid
|
||||
#endif
|
||||
|
||||
import Lens.Micro (_1, _2, Lens')
|
||||
import Lens.Micro.TH (makeLenses)
|
||||
import Lens.Micro.Internal (Field1, Field2)
|
||||
import Data.Monoid
|
||||
import qualified Data.Set as S
|
||||
import qualified Data.Map as M
|
||||
import Graphics.Vty (DisplayRegion)
|
||||
|
@ -30,9 +30,13 @@ module Brick.Widgets.Border
|
||||
)
|
||||
where
|
||||
|
||||
import Control.Applicative ((<$>))
|
||||
import Lens.Micro ((^.), to)
|
||||
import Data.Monoid ((<>))
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative ((<$>))
|
||||
#endif
|
||||
|
||||
import Lens.Micro ((^.), to)
|
||||
import Graphics.Vty (imageHeight, imageWidth)
|
||||
|
||||
import Brick.AttrMap
|
||||
|
@ -69,7 +69,13 @@ module Brick.Widgets.Core
|
||||
)
|
||||
where
|
||||
|
||||
#if MIN_VERSION_base(4,8,0)
|
||||
import Data.Monoid ((<>))
|
||||
#else
|
||||
import Control.Applicative
|
||||
import Data.Monoid ((<>), mempty)
|
||||
#endif
|
||||
|
||||
import Lens.Micro ((^.), (.~), (&), (%~), to, _1, _2, each, to, ix, Lens')
|
||||
import Lens.Micro.Mtl (use, (%=))
|
||||
import Control.Monad ((>=>),when)
|
||||
@ -78,7 +84,6 @@ import Control.Monad.Trans.Reader
|
||||
import Control.Monad.Trans.Class (lift)
|
||||
import qualified Data.Text as T
|
||||
import Data.Default
|
||||
import Data.Monoid ((<>), mempty)
|
||||
import qualified Data.Map as M
|
||||
import qualified Data.Set as S
|
||||
import qualified Data.Function as DF
|
||||
|
@ -27,8 +27,11 @@ module Brick.Widgets.Dialog
|
||||
)
|
||||
where
|
||||
|
||||
import Lens.Micro
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative
|
||||
#endif
|
||||
|
||||
import Lens.Micro
|
||||
import Data.Monoid
|
||||
import Data.List (intersperse)
|
||||
import Graphics.Vty.Input (Event(..), Key(..))
|
||||
|
@ -6,7 +6,10 @@ module Brick.Widgets.Internal
|
||||
)
|
||||
where
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative
|
||||
#endif
|
||||
|
||||
import Lens.Micro ((^.), (&), (%~))
|
||||
import Control.Monad.Trans.State.Lazy
|
||||
import Control.Monad.Trans.Reader
|
||||
|
@ -45,10 +45,13 @@ module Brick.Widgets.List
|
||||
)
|
||||
where
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative ((<$>),(<*>),pure)
|
||||
import Lens.Micro ((^.), (&), (.~), (%~), _2)
|
||||
import Data.Foldable (Foldable)
|
||||
import Data.Traversable (Traversable)
|
||||
#endif
|
||||
|
||||
import Lens.Micro ((^.), (&), (.~), (%~), _2)
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Data.Monoid ((<>))
|
||||
import Graphics.Vty (Event(..), Key(..))
|
||||
|
@ -16,9 +16,12 @@ module Data.Text.Markup
|
||||
)
|
||||
where
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative ((<$>))
|
||||
import Data.Default (Default, def)
|
||||
import Data.Monoid
|
||||
#endif
|
||||
|
||||
import Data.Default (Default, def)
|
||||
import Data.String (IsString(..))
|
||||
import qualified Data.Text as T
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user