When I added files to hakyll.hs to process, they were not acknowledged
before I again gave the command ghc --make hakyll.hs. This unexpected
behaviour cost me an hour to understand. To require two commands
to stay up-to-date is bad design, so I propose to either 1) only and always
use ghc --make to update the site; or 2) put functionality in hakyll such
that it remakes itself when hakyll.hs is changed, so ghc --make must be
called only once at the start.
Doing what you suggest would require embedding GHC in Hakyll using the GHC API. While not impossible, it would probably be a fairly large chunk of work, would increase the complexity of the codebase, and probably make compilation times and binary sizes a lot bigger. If @jaspervdj wants to take on those problems, that's up to him, but it doesn't look like a good tradeoff to me.
Haskell is at heart a compiled language: if you change your Haskell source code you should expect to recompile it. It might be that your hakyll.hs file is written in a suboptimal matter for the problem you're solving; if you post your source code it might be that there's a better way of doing things that doesn't require frequent recompiles.
The hakyll.hs is just the same as from the brochure example, and, after using it with one set of markdown files, I added two more.
BTW, there is another way to achieve what I said: use a Makefile for compilation AND dependency tracking. Then only ever one command like 'make build' would be necessary. This is just about finding the right container, make itself provides the intelligence.
Finally, if all is rejected, at least mention the need to redo ghc --make in some documentaton.
As easy as this: