usage: remove dependency on manual invocation of 'ghc --make hakyll.hs' #55

rwst opened this Issue Feb 4, 2012 · 3 comments


None yet
2 participants

rwst commented Feb 4, 2012

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.


beastaugh commented Feb 4, 2012

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.

rwst commented Feb 4, 2012

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.

rwst closed this Feb 5, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment