An Experiment in Fragment-Based Code Distribution
Existing code package managers enable developers to share and reuse code at the granularity of a package. Being able to share and reuse code at the granularity of individual functions might lower the barriers to do so. Can we still support existing workflows and at the same time realize purported advantages of fragment-based code distribution?
The idea of fragment-based code distribution comes up frequently in online discussions but is rarely published about academically. There are projects that create new languages that enable programmers to share code at very low granularity. Examples are morte and unison.
We want to evaluate the viability of such an approach for Haskell code distribution. We are developing a proof-of-concept tool fragnix. In contrast to projects that create new languages we have access to a huge amount of code via hackage.
In the talk we will demonstrate:
- That we could shatter this code into fragments that we can reuse individually.
- A basic development workflow using our tool.
- Faster initial installation time when you only use part of a package.
- That our tool produces smaller binaries than GHC alone under default settings.
Our overall aim is to facilitate substantive discussion of the fragment-based approach to code distribution.