{"slug": "announcing-prospero-a-strongly-typed-configuration-language-with-haskell-like", "title": "Announcing Prospero: a strongly-typed configuration language with Haskell-like syntax", "summary": "A developer has announced Prospero, an early-prototype strongly-typed configuration language with Haskell-like syntax that evaluates to JSON or YAML, published on Codeberg at codeberg.org/theinnerlight/prospero. Prospero's type system includes units of measure, as shown by an example where `prospero evaluate --to-json example.ppo` prints \"3584 MiB\" from a list of services with memory and replica counts, and it rejects non-structurally-recursive definitions with an elaboration error. The author positions Prospero against Dhall and Nickel and against generating configuration in mainstream languages such as Pulumi and Scala's sbt, arguing that arbitrary side effects and non-terminating code in configuration are \"a category error,\" and recommends Dhall for anyone needing a mature, production-proven configuration language.", "body_md": "I’m announcing [Prospero](https://codeberg.org/theinnerlight/prospero) - a new configuration language with Haskell-like syntax that currently evaluates to JSON or YAML.\n\nFor a good few years now, I’ve been investigating the space of configuration languages like Dhall and Nickel. If you have to write complex configuration when working with the likes of terraform or kubernetes, these kinds of languages can drastically reduce the amount of complexity you’re confronted with and the volume of repetitive code you have to maintain. Despite their perfect fit for the problem space, I’ve never been entirely happy with any of the language options already available: I’ve been hungry for more type system features and the powerful type inference that languages like Haskell have treated us to.\n\nLate last year, I completed a major infrastructure as code project in Pulumi. It offers another arguably compelling solution to a similar problem: generate configuration in a mainstream programming language. I’ve encountered similar ideas from time to time: Scala’s `sbt` is another one I’ve used a fair bit that does something similar, letting you write your project’s build configuration in Scala.\n\nThese kinds of approaches are extremely powerful but they come at a tremendous cost in both the amount and the types of complexity you have to deal with in configuration. In my opinion, being able to write arbitrary side effects and arbitrary non-terminating code in configuration isn’t a feature, it’s a category error.\n\nSo, I decided to try and build a language that meets all of my needs more precisely.\n\nProspero has a type system that features:\n\nHere is a little taster:\n\n`example.ppo`\n\n```\nmeasure MiB\nmeasure GiB = <1024 MiB>\n\ndata Service = Service\n  { name : String\n  , memory : Integer<MiB>\n  , replicas : Int\n  }\n\nmemoryFootprint : [Service] -> Integer<MiB>\nmemoryFootprint s = sum <| map (\\x -> x.memory * x.replicas) s\n\nlet services =\n  [ Service\n      { name = \"api\"\n      , memory = 512<MiB>\n      , replicas = 3\n      }\n  , Service\n      { name = \"postgres\"\n      , memory = 2<GiB>\n      , replicas = 1\n      }\n  ]\n\ntoString <| memoryFootprint services\n```\n\nRunning `prospero evaluate --to-json example.ppo` prints:\n\n```\n\"3584 MiB\"\nphp\ndata Nat\n  = Zero\n  | Succ Nat\n\ntoInt : Nat -> Int\ntoInt n = case n of\n  Zero   -> 0\n  Succ m -> 1 + toInt m\n\ntoInt (Succ (Succ (Succ (Succ Zero))))\n```\n\nProspero accepts the above and it evaluates to 4.\n\nIf you instead wrote (using `n` instead of `m`)…\n\n``` php\ntoInt : Nat -> Int\ntoInt n = case n of\n  Zero   -> 0\n  Succ m -> 1 + toInt n\n```\n\n…you would see ``elaboration error: `toInt` is recursive, but no argument gets structurally smaller on every recursive call``\n\nProspero is currently an early prototype. I’m sharing it mostly to find out if people are interested and what features I should spend time on next. If you’re looking for a mature and production-proven configuration language, I recommend Dhall.\n\nAt this stage, please do not expect:\n\nOn the other hand, you might see:\n\nHere are some things I’m thinking about adding in the future:\n\nThoughts, ideas and contributions are all very much welcome.", "url": "https://wpnews.pro/news/announcing-prospero-a-strongly-typed-configuration-language-with-haskell-like", "canonical_source": "https://discourse.haskell.org/t/announcing-prospero-a-strongly-typed-configuration-language-with-haskell-like-syntax/15120#post_1", "published_at": "2026-11-16 18:54:21+00:00", "updated_at": "2026-11-16 19:23:09.821066+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Prospero", "Dhall", "Nickel", "Pulumi", "Scala", "sbt", "Codeberg"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/announcing-prospero-a-strongly-typed-configuration-language-with-haskell-like", "markdown": "https://wpnews.pro/news/announcing-prospero-a-strongly-typed-configuration-language-with-haskell-like.md", "text": "https://wpnews.pro/news/announcing-prospero-a-strongly-typed-configuration-language-with-haskell-like.txt", "jsonld": "https://wpnews.pro/news/announcing-prospero-a-strongly-typed-configuration-language-with-haskell-like.jsonld"}}