Write a Blog >>
ICFP 2020
Thu 20 - Fri 28 August 2020
Fri 28 Aug 2020 14:22 - 14:44 at HIW - Sessions 4 and 5

Digital circuits often use bidirectional interfaces to provide back-pressure or to represent request-response channels. Writing such interfaces manually in Haskell, with arguments in the “forward” direction and results in the “backward” direction, is tedious and error prone. This is especially true when composing multiple interfaces together.

We introduce ‘circuit-notation’, a source plugin that introduces an arrow-like do notation DSL for constructing circuits with bidirectional interfaces in Clash; a GHC-based Haskell-to-Circuit compiler. The plugin automates all of the aspects that makes the manual composition of circuits with bidirectional interfaces tedious and error-prone and it is used in a significant portion of Myrtle.ai’s Clash code.

The prototype for the DSL was implemented as a QuasiQuoter, but has since transitioned to a source plugin with native looking syntax and error messages. In this talk you will get details on what makes bidirectional interfaces error prone to deal with in “native” Clash/Haskell, how the DSL solves these problems and what the advantages and disadvantages are of the source plugin vs the QuasiQuoter solution. While the circuit-notation DSL itself is specific to circuit design, the talk will also be relevant to anyone interested in making their own haskell syntax based DSL.

Fri 28 Aug

Displayed time zone: Eastern Time (US & Canada) change

14:00 - 17:30
Sessions 4 and 5HIW at HIW
14:00
22m
Talk
Implementation of linear types
HIW
14:22
22m
Talk
Circuit Notation Source Plugin
HIW
15:00
45m
Talk
Lightning Talks 2
HIW

15:45
12m
Talk
Embracing a Mechanized Formalization Gap: Interactive reasoning for Haskell at scale
HIW
Antal Spector-Zabusky University of Pennsylvania, Joachim Breitner DFINITY Foundation, Stephanie Weirich University of Pennsylvania, Yao Li University of Pennsylvania
16:00
20m
Talk
Closing
HIW
Ben Gamari Well-Typed LLP