Last active
April 2, 2024 20:16
-
-
Save tfausak/ec68921ed4d9a3aadf6f21c1c0f11acc to your computer and use it in GitHub Desktop.
Normalize CSV with Haskell.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
-- stack --resolver lts-8.6 --install-ghc script | |
import Data.ByteString | |
import Data.Conduit | |
import Data.Conduit.Binary | |
import Data.CSV.Conduit | |
import System.IO | |
main = transformCSV | |
defCSVSettings | |
(sourceHandle stdin) | |
(awaitForever yield :: Conduit (Row ByteString) IO (Row ByteString)) | |
(sinkHandle stdout) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment