Types: re-export state monad functions as part of API

This commit is contained in:
Jonathan Daugherty 2022-07-16 23:17:45 -07:00
parent a5b3240758
commit f2f8013d63
8 changed files with 7 additions and 8 deletions

View File

@ -203,7 +203,6 @@ executable brick-form-demo
text,
microlens,
microlens-th,
mtl,
vty
executable brick-text-wrap-demo

View File

@ -3,7 +3,6 @@
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad.State (gets, modify)
import qualified Data.Text as T
import Lens.Micro ((^.))
import Lens.Micro.TH

View File

@ -86,7 +86,6 @@ module Brick.Forms
)
where
import Control.Monad.State (gets, get, put, modify)
import Graphics.Vty hiding (showCursor)
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid

View File

@ -93,6 +93,12 @@ module Brick.Types
-- * Renderer internals (for benchmarking)
, RenderState
-- * Re-exports for convenience
, get
, gets
, put
, modify
)
where

View File

@ -37,7 +37,6 @@ module Brick.Widgets.Dialog
where
import Lens.Micro
import Control.Monad.State (modify)
#if !(MIN_VERSION_base(4,11,0))
import Data.Monoid
#endif

View File

@ -48,8 +48,6 @@ import Data.Monoid
import Lens.Micro
import Graphics.Vty (Event(..), Key(..), Modifier(..))
import Control.Monad.State (get, put)
import qualified Data.ByteString as BS
import qualified Data.Text as T
import qualified Data.Text.Encoding as T

View File

@ -143,7 +143,6 @@ where
import qualified Control.Exception as E
import Control.Monad (forM)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.State (put, get, modify)
import Data.Char (toLower, isPrint)
import Data.Maybe (fromMaybe, isJust, fromJust)
import qualified Data.Foldable as F

View File

@ -79,7 +79,7 @@ import Prelude hiding (reverse, splitAt)
import Control.Applicative ((<|>))
import Data.Foldable (find, toList)
import Control.Monad.State (evalState, modify, get, put)
import Control.Monad.State (evalState)
import Lens.Micro ((^.), (^?), (&), (.~), (%~), _2, _head, set)
import Data.Functor (($>))