From 1939744441839dfd04a98efe3b9a8645d252fe0f Mon Sep 17 00:00:00 2001 From: Yvee1 Date: Sat, 25 Jun 2022 20:53:53 +0200 Subject: [PATCH] Update ghc and dependency versions --- package.yaml | 14 +++++++------- src/Parser.hs | 2 +- src/UI/BrickHelpers.hs | 4 ++-- src/UI/Cards.hs | 2 +- stack.yaml | 2 +- stack.yaml.lock | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.yaml b/package.yaml index 09f6a64..dc68e57 100644 --- a/package.yaml +++ b/package.yaml @@ -21,24 +21,24 @@ description: Hascard is a text-based user interface for reviewing notes dependencies: - base >= 4.7 && < 5 -- brick >= 0.52.1 && < 0.60 +- brick >= 0.52.1 && < 0.70.0 - containers > 0.6.0 && < 0.7 - directory >= 1.3.3 && < 1.4 - filepath >= 1.4.2 && < 1.5 - microlens >= 0.4.11 && < 0.5 - microlens-platform >= 0.4.1 && < 0.5 -- mwc-random >= 0.14 && < 0.15 -- optparse-applicative >= 0.15.1 && < 0.16 +- mwc-random >= 0.14 && < 0.16 +- optparse-applicative >= 0.15.1 && < 0.18 - ordered-containers >= 0.2.2 && < 0.3 - megaparsec >= 8.0.0 && < 10 - process >= 1.6.5 && < 1.7 -- random-fu >= 0.2.7 && < 0.3 +- random-fu >= 0.2.7 && < 0.4 - strict >= 0.3.2 && < 0.5 - text >= 1.2.3 && < 1.3 - vector >= 0.12.0 && < 0.13 -- vty >= 5.28.2 && < 5.33 -- word-wrap >= 0.4.1 && < 0.5 -- tasty >= 1.2.1 && < 1.3 +- vty >= 5.28.2 && < 5.36 +- word-wrap >= 0.4.1 && < 0.6 +- tasty >= 1.2.1 && < 1.5 - tasty-hunit >= 0.10.0 && < 0.11 - tasty-quickcheck >= 0.10.1 && < 0.11 - split >= 0.2.3 && < 0.3 diff --git a/src/Parser.hs b/src/Parser.hs index 88f0830..cbd810d 100644 --- a/src/Parser.hs +++ b/src/Parser.hs @@ -22,7 +22,7 @@ parseCards :: String -> Either String [Card] parseCards s = case parse pCards "failed when parsing cards" s of Left parseErrorBundle -> Left $ errorBundlePretty (parseErrorBundle :: ParseErrorBundle String Void) Right msgOrCards -> left wrap (sequence msgOrCards) - where wrap = unlines . map unpack . wrapTextToLines (WrapSettings {preserveIndentation=False, breakLongWords=True}) 40 . pack + where wrap = unlines . map unpack . wrapTextToLines (defaultWrapSettings {preserveIndentation=False, breakLongWords=True}) 40 . pack pCards :: Parser [Either String Card] pCards = (pCard `sepEndBy1` seperator) <* eof diff --git a/src/UI/BrickHelpers.hs b/src/UI/BrickHelpers.hs index 447c396..ac74b7b 100644 --- a/src/UI/BrickHelpers.hs +++ b/src/UI/BrickHelpers.hs @@ -21,7 +21,7 @@ hCenteredStrWrapWithAttr :: (Widget n -> Widget n) -> String -> Widget n hCenteredStrWrapWithAttr attr p = Widget Greedy Fixed $ do c <- getContext let w = c^.availWidthL - let result = vBox $ map (hCenter . attr . txt) $ wrapTextToLines (WrapSettings {preserveIndentation=False, breakLongWords=True}) w (pack p) + let result = vBox $ map (hCenter . attr . txt) $ wrapTextToLines (defaultWrapSettings {preserveIndentation=False, breakLongWords=True}) w (pack p) render result -- Somewhat inefficient because rendering is done just to @@ -79,7 +79,7 @@ yesnoField rightAlign stLens name label initialState = , formFieldRenderHelper = id , formFieldConcat = vBox } -renderYesno :: Bool -> String -> n -> Bool -> Bool -> Widget n +renderYesno :: Ord n => Bool -> String -> n -> Bool -> Bool -> Widget n renderYesno rightAlign label n foc val = let addAttr = if foc then withDefAttr focusedFormInputAttr else id in clickable n $ diff --git a/src/UI/Cards.hs b/src/UI/Cards.hs index 0fe7bbd..2aac862 100644 --- a/src/UI/Cards.hs +++ b/src/UI/Cards.hs @@ -91,7 +91,7 @@ drawHeader title = withAttr titleAttr $ hCenteredStrWrap title wrapSettings :: WrapSettings -wrapSettings = WrapSettings {preserveIndentation=False, breakLongWords=True} +wrapSettings = defaultWrapSettings {preserveIndentation=False, breakLongWords=True} drawDescr :: String -> Widget Name drawDescr = strWrapWith wrapSettings diff --git a/stack.yaml b/stack.yaml index aac7bcd..b4fb0b0 100644 --- a/stack.yaml +++ b/stack.yaml @@ -17,7 +17,7 @@ # # resolver: ./custom-snapshot.yaml # resolver: https://example.com/snapshots/2018-01-01.yaml -resolver: lts-17.4 +resolver: lts-19.13 # User packages to be built. # Various formats can be used as shown in the example below. diff --git a/stack.yaml.lock b/stack.yaml.lock index 108ab08..0c31e12 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -6,7 +6,7 @@ packages: [] snapshots: - completed: - size: 563103 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/4.yaml - sha256: f11e2153044f5f71ea7b1c9398f4721f517c9bd37642ed769647b896564021f3 - original: lts-17.4 + size: 618740 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/13.yaml + sha256: ef98d70e4018bf01feb00ccdcd33ab26d056dbb71b38057c78fdd0d1ec671c85 + original: lts-19.13