vty 6.1 → 6.2
raw patch · 3 files changed
+37/−7 lines, 3 filesdep −microlens-th
Dependencies removed: microlens-th
Files
- CHANGELOG.md +13/−0
- src/Graphics/Vty/PictureToSpans.hs +22/−4
- vty.cabal +2/−3
CHANGELOG.md view
@@ -1,4 +1,14 @@ +6.2+---++Package changes:+* Update version bounds to support building with GHC 9.8++Bug fixes:+* Updated `PictureToSpans` module to implement its lenses manually to+ avoid template haskell which has trouble on Windows and GHC 9.2 (#271)+ 6.1 --- @@ -45,6 +55,9 @@ modules. 4. If desired, call `Graphics.Vty.Config.userConfig` to load the Vty user configuration since this step is no longer automatic.+5. Some configurations have been moved to `Graphics.Vty.Output`. For + example, `mouseMode` is no longer a field in `VtyUserConfig`. + Instead, use `setMode` to enable it. For applications using more of Vty's API than just the basic initialization and rendering API, the full change list is provided
src/Graphics/Vty/PictureToSpans.hs view
@@ -3,7 +3,6 @@ {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RankNTypes #-}-{-# LANGUAGE TemplateHaskell #-} -- | Transforms an image into rows of operations. module Graphics.Vty.PictureToSpans@@ -19,7 +18,6 @@ import Lens.Micro import Lens.Micro.Mtl-import Lens.Micro.TH import Control.Monad import Control.Monad.Reader import Control.Monad.State.Strict hiding ( state )@@ -55,14 +53,34 @@ , _remainingRows :: Int } -makeLenses ''BlitState+columnOffset :: Lens' BlitState Int+columnOffset = lens _columnOffset (\e v -> e { _columnOffset = v }) +rowOffset :: Lens' BlitState Int+rowOffset = lens _rowOffset (\e v -> e { _rowOffset = v })++skipColumns :: Lens' BlitState Int+skipColumns = lens _skipColumns (\e v -> e { _skipColumns = v })++skipRows :: Lens' BlitState Int+skipRows = lens _skipRows (\e v -> e { _skipRows = v })++remainingColumns :: Lens' BlitState Int+remainingColumns = lens _remainingColumns (\e v -> e { _remainingColumns = v })++remainingRows :: Lens' BlitState Int+remainingRows = lens _remainingRows (\e v -> e { _remainingRows = v })+ data BlitEnv s = BlitEnv { _region :: DisplayRegion , _mrowOps :: MRowOps s } -makeLenses ''BlitEnv+region :: Lens' (BlitEnv s) DisplayRegion+region = lens _region (\e r -> e { _region = r })++mrowOps :: Lens' (BlitEnv s) (MRowOps s)+mrowOps = lens _mrowOps (\e r -> e { _mrowOps = r }) type BlitM s a = ReaderT (BlitEnv s) (StateT BlitState (ST s)) a
vty.cabal view
@@ -1,5 +1,5 @@ name: vty-version: 6.1+version: 6.2 license: BSD3 license-file: LICENSE author: AUTHORS@@ -44,10 +44,9 @@ build-depends: base >= 4.8 && < 5, blaze-builder >= 0.3.3.2 && < 0.5, bytestring,- deepseq >= 1.1 && < 1.5,+ deepseq >= 1.1 && < 1.6, microlens < 0.4.14, microlens-mtl,- microlens-th, mtl >= 1.1.1.0 && < 2.4, stm, text >= 0.11.3,