update dependencies

this should now work with NixOS 23.11's hackage snapshot
This commit is contained in:
stuebinm 2023-11-30 19:16:15 +01:00
parent 71c2ceb1c6
commit 2c91d09484
2 changed files with 5 additions and 5 deletions

View file

@ -12,8 +12,8 @@ import Data.Csv hiding (lookup)
import Data.Either import Data.Either
import Data.Function ((&)) import Data.Function ((&))
import Data.Functor ((<&>)) import Data.Functor ((<&>))
import Data.FuzzySet import Data.FuzzySet.Simple
import Data.List import Data.List hiding (find)
import Data.Map (Map) import Data.Map (Map)
import qualified Data.Map as M import qualified Data.Map as M
import Data.Maybe (fromMaybe) import Data.Maybe (fromMaybe)
@ -58,7 +58,7 @@ findStationName query set = case sorted of
sorted = results sorted = results
& fmap (\(_, match) -> (fromIntegral . maybe 0 score . bestMatch (T.unpack query) $ T.unpack match, match)) & fmap (\(_, match) -> (fromIntegral . maybe 0 score . bestMatch (T.unpack query) $ T.unpack match, match))
& sortOn (Down . fst) & sortOn (Down . fst)
results = get set query results = find query set
maybeHbf = filter (T.isInfixOf "Hbf" . snd) sorted maybeHbf = filter (T.isInfixOf "Hbf" . snd) sorted
data Platform = Platform data Platform = Platform
@ -253,7 +253,7 @@ main = do
<&> decodeWith csvOptions HasHeader <&> decodeWith csvOptions HasHeader
putStrLn "building Index ..." 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") putStrLn (seq ril100set "done")
let ril100map = mkDoubleMap $ fmap (\line -> (Ril100 (line !! 1), line !! 2)) betriebsstellen let ril100map = mkDoubleMap $ fmap (\line -> (Ril100 (line !! 1), line !! 2)) betriebsstellen

View file

@ -22,7 +22,7 @@ executable bahnhof-name
main-is: Main.hs main-is: Main.hs
hs-source-dirs: app hs-source-dirs: app
build-depends: base ^>=4.16.4.0 build-depends: base ^>=4.16.4.0
, fuzzyset , fuzzyset >= 0.3.0
, fuzzyfind , fuzzyfind
, text , text
, vector , vector