Help with variations in ghci results

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.

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.

3 Likes

Might be interesting to try different GHC versions.

1 Like

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.

1 Like

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?