I remember recently feature of being able to pass a flag to stack ghci was implemented (thanks!). Unfortunately, it doesn't quite work.
Here, I created a repository with simple project which should print "True" when flag production is set, but it doesn't: https://github.com/k-bx/stack-bug-flag
Please check it out. Thank you!