Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,20 @@ The project uses **Nix with flakes** for reproducible builds and **Cabal** for H

### Toolchain

Versions are pinned by the flake (`compiler-nix-name` and `easy-ps.purs-*`
in `flake.nix`); update them there, not locally:
Versions are pinned by the flake (`compiler-nix-name` and the
`purs-bin.*` / `spago-bin.*` attrs in `flake.nix`); update them there, not
locally:

- **GHC**: 9.8.x (haskell.nix `ghc98`)
- **PureScript**: `purs` 0.15.16 (from easy-purescript-nix; note that attr
names may carry an upstream release suffix, e.g. `purs-0_15_16-0`)
- **PureScript**: `purs` 0.15.16, from [purescript-overlay] pinned as
`purs-bin.purs-0_15_16` (explicit pin so `nix flake update` never silently
bumps the compiler and churns goldens)
- **Spago**: 0.21.x — the *legacy* Haskell spago driven by `spago.dhall` /
`packages.dhall` (not the newer `spago.yaml`-based one)
`packages.dhall` (not the newer `spago.yaml`-based one), pinned as
`spago-bin.spago-0_21_0`. NB: the overlay's plain `spago` attr now resolves
to the new PureScript spago (1.x), hence the explicit legacy pin.

[purescript-overlay]: https://github.com/thomashoneyman/purescript-overlay

### Development Environment

Expand Down Expand Up @@ -312,8 +318,10 @@ often enough; add more when the bug spans several code paths).
## Updating Dependencies

1. `nix flake update` — refreshes haskell.nix (and with it the Hackage
index pin), nixpkgs, and easy-purescript-nix. To bump GHC or `purs`,
edit `compiler-nix-name` / `easy-ps.purs-*` in `flake.nix`.
index pin), nixpkgs, and purescript-overlay. To bump GHC, `purs`, or
spago, edit `compiler-nix-name` / `purs-bin.*` / `spago-bin.*` in
`flake.nix` (the toolchain attrs are explicitly version-pinned, so a flake
update alone never changes them).
2. PureScript package sets live in `test/ps/packages.dhall` as
`upstream-ps // upstream-lua`. The right operand wins: `upstream-lua`
(releases of `purescript-lua/purescript-lua-package-sets`) overrides core
Expand Down
82 changes: 34 additions & 48 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
haskellNix.url = "github:input-output-hk/haskell.nix";
nixpkgs.follows = "haskellNix/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
easy-purescript-nix.url = "github:justinwoo/easy-purescript-nix";
purescript-overlay.url = "github:thomashoneyman/purescript-overlay";
purescript-overlay.inputs.nixpkgs.follows = "nixpkgs";
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
};
Expand All @@ -13,7 +14,7 @@
nixpkgs,
flake-utils,
haskellNix,
easy-purescript-nix,
purescript-overlay,
treefmt-nix,
}:
let
Expand All @@ -22,13 +23,13 @@
flake-utils.lib.eachSystem supportedSystems (
system:
let
easy-ps = easy-purescript-nix.packages.${system};
pkgs = import nixpkgs {
inherit system overlays;
inherit (haskellNix) config;
};
overlays = [
haskellNix.overlay
purescript-overlay.overlays.default
(final: prev: {
psluaProject = final.haskell-nix.project' {
src = ./.;
Expand Down Expand Up @@ -58,8 +59,8 @@
};
buildInputs = with pkgs; [
cachix
easy-ps.purs-0_15_16-0
easy-ps.spago
purs-bin.purs-0_15_16
spago-bin.spago-0_21_0
lua51Packages.lua
lua51Packages.luacheck
nil
Expand Down
Loading