
Yukang Xie's 30 October write-up runs a Haskell program on Ouros, a combinator graph-reduction processor he put on an FPGA, and is unusually exact about what the machine still cannot do.

IO monad, the one from Peyton Jones and Wadler's 1993 paper on imperative functional programming. type World = Int, and IO a is World -> (a, World). 1World is a dummy Int with no relation to the real world. Its job is to be consumed by one operation and produced by it, so the next operation has to wait for it, which orders effects inside a lazy evaluator. 1writeAXIReg and readAXIReg, written as primitive "IO.Write" and primitive "IO.Read". The compiler turns those into hardware operations, and a dedicated IO unit carries out an AXI4-Lite transaction when one becomes ready. 1| What Ouros does now | What it rules out |
|---|---|
No Float or Double, and no integer division in the ALU | numeric work of any kind; Float would be easy to add, Double harder because of its encoding 1 |
| An 8K × 288-bit heap and a 4K × 288-bit code memory, both on chip | programs much beyond one or two thousand lines; reaching off-chip memory needs a serious redesign 1 |
| The program is compiled into the memory image before the hardware is generated | loading a new program without rebuilding the FPGA design 1 |
| IO is polled, with no hardware interrupt | any device that has to interrupt the processor, a question Xie says he has no answer to yet 1 |
| Haskell support comes from the MicroHs front end, untested feature by feature | confidence about language coverage; algebraic data types, list comprehensions and type classes have worked in practice 1 |
"There is no software runtime or 'kernel trap' underneath, everything is handled by the hardware processor."
"The important part is the dependency: each IO operation consumes a World token and produces one for the next operation. This gives the operations an order, even though the processor evaluates Haskell lazily."
"What I find quite encouraging is that the logic footprint is roughly in the range of a small pipelined RISC-V core."
"For example, what would a small operating system written entirely in Haskell look like?"
bathtub-01.github.io
haskellweekly.news
developer.arm.com
realdigital.org
github.com
This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.