PureScript (0.15)

This assessment applies the coupling account — coupling as access to a shared resource, and the coupling floor [1], [2] — and the knowledge-embodiment theorem [3]; the language is assessed against its official reference [4].

Snapshot PureScript (0.15) — released 29 April 2022 · lifecycle current (the 0.15 line is still maintained)

Family PureScript — shelf: Application

The language’s main business is building general application software, with a managed runtime or a rich standard library. A shelf groups; it does not classify — the tags below carry every use, paradigm, and platform of this snapshot.

Trajectory 0.1 (2013 — project begins) · 0.15 (29 April 2022 — ES modules)

Tags

Use — Web front end

Paradigm — Functional

Platform — Browser, Node.js

Lifecycle — Current

Memory — Managed (GC)

Typing — Static, strong

Resources

The language’s official entry points, and the documents that name the release this page assesses. A link marked this release pins the document to PureScript (0.15); an unmarked link is the current reference for the language.

Landing page

API documentation

Tutorial

1 Assessment

This page assesses PureScript in five parts: core coupling — what the language’s own constructs force; ecosystem coupling — what the surrounding platform, tooling, and community cost; engineering readiness — whether the artifact can be reproduced, verified, observed, worked in quickly, connected to other languages, and governed openly; the profile — the unscored facts a score cannot express; and the scoring detail — the mechanism marks and the arithmetic behind every score. A ✅ bullet marks a construct that helps. A ⚠️ or ❌ bullet marks a cost; the scoring model does not price every cost named here.

Core coupling 88.9/100 · Ecosystem coupling 80.1/100 · Engineering readiness 56.7/100

1.1 Core coupling

1.1.1 Type

  • ✅ All Haskell benefits plus algebraic effects: Effect system separates different effect types (unlike Haskell’s monolithic IO)
  • ✅ Row polymorphism for extensible records: Can decouple from exact record shape
  • ✅ Type classes with functional dependencies: More precise abstraction control
  • ❌ JavaScript FFI can bypass type safety: Interop creates coupling holes
  • ❌ The JavaScript backend carries the engine rule: string length counts UTF-16 units (T15)

1.1.2 Construction

  • ✅ Algebraic data types: A data declaration fixes the set of constructors, so every value is built through a declared shape
  • ✅ Smart constructors: A module can hide its constructors and export a validating function, so an invalid value cannot be built outside it
  • ✅ Records are built from a literal: { field: value } constructs a record directly, with no constructor tied to an allocation step
  • ✅ newtype wrappers are zero-cost: A one-constructor wrapper gives a distinct type without a runtime box
  • ✅ No global mutable state: A module binding is a pure value, so no module couples another to an initialization order

1.1.3 Memory

  • ✅ JavaScript GC decouples memory: Compiles to JS, inherits JS GC
  • ✅ Immutability simplifies: No cyclic mutable references
  • ⚠️ JavaScript GC pauses: Non-deterministic, inherited from JS runtime
  • ✅ No space leaks from laziness: Strict evaluation by default (unlike Haskell)
  • ⚠️ JS interop can create leaks: Foreign JS code may hold references

1.1.4 Error

  • ✅ Effect system makes errors explicit by type: Effect (console :: CONSOLE, exception :: EXCEPTION) Unit shows exactly what can fail
  • ✅ Explicit exception handling: No hidden runtime exceptions

1.1.5 Concurrency

  • ✅ Aff monad for async: Separates async coordination from sync logic
  • ❌ Single-threaded runtime: The compiled JavaScript runs on one thread, so two computations cannot run in parallel (K1)
  • ✅ Effect tracking prevents coupling: Can’t accidentally do async in sync code

1.1.6 Platform

  • ✅ Compiles to JavaScript: The output runs on any JavaScript engine — browsers, Node.js, Deno — rather than inside one vendor’s runtime
  • ✅ No proprietary runtime: PureScript ships no virtual machine of its own; compiled output depends only on the JavaScript platform
  • ✅ Cross-platform host support: Precompiled compiler binaries are published for macOS, Linux, and Windows
  • ✅ Community-maintained compiler: The compiler is developed in the open at purescript/purescript, not owned by a single vendor

1.1.7 Trade-offs (not coupling)

  • Type Safety vs. JavaScript Interop: FFI boundary loses all guarantees, couples to JS runtime behavior
  • Effect Granularity vs. Complexity: Fine-grained effect tracking increases cognitive load
  • Compile Target Constraints: Must fit JavaScript semantics, can’t have true parallelism
  • Ecosystem Size vs. Quality: Small community means fewer libraries but tighter coupling to available ones

1.2 Ecosystem coupling

1.2.1 Performance

  • ✅ Compiles to JavaScript: Inherits JS runtime performance characteristics
  • ⚠️ JS GC couples memory to runtime: No control over GC behavior
  • ✅ Strict evaluation: More predictable than Haskell, no space leaks from thunks
  • ❌ JS interop performance penalty: FFI boundary couples to marshaling cost
  • ✅ Tree-shaking support: Dead code elimination decouples bundle size from library inclusion

1.2.2 Ecosystem

  • ❌ Small ecosystem: Library availability couples to a niche community smaller than Haskell, so a project reinvents wheels or couples to specific libraries
  • ✅ Spago/purs package management: Standardized build system
  • ❌ Depends on JS ecosystem: Must interop with npm packages, couples to JS tooling
  • ✅ Excellent compiler errors: Error messages decouple debugging from trial-and-error
  • ⚠️ Niche community: Support couples to small contributor base

1.2.3 Evolution

  • ✅ Stable core: Breaking changes are rare and well-documented
  • ⚠️ Pre-1.0 for long time: Language evolution couples to experimental status
  • ✅ Effect library updates separate: Can upgrade effects without changing core language
  • ❌ Small team: Development pace couples to limited resources

1.2.4 Domain

  • ✅ Excellent for frontend development: Type safety in browser decouples from JS runtime errors
  • ✅ Strong for web apps: Effect system handles async/DOM naturally
  • ❌ Limited backend use: Node.js backend couples to JS ecosystem limitations
  • ⚠️ Niche adoption: Team expertise couples to hiring/training challenges

1.2.5 Learning

  • ❌ Very steep: All Haskell concepts plus row polymorphism and effect systems
  • ✅ Better than Haskell for JS devs: Familiar runtime, compilation target
  • ✅ Excellent docs: PureScript by Example book decouples learning from experimentation
  • ⚠️ Requires Haskell knowledge: Learning couples to functional programming expertise

1.2.6 Syntax

  • ✅ Haskell-like syntax: Familiar to FP developers
  • ✅ Less operator noise than Haskell: More consistent naming
  • ✅ Row polymorphism elegant: Extensible records without boilerplate
  • ⚠️ FFI syntax verbose: foreign import couples JS interop to boilerplate

1.2.7 Testing

  • ✅ QuickCheck/Spec available: Property testing support
  • ✅ Pure functions easy to test: No side effect coupling
  • ❌ Debugging via JS: Must debug compiled output, couples to source maps
  • ⚠️ Browser DevTools help: Can debug in browser, but stack traces couple to compiled code
  • ❌ No monotonic reading published in the language: the Effect time APIs are community packages (G4)

1.2.8 Security

  • ✅ Memory safe: JS GC prevents memory bugs
  • ✅ Type safety: Prevents type confusion
  • ✅ Effect system tracks side effects: Can’t accidentally perform unsafe operations
  • ❌ JS interop escape hatch: unsafeCoerce and FFI bypass safety, couple correctness to discipline
  • ❌ The JavaScript backend carries the engine rule: double arithmetic, silent integer change above 2^53 (Q4)

1.2.9 Delivery targets

What ships from a producer to a consumer, and whether the interface across a release boundary is promised. Ec8 is present when one compiled target crosses with no promise.

Target Ships as Crosses a producer boundary Cross-release promise
Spago and npm package source source no A package ships PureScript source, and the build tool compiles it on the target

1.3 Engineering readiness

1.3.1 Reproducibility

  • ❌ Spago resolves package sets at build time. (Y1)

1.3.2 Supply chain

  • ❌ The package set carries no signed provenance. (Y3)
  • ❌ The registry is a flat name space. (Y4)
  • ❌ No advisory feed covers PureScript packages. (Y16)

1.3.3 Observability

  • ❌ No tracing standard exists in the language; console rides the host. (Y5)
  • ❌ log rides the host JavaScript console. (Y6)

1.3.4 Feedback

  • ❌ No debugger ships with the compiler. (Y13)

1.3.5 Interop

  • ✅ The FFI is the documented escape to JavaScript modules. (Y9)
  • ❌ The compiled artifact runs wherever the host JavaScript runs; the compiler adds no target. (Y10)

1.3.6 Governance

  • ❌ Semantics rest on the reference compiler: the documentation defines the language as the compiler behaves, and no conformance suite exists (Y17)

1.4 Profile

Unscored, and kept separate from every score on purpose. The profile records what a mechanism price cannot express: what a running program costs, how well a coding model and an agent work in the language, and whether a safety-critical path exists.

1.4.1 Energy and cost

What this axis asks: what does a running program cost in energy and time?

  • ⚠️ Runs on a virtual machine, above native code in the energy and time benchmarks [5]; a causal re-analysis attributes most of the gap to execution time [6].

1.4.2 AI and agent readiness

What this axis asks: how well does a coding model and an agent work in this language?

  • ❌ Sparse training data: models write it unreliably [7].

1.4.3 Safety certification

What this axis asks: is there a certified or standards-qualified path to a safety-critical system?

  • ⚠️ No certified or standards-qualified path for safety-critical systems.

1.5 Scoring detail

1.5.1 Core coupling Dimensions

Dimension Mechanism Description Imposed by Present Weight
Type T1 dynamic no static check language — 0
T2 weak static language — 0
T3 dynamic/duck dispatch language — 0
T4 no sum types language — 0
T5 no generics language — 0
T6 no namespaces language — 0
T7 type erasure/reflection language — 0
T8 operator overloading language — 0
T9 inheritance required for polymorphism language — 0
T10 no null-safety language — 0
T11 no module boundary language — 0
T12 no effect tracking language — 0
T13 async/sync colouring language — 0
T14 unchecked foreign boundary language ✅ −4
T15 chars are encoding units language ✅ −8
Type cost −3.4 (−12)
Construction C1 global mutable state by default language — 0
C2 no immutability by default language — 0
C3 constructors coupled to allocation language — 0
C4 no constructor/validation language — 0
C5 unpinned collection order language — 0
C6 aliasing by default language — 0
C7 undeclared control transfer language — 0
C8 no source-visible init order language — 0
Construction cost 0
Memory M1 manual deallocation runtime — 0
M2 GC non-deterministic pauses runtime ✅ −8
M3 no RAII language ✅ −4
M4 no ownership model language — 0
M5 uninitialized reads language — 0
M6 unchecked reinterpretation language — 0
Er6 uncatchable runtime fault language — 0
M7 reference cycles leak runtime — 0
Memory cost −3.4 (−12)
Error Er1 no structured path language — 0
Er2 unchecked exceptions only language — 0
Er3 errors ignored/non-exhaustive language — 0
Er4 no composable result type language — 0
Er5 no isolation unit for a fault runtime — 0
Error cost 0
Concurrency K1 GIL/no parallel runtime ✅ −15
K2 shared mutable state default language — 0
K3 manual sync no race detection runtime — 0
K4 no structured concurrency language — 0
K5 no primitives language — 0
K6 thread-per-task cost runtime — 0
Concurrency cost −4.3 (−15)
Platform P1 cannot function outside one vendor/domain context — 0
P2 single-vendor but other uses context — 0
P3 legacy/discontinued platform context — 0
P4 poor domain fit context — 0
Platform cost 0

Core coupling score: 88.9/100 — 39 of the 350 inventory points are present, so the axis cost is 100 × 39 ÷ 350 = 11.1 and the score is 100 − 11.1. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.

1.5.2 Ecosystem coupling Dimensions

Dimension Mechanism Description Imposed by Present Weight
Performance R1 interpreted no AOT/JIT runtime — 0
R2 GC pauses runtime ✅ −8
R3 JIT warmup runtime — 0
Performance cost −3.1 (−8)
Ecosystem Ec1 no package manager context — 0
Ec2 fragmented tooling context — 0
Ec3 small/niche/discontinued context ✅ −8
Ec4 proprietary context — 0
Ec5 platform-locked tooling context — 0
Ec6 monoculture context — 0
Ec7 legacy burden context — 0
Ec8 unpromised binary boundary context — 0
Ec9 unpromised data boundary context — 0
Ecosystem cost −3.1 (−8)
Evolution V1 breaking changes language — 0
V2 frozen context — 0
V3 discontinued context — 0
V4 glacial standards context — 0
V5 silent default drift runtime — 0
V7 build-variant state space context — 0
Evolution cost 0
Domain D1 domain/vendor lock-in context — 0
D3 framework forces architecture context — 0
Domain cost 0
Learning L1 steep context ✅ −8
L2 large surface/multi-paradigm context — 0
L3 sparse docs context — 0
Learning cost −3.1 (−8)
Syntax S1 verbose language — 0
S2 inconsistent language — 0
S3 punctuation-heavy language — 0
Syntax cost 0
Testing G1 weak tooling context — 0
G2 poor debugging context ✅ −8
G3 runtime-only errors context — 0
G4 no published monotonic clock runtime ✅ −4
Testing cost −4.7 (−12)
Security Q1 memory-unsafe language — 0
Q2 dynamic/weak typing risk language — 0
Q3 known vulnerability/injection context — 0
Q4 silent integer overflow language ✅ −15
Security cost −5.9 (−15)

Ecosystem coupling score: 80.1/100 — 51 of the 256 inventory points are present, so the axis cost is 100 × 51 ÷ 256 = 19.9 and the score is 100 − 19.9. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.

1.5.3 Engineering readiness Dimensions

Dimension Mechanism Description Imposed by Present Weight
Reproducibility Y1 build not reproducible context ✅ −15
Y2 dependencies not pinned context — 0
Y14 no toolchain version pin context — 0
Y18 no machine-read project contract context — 0
Reproducibility cost −8.8 (−15)
Supply chain Y3 no signed provenance context ✅ −15
Y4 registry without namespacing context ✅ −4
Y16 no advisory feed context ✅ −8
Supply chain cost −15.8 (−27)
Observability Y5 no stable tracing standard context ✅ −8
Y6 no structured logging context ✅ −4
Y15 no post-mortem diagnostics runtime — 0
Observability cost −7.0 (−12)
Feedback Y7 slow build context — 0
Y8 no fast in-editor analysis context — 0
Y13 no bundled debugger context ✅ −8
Feedback cost −4.7 (−8)
Interop Y9 no foreign-function interface language — 0
Y10 no portable target context ✅ −4
Interop cost −2.3 (−4)
Governance Y11 single-vendor governance context — 0
Y12 closed specification context — 0
Y17 no conformance mechanism context ✅ −8
Y19 no published parser context — 0
Governance cost −4.7 (−8)

Engineering readiness score: 56.7/100 — 74 of the 171 inventory points are present, so the axis cost is 100 × 74 ÷ 171 = 43.3 and the score is 100 − 43.3. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.

Verdict: PureScript improves on Haskell’s coupling properties by separating effect types. Effect system prevents coupling different concerns (console, network, state) into one IO bucket. Main weakness: JavaScript interop creates coupling escape hatches.


The formal development. The definitions, theorems, and proofs behind this page are published in:

All published papers

References

[1]
Y. Loth, “On the nature of coupling: All coupling as shared resource access.” Zenodo, Aug. 2026. doi: 10.5281/zenodo.21925121.
[2]
Y. Loth, “Coupling as a consequence of cohesion: Decomposition, the coupling floor, and domain-imposed coupling.” Zenodo, Aug. 2026. doi: 10.5281/zenodo.21925201.
[3]
Y. Loth, “On the nature of cohesion: Cohesion as correctness relative to a partitioning rule.” Zenodo, Jul. 2026. doi: 10.5281/zenodo.20492912.
[4]
P. Freeman, “PureScript by example.” PureScript, 2024. Available: https://book.purescript.org/
[5]
R. Pereira et al., “Energy efficiency across programming languages: How do energy, time, and memory relate?” in Proceedings of the 10th ACM SIGPLAN international conference on software language engineering (SLE), 2017, pp. 256–267. doi: 10.1145/3136014.3136031.
[6]
N. van Kempen, H.-J. Kwon, D. T. Nguyen, and E. D. Berger, “It’s not easy being green: On the energy efficiency of programming languages,” in Proceedings of the 40th IEEE/ACM international conference on automated software engineering (ASE), 2025. doi: 10.1109/ASE63991.2025.00131.
[7]
S. Joel, J. J. Wu, and F. H. Fard, “A survey on LLM-based code generation for low-resource and domain-specific programming languages,” ACM Transactions on Software Engineering and Methodology, 2025, doi: 10.1145/3770084.