Engineering · 15 min read
Why Haskell is joining Lua and Rust as a first-class language in Platinum
Lua gives you immediacy. Rust gives you systems control. Haskell brings pure functional programming, expressive types, and another powerful way to build software across the Platinum platform.
In this article
Two languages got us far, and left an interesting gap
Platinum has always had two natural poles.
At one end is Lua: lightweight, approachable, and ideal for experimenting with the scene, interface, or document you're shaping. At the other is Rust: a powerful systems language offering memory safety, predictable performance, and direct control over rendering, networking, and native integrations.
Both are excellent tools, and neither is going anywhere.
But there's a broad category of software where the hardest problem isn't performance or rapid iteration. It's managing complexity.
Think about a licensing system that must never grant access to an expired entitlement, a game economy that needs to remain consistent across thousands of transactions, or a business workflow where an approval cannot proceed until every required condition has been satisfied.
These are problems of rules, relationships, and state. They're problems where correctness matters, and where a seemingly harmless change six months later can introduce a bug somewhere nobody thought to look.
That's where Haskell comes in.
We're bringing Haskell into Platinum as a first-class language alongside Lua and Rust, giving developers another way to build applications, games, services, and tools without leaving the platform.
A little history: functional programming has been here a while
Haskell isn't a new language chasing a new trend. Its roots go back to decades of research into functional programming, mathematics, and programming language design.
In 1987, a group of researchers began work on a common, open language for purely functional programming. Named after mathematician and logician Haskell Curry, the language reached its first published specification in 1990. Haskell 98 later established a stable foundation, followed by Haskell 2010 and continued development through the Glasgow Haskell Compiler (GHC) and its ecosystem.
The idea behind Haskell was distinctive: rather than treating a program primarily as a sequence of instructions that change things, treat computation as the evaluation and composition of functions.
That doesn't mean Haskell can't interact with files, databases, networks, or user interfaces. It means those interactions are explicitly represented and separated from ordinary pure computation.
Over the years, ideas developed and popularized in functional programming have found their way into mainstream software engineering: immutable data, algebraic data types, pattern matching, higher-order functions, and increasingly expressive type systems.
Haskell brings these ideas together in a language designed around them from the beginning.
For Platinum, that makes it an interesting complement to the languages we already support.
What Haskell actually brings to the table
The most important difference isn't simply that Haskell has a strong type system. Rust has one too, and Lua can be paired with static analysis and type annotations.
It's the way Haskell encourages you to structure a program.
In Haskell, pure functions produce results without modifying external state or causing observable side effects. Given the same inputs, they produce the same outputs.
That sounds simple, but it changes how you design software.
A permission rule can be a function of an identity, a resource, and a set of capabilities. A game simulation can calculate its next state from its current state and a set of actions. A document transformation can take one representation of a document and produce another without modifying the original.
Those functions can be tested independently, composed into larger operations, and reasoned about without having to reproduce an entire running application.
Haskell also makes extensive use of algebraic data types, allowing developers to describe the valid forms a piece of data can take.
A payment, for example, might be Pending, Authorized, Settled, or Failed, with different information associated with each state. Rather than scattering string comparisons and assumptions throughout an application, those possibilities become part of the program's type definitions.
The compiler can then help identify incomplete pattern matches and incompatible uses when the model changes.
This doesn't magically make software bug-free, or mean that every business invariant is automatically proven. It does give developers powerful tools to express their assumptions clearly and catch many mistakes before deployment.
And because Platinum already emphasizes capability-scoped permissions, consistent objects, and recoverable application state, Haskell's approach fits naturally into the way we think about software.
What can you build with Haskell in Platinum?
We're not adding Haskell just to make another language appear on a compatibility list. The goal is to make it useful throughout Platinum, whether you're developing a backend, creating a game, building a desktop application, or automating a document.
Here are four examples of where we think it belongs.
1. Platinum Server: business logic you can reason about
Imagine building a subscription and licensing service using Platinum Server.
The service needs to authenticate users, evaluate subscriptions, manage entitlements, enforce organizational policies, and expose endpoints to other applications.
Some of those operations involve side effects: reading a database, validating a session, sending a notification, or updating a record.
But the rules themselves can be pure.
A Haskell module could evaluate whether a particular license grants access to a requested feature, calculate a renewal date, or determine which transitions are permitted in a subscription's lifecycle.
Platinum Server would provide the surrounding infrastructure: HTTP endpoints, application hosting, authentication integrations, and access to the broader Platinum object model.
The result: Haskell handles the rules, while Platinum handles the application environment.
This is particularly attractive for financial software, HR systems, licensing authorities, access-control services, protocol validators, and other applications where business logic becomes complicated long before performance becomes the bottleneck.
How is that different from IHP?
If you're familiar with Haskell web development, you may already know IHP (Integrated Haskell Platform), a Haskell web framework.
We love IHP. It brings an opinionated, integrated approach to building web applications with Haskell, and there's a lot to appreciate about that.
But Platinum Server is a different kind of product.
IHP provides a Haskell-centered application framework and development workflow. Platinum Server is part of a broader, language-independent platform.
Using Haskell with Platinum Server doesn't mean committing your entire application to a Haskell-specific framework. Your service can use Haskell for the parts that benefit from it, while sharing Platinum's application contracts, identity model, and Runtime infrastructure with components written in Lua, Rust, or other supported languages.
A team might write its authorization engine in Haskell, a native processing module in Rust, and application-specific scripting in Lua, all participating in the same system.
Nor are we trying to replace Haskell's existing ecosystem. Developers should be able to benefit from its libraries and tools where the integration supports them.
We're not building a Haskell-only world inside Platinum. We're making Haskell a first-class participant in a larger one.
2. Platinum Game Creator: simulation, rules, and complex game systems
Haskell might not be the first language that comes to mind when building a game, but games contain far more than rendering loops and input handlers.
Consider a strategy game with a complex economy.
Every turn, factories consume resources, populations generate demand, trade routes move goods, and political decisions change the rules governing production.
You could implement those systems as a collection of pure functions operating on the current game state and producing the next one.
That makes it easier to test scenarios, reproduce unexpected outcomes, and run simulations without having to launch the entire game.
The same approach can be useful for turn-based combat, inventory rules, procedural generation, quest prerequisites, dialogue conditions, and AI decision-making.
In Platinum Game Creator, the intention is for Haskell modules to work with the same game objects and engine interfaces available to other supported languages.
A developer could use Lua to script interactions and rapidly iterate on behaviors, Rust to implement a demanding native system, and Haskell to express the rules governing a complex simulation.
This doesn't mean Haskell is necessarily the best choice for a high-frequency rendering or physics loop. Lazy evaluation and memory behavior require particular care in latency-sensitive code.
But there's an enormous amount of game logic where clarity, reproducibility, and correctness are more valuable than squeezing every last instruction out of the CPU.
A game engine should give you the freedom to choose the right tool for each system, not force every system to look alike.
3. Platinum Runtime: desktop and web applications with dependable behavior
Now consider a desktop application for managing projects, clients, invoices, and approvals.
Its interface might be straightforward, but the rules underneath can become complicated quickly.
Who can approve an expense? What happens when an invoice is partially paid? Which actions should be available when a project is archived? How should the application reconcile an offline change with newer server data?
These are excellent candidates for functional modeling.
With Haskell, the application can represent its states and transitions explicitly, while Platinum's UI bindings connect those models to the interface.
The same domain logic could potentially be reused between a desktop application, its web counterpart, and a Platinum Server backend, subject to the supported build targets and integration boundaries.
The user doesn't need to know or care which language implements a particular operation. They see a consistent interface, predictable behavior, and an application that responds coherently when something goes wrong.
For developers, the benefit is being able to keep complex rules separate from presentation code without abandoning Platinum's native UI framework, Live Objects, or deployment model.
And Haskell doesn't have to own the entire application.
A mostly Lua-driven interface could call into a Haskell module for validation or state transitions. A Rust component could perform intensive processing while Haskell coordinates the rules determining what should happen next.
One application, one object model, multiple languages working where they're strongest.
4. Live Documents and Live Objects: transformations, automation, and macros
This is one of the applications we're particularly interested in exploring.
Platinum's Live Documents and Live Objects are intended to make application data more consistent and useful across different views, tools, and workflows.
Haskell is a natural fit for operations that transform structured data.
Imagine a macro that examines a collection of Live Objects representing invoices, validates their relationships, calculates outstanding balances, and produces a summary document.
Or a document-processing program that takes a structured report, applies a series of transformations, and generates different outputs for different audiences.
A Haskell function could accept an immutable representation of the input data and produce a transformed result. The surrounding Platinum integration would handle reading objects, checking permissions, applying changes, and presenting the results.
This separation is valuable for automation because the transformation can be tested without modifying real user data.
It also creates interesting possibilities for more sophisticated tools: document validators, schema migrations, dependency analysis, batch operations, and programmable workflows that can be reused across applications.
A macro shouldn't need to become a full standalone application just because its logic is complicated.
And a full application shouldn't need to reinvent document processing just because the logic began life as a macro.
The goal is to let small programs grow into powerful tools without losing their connection to the objects they operate on.
An open language architecture, with first-class support where it counts
Platinum isn't designed around a fixed list of programming languages.
Like our Lua bindings, language integrations are modular. The SDK's native extension architecture allows additional languages to be supported through a single native extension that bridges them into Platinum's existing interfaces and object model.
That doesn't mean every language has identical runtime requirements. Compilers, dependencies, and execution environments differ. But the integration architecture is designed so that supporting another language doesn't require rebuilding Platinum around it.
Haskell, Lua, and Rust aren't the only languages developers can use with Platinum. They're the languages we're choosing to support directly.
And there's an important difference between a language being compatible with Platinum and being a first-class Platinum language.
First-class support means Winnitude! Software commits to more than making bindings available. It means:
- Official documentation and supported SDK bindings.
- First-party examples demonstrating real applications and integrations.
- Ongoing maintenance, compatibility testing, and developer support.
- Use within Winnitude's own Platinum applications and components of the Runtime.
Why dogfooding matters for language support
We want our officially supported languages to be tools we rely on in our own software, not integrations that exist only to satisfy a compatibility checklist.
Using them internally gives us a direct stake in their reliability, ergonomics, and continued development.
For developers who prefer another language, the extension architecture remains open. Community-maintained integrations and custom native extensions can bring additional languages into the platform without waiting for Winnitude to implement each one.
Security, review, and user choice
Language extensions also introduce an important security consideration.
A language integration may involve native code, a language runtime, third-party dependencies, and access to application capabilities. That makes it part of the software's trusted execution environment, not merely a different way to write source code.
To protect users and maintain consistent security standards, third-party language extensions must be reviewed by Winnitude! Software for security and compliance before they can be whitelisted for use in registered Software Hub Release applications.
This review is intended to establish whether an extension meets the requirements for trusted distribution through the Software Hub. It is not a restriction on which programming languages developers are allowed to explore.
Developers remain free to create, experiment with, and distribute software using custom language integrations outside that approved release path.
Likewise, users retain the ability to manually whitelist applications they download that depend on extensions which haven't received Winnitude's approval.
That distinction is intentional.
The Software Hub's approved release process provides a managed trust boundary for applications distributed under its guarantees. Manual authorization allows users to make their own decisions about software and extensions they trust, without requiring every integration to become an officially supported Platinum component.
Manual whitelisting does not imply that an extension has passed Winnitude's security review, and it does not grant unrestricted access to the host system. Applications and extensions remain subject to the applicable Runtime security and capability controls.
Our aim is to make the trusted path dependable without making it the only path.
The architecture is open to new languages. Official support is our commitment to their quality. Software Hub review establishes distribution trust, while users retain control over what they choose to run.
Same objects, same Runtime, your choice of language
The important thing tying these examples together is that Haskell isn't intended to create a separate class of Platinum application.
We're integrating it with the same SDK contracts, Live Objects, UI bindings, identity checks, and server interfaces used by the rest of the platform.
Language bindings are extensions of Platinum, not separate implementations of Platinum.
That means developers don't need a different UI framework, object system, networking stack, or security architecture for every language they use.
Instead, language choice can follow the needs of a particular component rather than dictate the architecture of the entire project.
Lua remains an excellent choice for immediate, expressive scripting. Rust remains an excellent choice for systems programming, native extensions, and performance-critical components. Haskell offers another approach for developers who want pure functional modeling, expressive types, and strong compile-time feedback.
These aren't rigid categories. Rust is perfectly capable of implementing complex business logic, Lua can power sophisticated applications, and Haskell can be used for much more than validation and state machines.
The point isn't to assign every language a narrow job.
It's to make their different strengths available without requiring developers to abandon the rest of their tools.
The trade-offs are real
Haskell isn't the right default for everything, and we don't intend to pretend otherwise.
Its learning curve can be significant, especially for developers accustomed to imperative or object-oriented programming. Lazy evaluation introduces performance considerations that aren't always obvious. Build tooling, dependencies, and native integration can be more involved than dropping a Lua script into a project.
And while the type system catches many errors, a well-typed program can still implement the wrong rules.
There are also practical integration challenges. Supporting Haskell properly means more than exposing a few functions through a foreign-function interface. We need to consider how modules are built, packaged, loaded, and connected to Platinum's object and capability systems, and how errors and data move across language boundaries.
Those details matter because first-class support should mean a dependable development experience, not merely technical compatibility.
We're taking that work seriously.
Where things stand
First-class Haskell support is currently in active development.
Our direction is to make Haskell usable across Platinum Server, Platinum Game Creator, Runtime applications, and Live Object and Live Document tooling, while maintaining the same core platform contracts used by Lua and Rust.
As one of Platinum's first-class languages, Haskell will receive official documentation, maintained bindings, first-party examples, and support. We also intend to use it ourselves in Platinum applications and Runtime components.
Not every integration described here is available today. We'll publish concrete SDK bindings, examples, supported build targets, and Runtime packaging details as the implementation reaches testing.
We'll also distinguish between what is working, what is experimental, and what remains planned.
For now, we're excited about what this adds to the platform: not simply another supported programming language, but another way to approach the problems software developers face.
Platinum is built around the idea that powerful tools should work together, and that developers shouldn't have to choose between the capabilities they need and the way they prefer to work.
Haskell is another step toward that goal.
Interested in learning Haskell?
If you've never tried functional programming, we recommend Learn You a Haskell for Great Good!, Miran Lipovača's famously approachable and illustrated introduction to the language, available online through an updated community-maintained edition.
It's a great starting point for developers coming from imperative languages, and a fun way to discover why functional programming inspires such enthusiasm.
You can also explore the language and its ecosystem at Haskell.org.
Sources & further reading
Primary material behind the discussion and useful places to go deeper. The recommendations and worked examples in this article are our synthesis.
Working through a software or game-development problem of your own?
Talk to Winnitude! ↗Explore our tools ↗