Mini article series: CSV Parsing with Cats

Just in case this is interesting for anybody… I wanted to tinker a bit with github pages and came up with a short article series developing a CSV reader based on cats and cats-effect, starting from a minimalist javaesque implementation. This is neither intended as a tutorial nor as a usable library, rather as a showcase for some applications of Cats abstractions that should trigger further reading and experimentation.

Main focus is on developing a row parser combinator API (plus automatic derivation from case classes/constructor methods) and error handling (including row/col locations for column parse errors). Abstractions used include Functor, Applicative, Monad, StateT, IO and a custom type class. Full code in the final installment (after 8 steps/posts) is < 120 LoC.

Posts: nanocsv | Growing a minimalist CSV reader with Scala 3 and Cats

Pointers to errors or possible improvements are appreciated!

1 Like