Why, when I do cabal build and then cabal install , cabal recompiles things twice. (I use the sandbox).
Update
To clarify, I ask when after doing cabal build (which I understand compiles 2 versions of my files), why do what cabal install compiles again. Isn't that a build target for assembly?
Update2
Well, it seems like it compiles in two different directories dist and dist/sandbox-... what is the difference between both?
> cabal build Building cache-0.1.0.0... Preprocessing executable 'cache' for cache-0.1.0.0... [1 of 1] Compiling Main ( main.hs, dist/build/cache/cache-tmp/Main.o ) Linking dist/build/cache/cache ... > cabal install Warning: The package list for 'hackage.haskell.org' is 60 days old. Run 'cabal update' to get the latest list of available packages. Resolving dependencies... Configuring cache-0.1.0.0... Warning: The 'license-file' field refers to the file 'LICENSE' which does not exist. Building cache-0.1.0.0... Preprocessing executable 'cache' for cache-0.1.0.0... [1 of 1] Compiling Main ( main.hs, dist/dist-sandbox-db136cca/build/cache/cache-tmp/Main.o ) Linking dist/dist-sandbox-db136cca/build/cache/cache ...
source share