In applications with a complex structure of side-effects, effects should be dealt with modularly: components should be programmed against abstract effect interfaces that other components can instantiate as required, and reusable effect patterns should be factored out from the rest of the application. In this paper, we study a new, general approach to achieve this in Haskell by combining effect polymorphism and the recently proposed coherent explicit dictionary applications. We demonstrate the elegance and generality of our approach in μVeriFast: a Haskell-based reimplementation of the semi-automatic separation-logic-based verification tool VeriFast. This implementation features a complex interplay of advanced side-effects: a backtracking search of program paths with angelic and demonic non-determinism, interaction with an underlying off-the-shelf SMT solver, and mutable state that is either backtracked or not during the search. Our use of effect polymorphism improves over the current non-modular implementation of VeriFast, allows us to nicely factor out the backtracking search pattern as a new AssumeAssert monad, and enables advanced features involving effects, such as the non-intrusive addition of a graphical symbolic debugger based on delimited continuations.
Original languageEnglish
Title of host publicationProceedings of the 12th ACM SIGPLAN International Symposium on Haskell
Place of PublicationNew York, NY, USA
Number of pages14
ISBN (Print)978-1-4503-6813-1
Publication statusPublished - 2019
Event12th ACM SIGPLAN International Haskell Symposium - Berlin, Germany
Duration: 22 Aug 201923 Aug 2019
Conference number: 12

Publication series

NameHaskell 2019


Conference12th ACM SIGPLAN International Haskell Symposium
Abbreviated titleHaskell ’19
Internet address

    Research areas

  • Haskell, backtracking search, effect polymorphism, modular effects, monads, separation logic, symbolic execution

ID: 46792706