At work, I came across this case study from 2019 about implementing network drivers in various high-level programming languages, including Haskell.
The Haskell network driver implementation is here:
The Haskell implementation is not very performant (both in terms of latency and throughput), but it is small (both in terms of lines of code and source size) and doesn’t include any c code. Per the authors, Haskell also protects against major classes of bugs found in the original C driver: OOB in general memory, use-after-free in general memory, OOB in packet buffers, use-after-free in packet buffers, and int overflow.
I’m curious if there have been any developments since 2019 that would make Haskell better-suited for this use case. nonmoving gc is one, as it should reduce latency (which is very important for this application), but are there any others?
I haven’t seen anything in this vein using Haskell specifically, and the obvious high-level language in this space is now Rust. But if you want to stay within the ML-family, perhaps OxCaml might be worth a look?