<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/rewriting-the-futhark-type-checker-xhvkwalfe" -->

---
title: Rewriting the Futhark type checker | daily.dev
description: A deep dive into the evolution of Futhark's type checker, from a simple single-pass checker to a four-stage pipeline. The author explains why the original...
canonical: https://daily.dev/posts/rewriting-the-futhark-type-checker-xhvkwalfe
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Rewriting the Futhark type checker | daily.dev
og:description: A deep dive into the evolution of Futhark's type checker, from a simple single-pass checker to a four-stage pipeline. The author explains why the original...
og:url: https://daily.dev/posts/rewriting-the-futhark-type-checker-xhvkwalfe
og:image: https://api.daily.dev/og/posts/XhvkwAlfe.png
og:image:alt: Rewriting the Futhark type checker
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Rewriting the Futhark type checker

**[Lobsters](https://daily.dev/sources/lobsters)** · 12 min read · 0 upvotes · 0 comments

## Summary

A deep dive into the evolution of Futhark's type checker, from a simple single-pass checker to a four-stage pipeline. The author explains why the original Algorithm W-based approach broke down as features like size types, uniqueness types, and AUTOMAP were added. The new design separates concerns into: name resolution, ground type inference (constraint-based, unsized), size inference, and in-place update validation. Key benefits include better error messages (each stage has full info from prior stages), easier debugging via explicit constraint sets, and reduced code duplication. The refactoring achieved a slight speedup (~4%) despite adding more passes, through targeted optimizations. The post also discusses the tradeoffs of multi-pass vs. single-pass type checking and hints at future work on bidirectional type checking for size inference.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://futhark-lang.org/blog/2026-07-21-rewriting-the-type-checker.html>

## Similar posts on daily.dev

- [Full flattening of nested data parallelism](https://daily.dev/posts/full-flattening-of-nested-data-parallelism-f2cwulaod) · Lobsters · 0 upvotes · 0 comments
- [Futhark by Example](https://daily.dev/posts/futhark-by-example-vnchxphd7) · Hacker News · 0 upvotes · 0 comments
- ["Five-Point Haskell": Total Depravity \(and Defensive Typing\)](https://daily.dev/posts/five-point-haskell-total-depravity-and-defensive-typing--xwwoyitrt) · Planet Haskell · 0 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#compiler](https://daily.dev/tags/compiler)

[View this post on daily.dev](https://daily.dev/posts/rewriting-the-futhark-type-checker-xhvkwalfe)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Rewriting the Futhark type checker","url":"https://daily.dev/posts/rewriting-the-futhark-type-checker-xhvkwalfe","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/rewriting-the-futhark-type-checker-xhvkwalfe"},"datePublished":"2026-07-23T07:53:00.906Z","dateModified":"2026-07-23T07:53:20.906Z","description":"A deep dive into the evolution of Futhark's type checker, from a simple single-pass checker to a four-stage pipeline. The author explains why the original...","image":"https://media.daily.dev/image/upload/s--P4t4XyoV--/f_auto/v1722860399/public/Placeholder%2001","thumbnailUrl":"https://media.daily.dev/image/upload/s--P4t4XyoV--/f_auto/v1722860399/public/Placeholder%2001","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/rewriting-the-futhark-type-checker-xhvkwalfe","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"general-programming,compiler","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"Rewriting the Futhark type checker"}]}
```

