Skip to content

haskell.md - #316

Open
Graviton28 wants to merge 1 commit into
UNM-CARC:masterfrom
Graviton28:pr/haskell-hopper-verify
Open

haskell.md#316
Graviton28 wants to merge 1 commit into
UNM-CARC:masterfrom
Graviton28:pr/haskell-hopper-verify

Conversation

@Graviton28

Copy link
Copy Markdown
Contributor

Ran the entire documented sequence live on Hopper, verbatim as written: module load ghcupghcup install ghc 9.10.1stack new matmul new-template → edit app/Main.hs and package.yaml exactly as shown → stack build.

Found and fixed the version inconsistency flagged for this file: stack manages its own GHC toolchain completely independently of ghcup. It picks whatever GHC the Stackage LTS snapshot resolver needs at stack new time (currently resolves to ghc-9.10.3) — not the version you just installed with ghcup (9.10.1 per the doc), and not the 9.6.5 an older revision of this doc showed either. All three numbers are/were real observations from different points in time, just not causally related the way the doc implied. Added an explicit note clarifying stack and ghcup are independent here, and corrected the example find/run paths to the version actually observed in this test run.

Build succeeded and produced the exact 4×4 matrix output already documented — unchanged, confirmed working:

┌                 ┐
│ -18 -16 -14 -12 │
│  14   8   2  -4 │
│  46  32  18   4 │
│  78  56  34  12 │
└                 ┘

The package.yaml edit (adding - matrix under the matmul-exe executable's dependencies:) worked exactly as documented, no changes needed there.

Test plan

  • Ran module load ghcup + ghcup install ghc 9.10.1 on Hopper — succeeded
  • Ran stack new matmul new-template, edited Main.hs/package.yaml as documented
  • Ran stack build — succeeded, confirmed actual GHC version used (9.10.3, via Stack's own resolver, independent of the ghcup install)
  • Ran the resulting binary — output matches the doc exactly

…Hopper

Ran the entire documented sequence verbatim on Hopper: module load ghcup ->
ghcup install ghc 9.10.1 -> stack new matmul new-template -> edit
app/Main.hs and package.yaml exactly as shown -> stack build.

Found the real bug the doc had: stack manages its own GHC install,
independent of ghcup, chosen by whatever the Stackage LTS snapshot resolver
needs (currently ghc-9.10.3 for the snapshot stack new picks by default) -
not whatever version was just installed with ghcup. The doc's ghcup step
installs 9.10.1 but the sample find output showed ghc-9.6.5, a third,
unrelated number. Added a note explaining stack/ghcup are independent here,
and updated the find/run example paths to the version actually observed
(ghc-9.10.3), noting this number will keep drifting as Stackage's default
snapshot updates over time.

The build succeeded and produced the exact 4x4 matrix output already
documented, unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Graviton28
Graviton28 requested a review from gmfricke as a code owner August 4, 2026 02:40
@Graviton28
Graviton28 marked this pull request as draft August 4, 2026 02:43
@Graviton28
Graviton28 marked this pull request as ready for review August 4, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant