Evaluating Linear Functions to Symmetric Monoidal Categories
summary
Arrows lose needed parallelism because they force tuple-shaped inputs, so encoding box-and-wire diagrams as arrows wastes CPU; the claim is that symmetric monoidal categories are the right model and can be encoded in Haskell using LinearTypes. The implementation represents each box as a linear function from ports-as-typed-pairs to ports, embeds the SMC into a free cartesian category, then performs an encode/decode runtime elimination of projections and pairings so no duplication occurs. Result: readable code that restores exact parallelism for long-running workflows; requires some metaprogramming tradeoffs.
AI-written summary · about
chapters (7)
- 0:00Introduction to box diagrams
- 2:02The limitations of arrows
- 5:57Symmetric monoidal categories
- 12:39Linear types as a solution
- 16:51Implementing the library
- 20:40Defining ports and syntax
- 25:33Q&A and closing remarks
related talks
30mDisplayed Monoidal Categories for the Semantics of Linear Logic
52mCategory Theory Through Functional Programming (part 1/3)
34mThe Monoiad: an epic poem on monoids
57mApplied category theory and abstract algebra
51mCategory Theory for the Working Hacker
01h 29mCategory Theory Track by Bartosz Milewski Part 1
56mCategory Theory Through Functional Programming (part 2/3)
23mDuality and How to Delete Half (minus ε) of Your Code
