Recently Martijn Bastiaan, QBayLogic’s COO, invited Well-Typed to come to QBayLogic HQ and give a one-day workshop on falsify, the new property based testing library that I developed for the Haskell Symposium back in 2023 (paper, presentation). QBayLogic is the company behind Clash: a purely functional language for hardware design. In case you haven’t heard of it, Clash translates Haskell to VHDL or Verilog, which can in turn be translated to actual hardware. It literally uses ghc as its frontend so you have essentially the full power of Haskell available. It’s a great project, I recommend checking it out.

The falsify library takes its main inspiration from the Python Hypothesis library, though it is not a direct translation: it takes the same core idea (“parse, don’t generate”) but reinterprets it in a way that better suits the Haskell way of thinking: more axiomatic approach, support for generating infinite data types (including functions), etc. For more information on falsify, see also the original blog post that announced it, falsify: Hypothesis-inspired shrinking for Haskell.

At QBayLogic HQ we spent the morning developing mini-falsify from scratch, so that we could focus on the main ideas without getting bogged down in the details of the full library; similar in spirit to for example TinyServant, or perhaps Stephen Diehl’s Typechecker Zoo. In the afternoon we hacked on falsify and its application within the clash ecosystem. Partly as a result of that work and partly as a result of me taking this opportunity to do some long overdue maintenance on falsify, there is now a new falsify release: falsify-0.4.0. In the remainder of this blog post we give a brief overview of the main changes.

(read more)

Other recent blog posts