packages feed

brick-skylighting 0.3 → 1.0

raw patch · 4 files changed

+19/−13 lines, 4 filesdep +mtldep ~brickPVP ok

version bump matches the API change (PVP)

Dependencies added: mtl

Dependency ranges changed: brick

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for brick-skylighting +1.0+===++ * Updated to work with `brick` 1.0.+ 0.3 === 
brick-skylighting.cabal view
@@ -1,5 +1,5 @@ name:                brick-skylighting-version:             0.3+version:             1.0 synopsis:            Show syntax-highlighted text in your Brick UI description:         This package provides a module to use Skylighting to perform                      syntax highlighting and display the results in Brick-based@@ -12,7 +12,7 @@ category:            Graphics build-type:          Simple extra-source-files:  CHANGELOG.md-cabal-version:       >=1.18+cabal-version:       1.18 Homepage:            https://github.com/jtdaugherty/brick-skylighting/ Bug-reports:         https://github.com/jtdaugherty/brick-skylighting/issues @@ -31,11 +31,11 @@   ghc-options:         -Wall   hs-source-dirs:      src   default-language:    Haskell2010-  exposed-modules:     +  exposed-modules:     Brick.Widgets.Skylighting    build-depends:       base <= 5,-                       brick >= 0.39,+                       brick >= 1.0,                        vty >= 5.23.1,                        skylighting-core >= 0.7,                        text,@@ -53,4 +53,5 @@                        brick-skylighting,                        vty,                        skylighting-core >= 0.7,-                       text+                       text,+                       mtl
programs/Demo.hs view
@@ -69,12 +69,12 @@     , ("zenburn", S.zenburn)     ] -handleEvent :: Int -> BrickEvent () e -> EventM () (Next Int)-handleEvent i (VtyEvent (V.EvKey V.KUp [])) = continue $ (i + 1) `mod` length styles-handleEvent i (VtyEvent (V.EvKey V.KDown [])) = continue $ (i - 1) `mod` length styles-handleEvent i (VtyEvent (V.EvKey V.KEsc [])) = halt i-handleEvent i (VtyEvent (V.EvKey (V.KChar 'q') [])) = halt i-handleEvent i _ = continue i+handleEvent :: BrickEvent () e -> EventM () Int ()+handleEvent (VtyEvent (V.EvKey V.KUp [])) = modify $ \i -> (i + 1) `mod` length styles+handleEvent (VtyEvent (V.EvKey V.KDown [])) = modify $ \i -> (i - 1) `mod` length styles+handleEvent (VtyEvent (V.EvKey V.KEsc [])) = halt+handleEvent (VtyEvent (V.EvKey (V.KChar 'q') [])) = halt+handleEvent _ = return ()  app :: [(T.Text, S.Syntax)] -> App Int e () app programs =@@ -83,7 +83,7 @@                              attrMappingsForStyle $ snd $ styles !! i         , appHandleEvent = handleEvent         , appChooseCursor = neverShowCursor-        , appStartEvent = return+        , appStartEvent = return ()         }  usage :: IO ()
src/Brick/Widgets/Skylighting.hs view
@@ -121,7 +121,7 @@  -- | The base attribute name for all syntax-highlighted renderings. highlightedCodeBlockAttr :: AttrName-highlightedCodeBlockAttr = "highlightedCodeBlock"+highlightedCodeBlockAttr = attrName "highlightedCodeBlock"  -- | The constructor for attribute names for each 'TokenType' in -- Skylighting.