# Help with variations in ghci results

**URL:** https://discourse.haskell.org/t/help-with-variations-in-ghci-results/12375
**Category:** Uncategorized
**Created:** [June 24, 2025, 7:04pm UTC](https://discourse.haskell.org/t/help-with-variations-in-ghci-results/12375 "2025-06-24T19:04:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tonyday567](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tonyday567/32/1073_2.png) [@tonyday567](https://discourse.haskell.org/u/tonyday567)
#### Post date: [June 24, 2025, 7:04pm UTC](https://discourse.haskell.org/t/help-with-variations-in-ghci-results/12375/1 "2025-06-24T19:04:18Z")

</div>

I am getting strange variations in computation dependent on how I compile a library of mine and have documented the bugginess in [`cabal repl` segfaults or computes the wrong answer. · Issue #1 · tonyday567/harpie · GitHub](https://github.com/tonyday567/harpie/issues/1).

I’ve been sitting with this bug for a long time and am at a loss of how exactly to proceed. It could be my lack of knowledge about ghc(i) or cabal, it could be a misuse of the first-class-families library or a bad bugginess in my code or thought processes.

I would have thought, however, that any result variations of running ghci and ghc in different ways on the same code is a concern. Am I thinking properly?

Any help would be appreciated, especially if you’ve seen this behaviour before or you recognize where I might have gone astray.

---

<div class="post-metadata">

### Author: ![artem](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/artem/32/56_2.png) [@artem](https://discourse.haskell.org/u/artem)
#### Post date: [June 25, 2025, 7:17pm UTC](https://discourse.haskell.org/t/help-with-variations-in-ghci-results/12375/2 "2025-06-25T19:17:00Z")

</div>

Might be interesting to try different GHC versions.

---

<div class="post-metadata">

### Author: ![tonyday567](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tonyday567/32/1073_2.png) [@tonyday567](https://discourse.haskell.org/u/tonyday567)
#### Post date: [June 25, 2025, 9:25pm UTC](https://discourse.haskell.org/t/help-with-variations-in-ghci-results/12375/3 "2025-06-25T21:25:55Z")

</div>

The behaviour is the same from 9.6.7 to 9.12.2. The library is built off of SNat in base which was introduced alongside 9.6 I believe, so the project wont compile before then.

---

<div class="post-metadata">

### Author: ![tonyday567](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tonyday567/32/1073_2.png) [@tonyday567](https://discourse.haskell.org/u/tonyday567)
#### Post date: [June 26, 2025, 9:41pm UTC](https://discourse.haskell.org/t/help-with-variations-in-ghci-results/12375/4 "2025-06-26T21:41:29Z")

</div>

What I’m having problems deciding is whether this is primarily a cabal issue or a ghc issue. In favour of cabal, I cannot present the issue as just a ghc thing, without at least doing `cabal repl` and turning on write-ghc-environment-files which is a cabal flag. On the other hand, packages seem like a shared concept, and the `-isrc` flag at the center of the bug seems to indicate that something different is happening between interpretation and compilation, a ghc thing.

Should I bug the hard-working cabal team or the hard-working ghc team?
