Closed michaelpj closed 2 years ago
Thank you for this report.
That's indeed really weird.
I'm using some magic with template Haskell to check for name and apparently this is broken in the context of GHCI.
I cannot reproduce using cabal repl
:
$ nix develop .#pyf_810
$ cabal repl
GHCi, version 8.10.7: https://www.haskell.org/ghc/ :? for help
... build output
Ok, 8 modules loaded.
*PyF> :set -XQuasiQuotes
*PyF> age = 54
*PyF> name = "Dave"
*PyF> [fmt|Persan's name is {name}, age is {age}|]
(... defaulting warnings)
"Persan's name is Dave, age is 54"
I will investigate what is happening with a different ghci
or cabal setup.
Does it works outside of a repl, when compiling the file?
Hmmmm, my initial problem was in a compiled file (I think all of them). I just reported the GHCi example because it seemed like a smoking gun! I'll see if I can make a smaller reproducer.
Some confusing progress... it works on macos and not on linux! :scream:
Notes:
haskell.nix
projectOverall I think this is likely something very specific on our end, rather than a problem in PyF. I'll reopen if we find something.
Updating to 0.11, all our uses of
PyF
broke. I can't even make the example from the README work any more:This is very weird!