Previously this function would always produce a sequence with the
"isWord" bit set to False. It now takes a type argument so that it can
properly set it to True when the elements are Bits.
- Move the stackage file so it's not on by default (will test with it on
Jenkins instead of all the time)
- Use CPP to remove unnecessary import warnings in 7.10
This helps with #18 and should also reduce the number of unnecessary
recompiles that were triggered by the Makefile and/or cabal. The cabal
build type is now Simple.
Most of the complication in the TH.hs module is due to the various
places the current git hash might be stored:
1. Detached HEAD: the hash is in `.git/HEAD`
2. On a branch or tag: the hash is in a file pointed to by `.git/HEAD`
in a location like `.git/refs/heads`
3. On a branch or tag but in a repository with packed refs: the hash is
in `.git/packed-refs`
These situations all arise under normal development workflows and on the
Jenkins build machines, but there might be further scenarios that cause
problems. The tradeoff seems worthwhile though as now projects that
build Cryptol as a dependency wind up having to rebuild Cryptol far less
frequently.
Many of our projects that depend on Cryptol break because we forgot to
drag along `Cryptol.cry` or it just can't work out where it is from the
perspective of the other executable.
There's now a new flag `self-contained` in `cryptol.cabal` that is on by
default that bakes the contents of the Prelude into the library, so that
it can be reproduced on demand.
This is really a hack at this point because the module system bakes in
the assumption that a module has an associated file path, so we actually
have to write the contents to a tmp file before reading them back
in. Let's do better than this in the future.
This option is disabled for targets in the Makefile because we want the
standalone interpreter to be using the distribution's `Cryptol.cry`.
The issue is not the set of names in scope, it is the type names
printed out by the :t command. It should use the same names that
are in scope in the module.
If the type of an expression contains a type synonym that is not
in scope at all, then I'm not sure what exactly it should do.