Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
research:empirical-monads [2017/09/21 15:21]
ifigueroap
research:empirical-monads [2018/07/09 16:41]
ifigueroap
Line 1: Line 1:
 ====== Empirical Research: How Monads are used in Haskell ====== ====== Empirical Research: How Monads are used in Haskell ======
  
 +===== Submission to SCP Special Issue =====
 +
 +Article submitted to the Science of Computer Programming Journal. This is an extended version of the SBLP 2017 article.
 +
 +==== Abstract ====
 +
 +Monads are a denotational approach to embed and reason about notions of computation such as mutable state, I/O, exceptions, and many others. Even though monads are technically language-agnostic,​ they are mostly associated to the Haskell language. Indeed, one could argue that the use of monads is one of the defining characteristic of the Haskell language. In practical terms, monadic programming in Haskell relies on the standard mtl package library, which provides 8 notions of computation:​ Identity, Error, List, State, Reader, Writer, RWS, and Continuations. Despite their widespread use, we are not aware of any empirical investigations regarding how developers use monads. In this paper we present an empirical study that covers all packages available in a snapshot of the Hackage repository, covering 3245 different packages, 85135 total package-version combinations,​ and around 5842979 Haskell files. To the best of our knowledge this is the first large-scale analysis of Hackage with regards to monads and their usage. Our results show that around 30.8 modules depend on the mtl package, whereas only 69.2 yet compatible implementations. Nevertheless,​ usage patterns for each specific monad remain similar both for mtl and alternatives. Regarding usage, the State computation,​ as well as its variations such as Reader and Writer is by far the most used one. Perhaps surprisingly,​ the library for monad transformers takes a very close second place. We also report on the distribution of packages that use mtl, regarding their category and stability level.
 +
 +==== Artifacts ====
 +  * {{research:​scp2018-analysis.zip|Analysis scripts and datasets}}
 +
 +----
  
 ===== SBLP 2017 article ===== ===== SBLP 2017 article =====
Line 28: Line 40:
 distribution of packages that use mtl, regarding their category and distribution of packages that use mtl, regarding their category and
 stability level. stability level.
 +
 +==== Artifacts ====
  
   * {{research:​sblp2017-analysis.zip|Analysis scripts and datasets}}   * {{research:​sblp2017-analysis.zip|Analysis scripts and datasets}}
   * {{research:​papers:​figueroa-sblp2017.pdf|PDF preprint}}   * {{research:​papers:​figueroa-sblp2017.pdf|PDF preprint}}
   * {{research:​papers:​figueroa-sblp2017-slides.pptx|Slides}}   * {{research:​papers:​figueroa-sblp2017-slides.pptx|Slides}}