Skip to content

Avoid unnecessary recompilations#4273

Merged
snoyberg merged 4 commits intomasterfrom
reduce-template-haskell
Sep 3, 2018
Merged

Avoid unnecessary recompilations#4273
snoyberg merged 4 commits intomasterfrom
reduce-template-haskell

Conversation

@snoyberg
Copy link
Contributor

This PR reduces the number of modules in the codebase which enable either TemplateHaskell or CPP, via a few techniques:

  • Moving conditional code into separate Windows and Unix directories
  • Moving all of the Store-related TH into a single module
  • Moving mkRelDir and mkRelFile calls into Stack.Constants
  • Replacing a few CPP usages with runtime checking of the OS, which I prefer using anyway (it reduces the amount of code which is only built on one OS or the other)

There should be no impact from these changes besides how it affects compile time.

@snoyberg
Copy link
Contributor Author

Note that this resolves #4272

It seems disabling CPP and TemplateHaskell allows hlint to detect other
unused pragmas.
@snoyberg snoyberg force-pushed the reduce-template-haskell branch from ef5f082 to 241aa55 Compare August 31, 2018 07:31
@snoyberg snoyberg merged commit 0740444 into master Sep 3, 2018
@snoyberg snoyberg deleted the reduce-template-haskell branch September 3, 2018 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants