An “Updo” is a hairstyle and a way of making and upgrading Haskell projects.
Make projects from packages, versions1 and commits2.
What is a Project?
A project is a set of packages and other configuration that enable working on those packages together.
Need
Updo grew to fill a need after every other way I could find to maintain projects was unsatisfactory for the specific problem I had, herding hundreds of packages and their dependencies into buildable projects over two compiler versions for both cabal and stack.
Goals
- One configuration for multiple project tools; for all of cabal, stack and Haskell.nix.
- Minimize the effort of upgrading to a new GHC version.
We do this with configuration in .dhall files, makefiles and dhall text templates. We also have some simple Haskell scripts for operations not possible in Dhall like sorting a List Text3.
Dhall has excellent imports and is an intentionally limited typed programming language. We use dhall’s text command to write cabal and stack projects using dhall text templating.
The dhall executable comes with a format command4. This helps in the maintenance of the various .dhall files.
An example of the limits of the language we encountered in Updo is not being able to compare anything but Natural values. Sorting something like List Text is not possible but there is great interop with Haskell so this can be done over there as we do with scripts.
What can be Configured
Updo is good for project packages, constraints5, source repository packages6 and stackage resolver7. More than this can be added into a project template snippet for free-form content.
Testimonials
The more I use it, the more I love it as a fast and simple solution for maintaining Haskell projects.
— @philderbeast
Footnotes
A dependency version equality constraint.↩︎
A package not published to hackage or stackage.↩︎
Dhall can only sort
List Natural.↩︎Formatting is also available with the Dhall LSP Server.↩︎
A dependency version equality constraint.↩︎
A package not published to hackage or stackage.↩︎
For cabal, the cabal.config will have to be downloaded to
project-stackage/resolver.configand then edited to comment out constraints that would otherwise lead to impossible to solve conflicting constraints because cabal constraints are additive and cannot be overridden.↩︎