Commit Graph

17 Commits

Author SHA1 Message Date
Adam C. Foltzer
13a385d8c5 Fixes #172
There's now a more sensible hierarchy of locations that Cryptol uses to
look for modules. By default, in order it looks for libraries in:

1. The directories specified in the CRYPTOLPATH environment variable
2. The current directory
3. The user data directory (something like `$HOME/.cryptol`)
4. Relative to the executable's install directory
5. The static path used when building the executable (cabal's data-dir)

There is also a new command-line flag for the interpreter:
`--cryptolpath-only` which makes the interpreter ignore locations 2-5.

This commit also reworks the Makefile and build/release process. These
are bunched together because they play off each other quite a bit; the
build/release process determines the location of the `Cryptol.cry`,
which must be found when looking for modules.

Rather than leaning on `cabal install`, we now use a combination of
`cabal configure`, `cabal build`, and `cabal copy`. A couple of upshots
to this:

- More of the release staging is handled by cabal -- we don't have to go
  in and manually copy things out of the sandbox. In fact, the `cryptol`
  executable never goes into the sandbox.

- The testing infrastructure runs on executables that are in place in
  the staging directory, rather than in the sandbox. This should be more
  hygienic and realistic.

- The `Cryptol.cry` prelude file is now in `/share/cryptol` in order to
  better reflect the common POSIX structure. This means Cryptol will
  play nicer in global installs, and mirrors what other interpreted
  languages do.

- The default build settings use a prefix of `/usr/local` rather than
  using the sandbox directory. This makes them more relocatable for
  binary distributions. Set PREFIX= before making to change this.
2015-01-21 15:03:16 -08:00
Adam C. Foltzer
22df9717cb properties and cleanup for new contrib examples 2015-01-18 12:46:03 -08:00
Adam C. Foltzer
193e6595ff serialize alex and happy targets
Fixes #161
2015-01-18 11:39:04 -08:00
Adam C. Foltzer
284338c938 Add the mono-binds flag
When `:set mono-binds=on`, any local definitions lacking type
signatures will not be generalized (i.e., will be monomorphic). This
reduces what is in most cases unnecessary polymorphism that can give
rise to constraints that are difficult to solve. This also improves
the performance of the Cryptol interpreter by lifting many polymorphic
type applications out of the inner loops that are commonly defined as
bindings in `where` clauses.

The flag is on by default in the Cryptol REPL, and in most cases makes
it possible to leave out more type signatures in `where` clauses than
before. However, some programs really do rely on inferring polymorphic
types for local variables; in this case adding an explicit polymorphic
type signature to the local binding in question will make the program
typecheck.
2014-12-15 17:48:25 -08:00
Trevor Elliott
b1eae187e5 Make the cryptol binary depend on the sources
Instead of making the cryptol binary .PHONY, use find to locate all the
sources to depend on.
2014-12-09 11:20:31 -08:00
Trevor Elliott
b3341c02c9 Allow make test to output the diff results 2014-12-05 16:49:58 -08:00
Trevor Elliott
c2821da104 Make the diff command line absolute 2014-12-05 16:27:08 -08:00
Adam C. Foltzer
1cd5526bfe update WiX installer version
Moved from 3.7 to 3.8, and also changed the Program Files path as we're using a 64-bit machine now on the build farm.
2014-10-16 14:51:46 -07:00
Adam C. Foltzer
0b5ba9d6bf allow CABAL_FLAGS to be overridden in Makefile 2014-09-25 15:46:58 -07:00
Adam C. Foltzer
09974fbc64 add makefile target for cryptolnb executable 2014-07-29 09:02:22 -07:00
Dylan McNamee
62acc96f97 Fixing makefile to be compatible with David Lazar's speck fix 2014-04-24 18:07:47 -07:00
Adam C. Foltzer
934e0aae53 change system description parameter in makefile 2014-04-23 19:36:41 -07:00
Adam C. Foltzer
417193b8a8 change glob for markdown docs 2014-04-23 18:54:45 -07:00
Adam C. Foltzer
af3e5ecb39 make package id configurable via env var 2014-04-23 18:52:26 -07:00
Dylan McNamee
288178dea2 markdown -> .md, Acks section, adding spec to contrib 2014-04-23 13:15:18 -07:00
Adam C. Foltzer
695a0781a8 add arch to dist package 2014-04-21 16:07:27 -07:00
Adam C. Foltzer
ba0a0e8576 Initial import from internal repo 2014-04-17 15:34:25 -07:00