1
1
mirror of https://github.com/Yvee1/hascard.git synced 2024-11-22 04:33:06 +03:00

Update ghc and dependency versions

This commit is contained in:
Yvee1 2022-06-25 20:53:53 +02:00
parent 6ac51f6cd3
commit 1939744441
6 changed files with 16 additions and 16 deletions

View File

@ -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

View File

@ -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

View File

@ -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 $

View File

@ -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

View File

@ -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.

View File

@ -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