Meta tags:
description= A program for developing Haskell projects.
;
author= Stack contributors;
Headings (most frequently used words):
installed, package, databases,
Text of the page (most frequently used words):
the (30), stack (25), ghc (16), and (12), database (12), snapshot (11), package (11), #databases (9), path (9), directory (9), pkg (7), project (6), configuration (6), get (5), each (5), other (5), that (5), immutable (5), version (5), local (5), global (5), you (4), how (4), are (4), this (4), projects (4), which (4), considered (4), installed (4), build (4), commands (4), with (3), contributors (3), top (3), can (3), layered (3), used (3), windows (3), directories (3), systems (3), file (3), options (3), multiple (3), non (3), mutable (3), code (3), from (3), cabal (3), also (3), executables (3), more (3), involved (3), files (3), integration (3), building (3), topics (3), configure (3), getting (3), started (3), for (2), these (2), but (2), have (2), they (2), work (2), different (2), not (2), hash (2), sequence (2), three (2), unix (2), like (2), operating (2), source (2), contents (2), root (2), standard (2), content (2), binary (2), packages (2), ends (2), your (2), any (2), acme (2), missiles (2), output (2), command (2), containers (2), boot (2), ghci (2), hpc (2), process (2), haskell (2), time (2), helloworld (2), idea (2), exec (2), list (2), example (2), known (2), contains (2), libraries (2), glossary (2), faq (2), works (2), upgrading (2), maintainers (2), docker (2), script (2), location (2), environment (2), flags (2), specific (2), setting (2), welcome (2), github (2), made, material, mkdocs, copyright, 2015, 2025, back, reality, will, rarely, ever, interact, directly, good, basic, understanding, understand, why, rebuilding, may, occur, points, separately, subdirectory, shorter, eight, characters, done, avoid, problems, created, default, limits, lengths, last, subdirectories, named, after, platform, 256, bit, map, should, built, including, compiler, dependencies, probably, guessed, there, available, see, snapshots, does, allow, contaminate, putting, into, shared, lets, reuse, same, builds, reason, structure, anything, depends, something, includes, own, located, notice, comes, hackage, archive, repository, where, refers, win32, array, base, bytestring, deepseq, exceptions, filepath, bignum, compact, heap, prim, haskeline, integer, gmp, libiserv, mtl, parsec, pretty, rts, stm, template, text, transformers, xhtml, 3000, quick, look, our, listing, just, gave, called, finally, itself, ships, number, forms, write, only, bin, doc, lib, pkgdb, consists, compiled, library, few, things, well, give, parent, take, short, break, hands, examples, discuss, little, architecture, has, concept, history, resources, overview, signing, key, self, hosted, runners, haskellstack, org, zip, msys2, add, maintainer, team, releases, scheme, dev, contributor, guide, lock, azure, travis, shell, auto, completion, developing, visual, studio, editor, debugging, initialization, nix, interpreter, yaml, specification, customisation, scripts, include, directive, variables, upload, upgrade, update, unpack, uninstall, test, templates, setup, sdist, runhaskell, runghc, run, repl, query, purge, new, install, init, ide, hoogle, haddock, eval, dot, config, clean, bench, conclusion, using, interactively, executing, locations, multi, targets, synonyms, existing, description, hello, world, initializing, search, skip,
Text of the page (random words):
6 installed package databases stack skip to content stack 6 installed package databases initializing search github welcome setting up getting started commands configure topics get involved faq glossary more stack github welcome setting up getting started getting started 1 a hello world example 2 package description 3 project configuration 4 building your project 5 building existing projects 6 installed package databases 7 stack build synonyms 8 stack build targets 9 multi package projects 10 cabal flags and ghc options 11 locations used by stack 12 executing commands 13 using ghc interactively 14 stack configuration 15 in conclusion commands commands bench build clean config dot docker eval exec ghc ghci haddock hoogle hpc ide init install list ls new path purge query repl run runghc runhaskell script sdist setup templates test uninstall unpack update upgrade upload configure configure environment variables configuration files configuration files project specific configuration non project specific configuration the include directive global flags and options customisation scripts topics topics stack root stack work directories stack environment snapshot location package location snapshot specification stack yaml vs a cabal file script interpreter docker integration nix integration non standard project initialization building ghc from source debugging editor integration stack and visual studio code developing on windows shell auto completion ci travis ci azure ci lock files haskell and c code get involved get involved contributors contributors contributor s guide dev containers maintainers maintainers version scheme releases maintainer team process add ghc version upgrading msys2 upgrading 7 zip haskellstack org self hosted runners signing key how stack works how stack works build overview faq glossary more more other resources version history 6 installed package databases time to take a short break from hands on examples and discuss a little architecture stack has the concept of multiple databases a database consists of a ghc package database which contains the compiled version of a library executables and a few other things as well to give you an idea the contents of the parent directory of the stack path local pkg db directory are the directories bin doc lib pkgdb databases in stack are layered for example the database listing we just gave is called a local database also known as a mutable database that is layered on top of a snapshot database also known as a write only database the snapshot database contains the libraries and executables that are considered to be immutable finally ghc itself ships with a number of libraries and executables also considered to be immutable which forms the global database to get a quick idea of this we can look at the output of the stack exec ghc pkg list command in our helloworld project stack path global pkg db directory cabal 3 6 3 0 win32 2 12 0 1 array 0 5 4 0 base 4 16 2 0 binary 0 8 9 0 bytestring 0 11 3 1 containers 0 6 5 1 deepseq 1 4 6 1 directory 1 3 6 2 exceptions 0 10 4 filepath 1 4 2 2 ghc 9 2 3 ghc bignum 1 2 ghc boot 9 2 3 ghc boot th 9 2 3 ghc compact 0 1 0 0 ghc heap 9 2 3 ghc prim 0 8 0 ghci 9 2 3 haskeline 0 8 2 hpc 0 6 1 0 integer gmp 1 1 libiserv 9 2 3 mtl 2 2 2 parsec 3 1 15 0 pretty 1 1 3 6 process 1 6 13 2 rts 1 0 2 stm 2 5 0 2 template haskell 2 18 0 0 text 1 2 5 0 time 1 11 1 1 transformers 0 5 6 2 xhtml 3000 2 2 1 stack path snapshot pkg db directory acme missiles 0 3 stack path local pkg db directory helloworld 0 1 0 0 where stack path global pkg db directory refers to the directory output by the command stack path global pkg db and so on notice that acme missiles ends up in the snapshot database any package which comes from hackage an archive or a repository is considered to be an immutable package anything which is considered mutable or depends on something mutable ends up in the local database this includes your own code and any other packages located on a local file path the reason we have this structure is that it lets multiple projects reuse the same binary builds of immutable packages but does not allow different projects to contaminate each other by putting non standard content into the shared snapshot database as you probably guessed there can be multiple snapshot databases available see the contents of the snapshots directory in the stack root on unix like operating systems each snapshot is in the last of a sequence of three subdirectories named after the platform a 256 bit hash of the source map how the package should be built including the compiler options and immutable dependencies and the ghc version on windows each snapshot is in a subdirectory that is a shorter hash eight characters of the sequence of three directories used on unix like operating systems this is done to avoid problems created by default limits on file path lengths on windows systems these snapshot databases do not get layered on top of each other they are each used separately in reality you will rarely if ever interact directly with these databases but it is good to have a basic understanding of how they work so you can understand why rebuilding may occur at different points back to top copyright c 2015 2025 stack contributors made with material for mkdocs
|