explaingit

gabriella439/record-concatenation

Analysis updated 2026-05-18

5HaskellAudience · researcherComplexity · 2/5Setup · easy

TLDR

An interactive REPL that shows how a type inference algorithm for combining records works, built as a companion to a blog post.

Mindmap

mindmap
  root((record concatenation))
    What it does
      Interactive type inference REPL
      Companion to a blog post
      Nix like expression syntax
    Tech stack
      Haskell
      Nix
      Cabal
    Use cases
      Explore type inference examples
      Learn record concatenation typing
      Follow along with the blog post
    Audience
      Programming language researchers
      Type theory learners
    Run it
      nix run
      cabal run

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Try the type inference algorithm from the companion blog post interactively.

USE CASE 2

See how record combination and field removal affect inferred types.

USE CASE 3

Study a small worked example of type inference implemented in Haskell.

USE CASE 4

Follow along with the mechanized type inference blog post using real input.

What is it built with?

HaskellNixCabal

How does it compare?

gabriella439/record-concatenationeternal-flame-ad/fedi-emoji-toolpsibi/yesod-postgres
Stars564
LanguageHaskellHaskellHaskell
Last pushed2024-09-282018-08-24
MaintenanceStaleDormant
Setup difficultyeasymoderatemoderate
Complexity2/53/53/5
Audienceresearcherops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Runs with a single Nix or cabal command, no external services needed.

No license information is stated in the README.

In plain English

This project is a small, hands-on companion tool for a blog post about type inference, a topic from programming language theory concerned with how a programming language can automatically figure out the type of a value, such as whether something is a number, a string, or a record, without the programmer stating it explicitly. Specifically, this project focuses on type inference for record concatenation, which means combining two records, similar to combining two small structured objects that each hold named fields, and correctly working out what type the combined result should have. Rather than just reading about the idea, this repository lets a curious reader try the algorithm themselves. It opens an interactive prompt, called a REPL, where you type in a small expression and it immediately shows you the type that its algorithm infers for that expression. The expression language it accepts is written in a Nix-like syntax, and only supports the specific set of expressions covered in the companion blog post. The README shows several example interactions. You can type simple values like numbers, strings, and booleans and see their types. You can write addition, let expressions for defining local variables, and functions, all in that Nix-like syntax. Most centrally, you can build records with named fields, look up a field's value, combine one record's fields into another using a with operation, and remove a field using a without operation, and each time the tool prints out the inferred type of the result. To run it, you can either use the Nix package manager to run it directly from GitHub with one command, or use a standard Haskell toolchain and run it with cabal. This is written in Haskell, the language commonly used for this kind of type-system and compiler research. It is a teaching tool built for a specific technical audience already interested in how type systems work, not a general purpose library.

Copy-paste prompts

Prompt 1
Run this REPL and explain what type is inferred for a record with an age and name field.
Prompt 2
Walk me through how the with and without record operations affect the inferred type in this project.
Prompt 3
Explain the type inference algorithm this project implements in plain English.
Prompt 4
Show me how to set this project up with Nix versus with a plain Haskell toolchain.

Frequently asked questions

What is record-concatenation?

An interactive REPL that shows how a type inference algorithm for combining records works, built as a companion to a blog post.

What language is record-concatenation written in?

Mainly Haskell. The stack also includes Haskell, Nix, Cabal.

What license does record-concatenation use?

No license information is stated in the README.

How hard is record-concatenation to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is record-concatenation for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.