Skip to main contentSkip to search
Episciences
Open Access Journals
Sign in(new window)
Journal of Functional Programming logo
Journal of Functional Programming
Journal of Functional Programming logo
Journal of Functional Programming
Sign in(new window)
Articles & Issues
All articlesAll accepted articlesAll volumesSectionsAuthors
About
The journalIndexingNews
Boards
Publish
For authorsEthical charterFor reviewers
Submit
Journal of Functional Programming logo
Journal's leaflet
|
Contact
|
Credits
eISSN 1469-7653
|
RSS
|
Atom
Episciences
Documentation
|
Acknowledgements
|
Publishing policy
Accessibility: non-compliant
|
Legal mentions
|
Privacy statement
|
Terms of use
  1. Home > Articles & Issues >
  2. Articles >
  3. Adapting the MVVM pa ...
Article

Adapting the MVVM pattern to C++ frontends and Agda-based backends

Viktor Csimma ORCID
Download article
Open on arXiv
Submitted on
February 5, 2025
Accepted on
March 4, 2026
Published on
August 13, 2026
Last modified on
August 12, 2026
Volume 36
Volume 36
Tools and Applications
DOI
10.46298/jfp.17822

Adapting the MVVM pattern to C++ frontends and Agda-based backends

Viktor Csimma ORCID
Abstract
Using agda2hs and ad-hoc Haskell FFI bindings, writing Qt applications in C++ with Agda- or Haskell-based backends (possibly including correctness proofs) is already possible. However, there was no repeatable methodology to do so, nor to use arbitrary Haskell built-in libraries in Agda code. We present a well-documented, general methodology to address this, applying the ideas of the Model-View-ViewModel architecture to models implemented in functional languages. This is augmented by a software development kit providing easy installation and automated compilation. For obstacles arising, we provide solutions and ideas that are novel contributions by themselves. We describe and compare solutions for using arbitrary Haskell built-ins in Agda code, highlighting their advantages and disadvantages. Also, for user interruption, we present a new Haskell future design that, to the best of our knowledge, is the first to provide for arbitrary interruption and the first to provide for interruption via direct FFI calls from C and C++. Finally, we prove with benchmarks that the agda2hs compiler at the base of our methodology is viable when compared to other solutions, specifically to the OCaml extraction feature of Rocq and the default MAlonzo backend of Agda.
Keywords
  • Programming Languages
  • D.3.3; D.2.4
Preview
Loading PDF preview...