From 2c91d094847a072292f279b18b698b387e5b2397 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Thu, 30 Nov 2023 19:16:15 +0100 Subject: [PATCH] update dependencies this should now work with NixOS 23.11's hackage snapshot --- app/Main.hs | 8 ++++---- bahnhof-name.cabal | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index 8bf2a5f..d874c7d 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -12,8 +12,8 @@ import Data.Csv hiding (lookup) import Data.Either import Data.Function ((&)) import Data.Functor ((<&>)) -import Data.FuzzySet -import Data.List +import Data.FuzzySet.Simple +import Data.List hiding (find) import Data.Map (Map) import qualified Data.Map as M import Data.Maybe (fromMaybe) @@ -58,7 +58,7 @@ findStationName query set = case sorted of sorted = results & fmap (\(_, match) -> (fromIntegral . maybe 0 score . bestMatch (T.unpack query) $ T.unpack match, match)) & sortOn (Down . fst) - results = get set query + results = find query set maybeHbf = filter (T.isInfixOf "Hbf" . snd) sorted data Platform = Platform @@ -253,7 +253,7 @@ main = do <&> decodeWith csvOptions HasHeader putStrLn "building Index ..." - let ril100set = addMany (emptySet 5 6 False) (V.toList (V.map (!! 2) betriebsstellenFiltered)) + let ril100set = addMany (V.toList (V.map (!! 2) betriebsstellenFiltered)) (emptySet 5 6 False) putStrLn (seq ril100set "done") let ril100map = mkDoubleMap $ fmap (\line -> (Ril100 (line !! 1), line !! 2)) betriebsstellen diff --git a/bahnhof-name.cabal b/bahnhof-name.cabal index 10f9c75..7727ccf 100644 --- a/bahnhof-name.cabal +++ b/bahnhof-name.cabal @@ -22,7 +22,7 @@ executable bahnhof-name main-is: Main.hs hs-source-dirs: app build-depends: base ^>=4.16.4.0 - , fuzzyset + , fuzzyset >= 0.3.0 , fuzzyfind , text , vector