packages feed

advent-of-code-ocr 0.1.2.0 → 0.1.2.1

raw patch · 4 files changed

+32/−14 lines, 4 filesdep +th-compatPVP ok

version bump matches the API change (PVP)

Dependencies added: th-compat

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,6 +1,16 @@ Changelog ========= +Version 0.1.2.1+---------------++*December 13, 2022*++<https://github.com/mstksg/advent-of-code-ocr/releases/tag/v0.1.2.1>++*   (#4, @pwm) Update to build with GHC 9++*   (#5, @uvg) Update documentation on what days each glyph set is used.+ Version 0.1.2.0 --------------- 
README.md view
@@ -38,7 +38,7 @@  ## Compatibility -Should be compatible with all challenges from 2015 to 2019.  However, I have+Should be compatible with all challenges from 2015 to 2021.  However, I have only tested it with:  @@ -46,6 +46,8 @@ *   2018 Day 10 *   2019 Day 8 *   2019 Day 11+*   2021 Day 13 (thanks @uvg)+*   2022 Day 10 (thanks @uvg)  And it is possible I have missed some.  If you notice any I am missing, please let me know!
advent-of-code-ocr.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.2.+-- This file has been generated from package.yaml by hpack version 0.35.0. -- -- see: https://github.com/sol/hpack ----- hash: 4eeb46332868b43860577b7f5d67c0b243c4bfed76ed462fc184d5da99771956+-- hash: 94083aa1f55269f050679a333208e3946a74e5e09049f1607b5fa38ce13f9beb  name:           advent-of-code-ocr-version:        0.1.2.0+version:        0.1.2.1 synopsis:       Parse Advent of Code ASCII art letters description:    "OCR" letter recognition for <https://adventofcode.com Advent of Code>                 puzzles, compatible with all puzzles from 2015 to 2019.  Also comes with a@@ -44,6 +44,7 @@     , data-default-class     , heredoc     , template-haskell+    , th-compat     , th-lift     , th-lift-instances   default-language: Haskell2010@@ -63,6 +64,7 @@     , heredoc     , optparse-applicative     , template-haskell+    , th-compat     , th-lift     , th-lift-instances   default-language: Haskell2010@@ -83,6 +85,7 @@     , heredoc     , hspec     , template-haskell+    , th-compat     , th-lift     , th-lift-instances   default-language: Haskell2010@@ -103,6 +106,7 @@     , data-default-class     , heredoc     , template-haskell+    , th-compat     , th-lift     , th-lift-instances   default-language: Haskell2010
src/Advent/OCR/LetterMap.hs view
@@ -22,19 +22,20 @@   , lookupLetterMap   ) where -import           Data.Data                  (Data)+import           Data.Data                         (Data) import           Data.Foldable-import           Data.Map                   (Map)+import           Data.Map                          (Map) import           Data.Monoid import           Data.Semigroup-import           Data.Set                   (Set)+import           Data.Set                          (Set) import           GHC.Generics-import           Instances.TH.Lift          ()+import           Instances.TH.Lift                 () import           Language.Haskell.TH.Lift import           Language.Haskell.TH.Syntax-import           Text.Heredoc               (here)-import qualified Data.Map                   as M-import qualified Data.Set                   as S+import           Language.Haskell.TH.Syntax.Compat (liftSplice)+import           Text.Heredoc                      (here)+import qualified Data.Map                          as M+import qualified Data.Set                          as S  -- | Type used internally to represent points; useful for its 'Num' and -- 'Applicative' instances.@@ -65,7 +66,7 @@       ly <- lift y       pure $ AppE (AppE (ConE 'V2) lx) ly #if MIN_VERSION_template_haskell(2,16,0)-    liftTyped = fmap TExp . lift+    liftTyped = liftSplice . fmap TExp . lift #endif  -- | A point is a 2-vector of ints.@@ -147,7 +148,7 @@ instance Lift LetterMap where     lift (LetterMap x) = AppE (ConE 'LetterMap) <$> lift x #if MIN_VERSION_template_haskell(2,16,0)-    liftTyped = fmap TExp . lift+    liftTyped = liftSplice . fmap TExp . lift #endif  -- | Lookup a set of points for the letter it represents in a 'LetterMap'.@@ -203,7 +204,8 @@     -> m zipWithFold f xs = fold . zipWith f xs --- | Seen in 2016 Day 8, 2019 Day 8 and 11.  4x6 glyphs.+-- | Seen in 2016 Day 8, 2019 Day 8 and 11, 2021 Day 13, 2022 Day 10.  4x6+-- glyphs. -- -- Load using @uncurry 'parseLetterMap'@. rawLetterforms1 :: (String, String)