title: How to Cache a Haskell Dependency to Speed Up Compilation Time?
body: <p><strong>Problem:</strong> I'm working on a Haskell project that uses stack (+ nix). We have a dependency that takes 10+ minutes to compile. Every time we clean our <code>.stack-work</code>, we have to wait for this huge package to compile, and it's really hurting our project's efficiency.  The package name is <code>godot-haskell</code>, and here is how the package is depended upon in our <code>stack.yaml</code>:</p>
  
  <pre><code>extra-deps:
  - godot-haskell-0.1.0.0@sha256:9d92ff27c7b6c6d2155286f04ba2c432f96460f448fd976654ef26a84f0e35a6,26290
  </code></pre>
  
  <p><strong>Question:</strong> Is there a way for us to somehow cache this package (in stack, or even in nix) so that it locally never has to get compiled (or has to get compiled at most once, even if the <code>.stack-work</code> directory is deleted)?</p>