summaryrefslogtreecommitdiff
path: root/app/Main.hs
diff options
context:
space:
mode:
authorstuebinm2024-07-26 22:12:38 +0200
committerstuebinm2024-07-26 22:18:21 +0200
commit2dd565d546ef7cba05846e90d79ae4a15a193f41 (patch)
tree0976a8a90b2c58b7e5e4ef6a541b20070e570598 /app/Main.hs
parent8a4723f12fb220204d0aa5ebde8fb65214ad1b47 (diff)
do a s/�/ü/ on the inputHEADmain
this quirk was forgotten during the haskell rewrite (reported by networkException). It's now done in a somewhat awkward way: it's hard to do this before parsing the csv (when it's still an unencoded ByteString), but doing it later might easily miss relevant places. In either case this does lots of slightly unecessary copying 🤷 Also the nested quadruple fmap feels like its own justification
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 3ec2cac..b684ac3 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -292,6 +292,7 @@ main = do
Right (betriebsstellen :: V.Vector [Text]) <-
LB.readFile "data/DBNetz-Betriebsstellenverzeichnis-Stand2021-10.csv"
<&> decodeWith csvOptions HasHeader
+ <&> (fmap . fmap . fmap) (T.replace "�" "ü")
let betriebsstellenFiltered = betriebsstellen
& V.filter (\line -> line !! 4 `notElem` ["BUSH", "LGR", "ÜST", "BFT", "ABZW", "BK", "AWAN", "ANST", "LGR"])
Right (leitpunkte :: V.Vector [Text]) <-