Skip to content

Linear Types for Circuit Design

Linear Types for Circuit Design

Details

Note: Unlike previous meetings, the talk portion of this meeting will be recorded and uploaded to YouTube. Because of this it will be hosted on Zoom instead of the usual Jitsi, since it makes recording easier. You should be able to joing the meeting without a Zoom account. The link for joining should become active shortly before the meeting, around 6:45pm.

Welcome to our meetup for the month of February! This month, Christiaan Baaij will giving a talk in which he revisits a couple of topics we saw last month in further detail:

## Linear Types for Circuit Design

Last meetup we had a talk on using Clash to program FPGAs with Haskell and a talk on Linear Types, more specifically, their implementation in the recent 9.0.1 release of the GHC Haskell compiler. This talk will be about combining those two subjects. If you are somewhat familiar with linear types and circuit design (which you hopefully are after last meetup’s talks!), you might wonder what kind of values must be used linearly in a circuit? Or asked differently: what kind of values cannot be “shared” in a circuit description? The answer is: functions! Functions cannot be shared. During this talk you will learn a bit more as to how Clash translates Haskell functions to circuits, especially higher-order functions; why functions cannot be “shared”; and how Clash could translate higher-order functions if those functional arguments are guaranteed to be used linearly. Time permitting, you will also get to see some examples, including one based on the “safe” use of unsafePerformIO where that safety depends on linear use, and be exposed to some of the pitfalls walked into by the presenter.

Photo of Cambridge NonDysFunctional Programmers group
Cambridge NonDysFunctional Programmers
See more events