They should have used a flattery plus dialog prompt. I've seen incredible results from that for Haskell programming.
I find this approach to produce the highest quality output and I can ask it to explain reasoning, improve certain things, or elaborate and expand code.