Empirical study of monad usage in Haskell
Huge prognosis of better than 30 GB of Hackage applications.
Recount monad and the Monad Transformer modules are the most on the total veteran.
Gives insights on metadata akin to quantity of dependencies, stability, and class.
Monads are a mechanism for embedding and reasoning about notions of computation akin to mutable teach, I/O, exceptions, and many others. Even supposing monads are technically language-agnostic, they are largely associated with the Haskell language. Certainly, one would possibly perhaps doubtless per chance argue that the utilization of monads is one among the defining characteristic of the Haskell language. In sharp phrases, monadic programming in Haskell relies on the customary mtl kit library, which offers eight core notions of computation: identity, error, list, teach, reader, author, RWS, and continuations. Despite their frequent spend, we’re no longer responsive to any empirical investigations regarding which monads are the most veteran by developers. In this paper we demonstrate an empirical glance that covers a snapshot of on hand applications in the Hackage repository—covering 85135 applications and better than 5 million Haskell recordsdata. To the handiest of our knowledge this is the first effective-scale prognosis of Hackage with regards to monads and their utilization as dependencies. Our outcomes demonstrate that around 30.8% of the applications count upon the mtl kit, whereas only 1.2% count upon more than just a few, but compatible implementations. Nonetheless, utilization patterns for every divulge monad stay the same both for mtl and alternate alternate choices. By some means, the teach monad is by far the most stylish one, though all of them are veteran. We also document on the distribution of applications that spend mtl, regarding their class and stability degree.
Use of monads
Mining tool repositories
© 2020 Elsevier B.V. All rights reserved.