cryptol/cryptol.cabal

337 lines
12 KiB
Plaintext
Raw Normal View History

Cabal-version: 2.4
2014-04-18 21:18:26 +04:00
Name: cryptol
Version: 3.2.0.99
2014-04-18 02:34:25 +04:00
Synopsis: Cryptol: The Language of Cryptography
Description: Cryptol is a domain-specific language for specifying cryptographic algorithms. A Cryptol implementation of an algorithm resembles its mathematical specification more closely than an implementation in a general purpose language. For more, see <http://www.cryptol.net/>.
License: BSD-3-Clause
License-file: LICENSE
2014-04-18 02:34:25 +04:00
Author: Galois, Inc.
Maintainer: cryptol@galois.com
Homepage: http://www.cryptol.net/
Bug-reports: https://github.com/GaloisInc/cryptol/issues
2022-05-17 16:02:36 +03:00
Copyright: 2013-2022 Galois Inc.
2014-04-18 02:34:25 +04:00
Category: Language
Build-type: Simple
extra-source-files: bench/data/*.cry
2019-04-30 02:17:54 +03:00
CHANGES.md
lib/*.cry lib/*.z3
2014-04-18 02:34:25 +04:00
data-files: **/*.cry **/*.z3
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-22 02:03:16 +03:00
data-dir: lib
2014-04-18 02:34:25 +04:00
source-repository head
type: git
location: https://github.com/GaloisInc/cryptol.git
source-repository this
type: git
location: https://github.com/GaloisInc/cryptol.git
2020-11-10 20:36:05 +03:00
-- add a tag on release branches
-- tag:
2014-04-18 02:34:25 +04:00
flag static
default: False
description: Create a statically-linked binary
flag relocatable
default: True
description: Don't use the Cabal-provided data directory for looking up Cryptol libraries. This is useful when the data directory can't be known ahead of time, like for a relocatable distribution.
2022-07-06 05:29:15 +03:00
flag ffi
default: True
description: Enable the foreign function interface
2014-04-18 02:34:25 +04:00
library
Default-language:
Haskell2010
Build-depends: base >= 4.9 && < 5,
arithmoi >= 0.12,
async >= 2.2 && < 2.3,
base-compat >= 0.6 && < 0.13,
2020-05-06 23:01:57 +03:00
bv-sized >= 1.0 && < 1.1,
2015-12-26 08:39:01 +03:00
bytestring >= 0.10,
array >= 0.4,
containers >= 0.5,
2022-08-29 20:44:59 +03:00
criterion-measurement,
cryptohash-sha1 >= 0.11 && < 0.12,
deepseq >= 1.3,
2016-06-07 23:40:15 +03:00
directory >= 1.2.2.0,
exceptions,
file-embed >= 0.0.16,
filepath >= 1.3,
gitrev >= 1.0,
ghc-prim,
GraphSCC >= 1.0.4,
2022-09-08 06:54:48 +03:00
language-c99,
language-c99-simple,
libBF >= 0.6 && < 0.7,
MemoTrie >= 0.6 && < 0.7,
monad-control >= 1.0,
monadLib >= 3.7.2,
parameterized-utils >= 2.0.2,
2022-09-08 06:54:48 +03:00
pretty,
prettyprinter >= 1.7.0,
2022-06-14 01:56:15 +03:00
pretty-show,
process >= 1.2,
sbv >= 9.1 && < 10.11,
simple-smt >= 0.9.7,
stm >= 2.4,
strict,
text >= 1.1,
tf-random >= 0.5,
transformers-base >= 0.4,
2022-08-29 20:44:59 +03:00
vector,
mtl >= 2.2.1,
time >= 1.6.0.1,
panic >= 0.3,
what4 >= 1.4 && < 1.7
if impl(ghc >= 9.0)
build-depends: ghc-bignum >= 1.0 && < 1.4
else
build-depends: integer-gmp >= 1.0 && < 1.1
2022-07-06 05:29:15 +03:00
if flag(ffi)
2022-09-10 11:19:57 +03:00
build-depends: hgmp,
libffi >= 0.2
if os(windows)
build-depends: Win32
else
build-depends: unix
2022-07-06 05:29:15 +03:00
cpp-options: -DFFI_ENABLED
2020-11-10 20:36:05 +03:00
Build-tool-depends: alex:alex, happy:happy
hs-source-dirs: src
2014-04-18 02:34:25 +04:00
Exposed-modules: Cryptol.Parser,
2014-04-18 02:34:25 +04:00
Cryptol.Parser.Lexer,
Cryptol.Parser.Token,
Cryptol.Parser.Layout,
2014-04-18 02:34:25 +04:00
Cryptol.Parser.AST,
Cryptol.Parser.Position,
Cryptol.Parser.Names,
Cryptol.Parser.Name,
2014-04-18 02:34:25 +04:00
Cryptol.Parser.NoPat,
2022-07-07 01:51:51 +03:00
Cryptol.Parser.ExpandPropGuards,
2014-04-18 02:34:25 +04:00
Cryptol.Parser.NoInclude,
Cryptol.Parser.Selector,
2014-04-18 02:34:25 +04:00
Cryptol.Parser.Utils,
Cryptol.Parser.Unlit,
Cryptol.Utils.Fixity,
Cryptol.Utils.Ident,
Cryptol.Utils.RecordMap,
2014-04-18 02:34:25 +04:00
Cryptol.Utils.PP,
Cryptol.Utils.Panic,
Cryptol.Utils.Debug,
Cryptol.Utils.Misc,
Cryptol.Utils.Patterns,
Cryptol.Utils.Logger,
2022-08-30 08:56:04 +03:00
Cryptol.Utils.Benchmark,
2022-08-31 00:24:47 +03:00
Cryptol.Utils.Types,
2014-04-18 02:34:25 +04:00
Cryptol.Version,
Cryptol.ModuleSystem,
Cryptol.ModuleSystem.Base,
Cryptol.ModuleSystem.Env,
Cryptol.ModuleSystem.Fingerprint,
2014-04-18 02:34:25 +04:00
Cryptol.ModuleSystem.Interface,
Cryptol.ModuleSystem.Monad,
Cryptol.ModuleSystem.Name,
2022-06-14 01:56:15 +03:00
Cryptol.ModuleSystem.Names,
2014-04-18 02:34:25 +04:00
Cryptol.ModuleSystem.NamingEnv,
Cryptol.ModuleSystem.NamingEnv.Types,
2022-06-14 01:56:15 +03:00
Cryptol.ModuleSystem.Binds
Cryptol.ModuleSystem.Exports,
Implementation of nested modules. * Limitations: Does not work in combination parameterized modules, as I am about to redo how that works. * General refeactorings: * Namespaces: - We have an explicit type for namespaces, see `Cryptol.Util.Ident` - Display environments should now be aware of the namespace of the name being displayed. * Renamer: - Factor out the renamer monad and error type into separate modules - All name resultion is done through a single function `resolveName` - The renamer now computes the dependencies between declarations, orders things in dependency order, and checks for bad recursion. * Typechecker: Redo checking of declarations (both top-level and local). Previously we used a sort of CPS to add things in scope. Now we use a state monad and add things to the state. We assume that the renamer has been run, which means that declarations are ordered in dependency order, and things have unique name, so we don't need to worry about scoping too much. * Change specific to nested modules: - We have a new namespace for module names - The interface file of a module contains the interfaces for nested modules - Most of the changes related to nested modules in the renamer are in `ModuleSystem.NamingEnv` and `ModuleSystem.Rename` - There is some trickiness when resolving module names when importing submodules (seed `processOpen` and `openLoop`) - There are some changes to the representation of modules in the typechecked syntax, in particular: - During type-checking we "flatten" nested module declarations into a single big declaration. Hopefully, this means that passes after the type checker don't need to worry about nested modules - There is a new field containing the interfaces of the nested modules, this is needed so that when we import the module we know we have the nested structure - Declarations in functor/parameterzied modules do not appear in the flattened list of declarations. Instead thouse modules are collected in a separate field, and the plan is that they would be used from there when we implmenet functor instantiation.
2021-01-27 02:54:24 +03:00
Cryptol.ModuleSystem.Renamer,
2022-06-14 01:56:15 +03:00
Cryptol.ModuleSystem.Renamer.Imports,
Cryptol.ModuleSystem.Renamer.ImplicitImports,
Implementation of nested modules. * Limitations: Does not work in combination parameterized modules, as I am about to redo how that works. * General refeactorings: * Namespaces: - We have an explicit type for namespaces, see `Cryptol.Util.Ident` - Display environments should now be aware of the namespace of the name being displayed. * Renamer: - Factor out the renamer monad and error type into separate modules - All name resultion is done through a single function `resolveName` - The renamer now computes the dependencies between declarations, orders things in dependency order, and checks for bad recursion. * Typechecker: Redo checking of declarations (both top-level and local). Previously we used a sort of CPS to add things in scope. Now we use a state monad and add things to the state. We assume that the renamer has been run, which means that declarations are ordered in dependency order, and things have unique name, so we don't need to worry about scoping too much. * Change specific to nested modules: - We have a new namespace for module names - The interface file of a module contains the interfaces for nested modules - Most of the changes related to nested modules in the renamer are in `ModuleSystem.NamingEnv` and `ModuleSystem.Rename` - There is some trickiness when resolving module names when importing submodules (seed `processOpen` and `openLoop`) - There are some changes to the representation of modules in the typechecked syntax, in particular: - During type-checking we "flatten" nested module declarations into a single big declaration. Hopefully, this means that passes after the type checker don't need to worry about nested modules - There is a new field containing the interfaces of the nested modules, this is needed so that when we import the module we know we have the nested structure - Declarations in functor/parameterzied modules do not appear in the flattened list of declarations. Instead thouse modules are collected in a separate field, and the plan is that they would be used from there when we implmenet functor instantiation.
2021-01-27 02:54:24 +03:00
Cryptol.ModuleSystem.Renamer.Monad,
Cryptol.ModuleSystem.Renamer.Error,
2014-04-18 02:34:25 +04:00
Cryptol.TypeCheck,
2017-01-31 05:14:10 +03:00
Cryptol.TypeCheck.Type,
Cryptol.TypeCheck.TCon,
Cryptol.TypeCheck.TypePat,
Cryptol.TypeCheck.SimpType,
2014-04-18 02:34:25 +04:00
Cryptol.TypeCheck.AST,
2017-08-15 01:45:37 +03:00
Cryptol.TypeCheck.Parseable,
2014-04-18 02:34:25 +04:00
Cryptol.TypeCheck.Monad,
Cryptol.TypeCheck.Infer,
Cryptol.TypeCheck.InferTypes,
Implementation of nested modules. * Limitations: Does not work in combination parameterized modules, as I am about to redo how that works. * General refeactorings: * Namespaces: - We have an explicit type for namespaces, see `Cryptol.Util.Ident` - Display environments should now be aware of the namespace of the name being displayed. * Renamer: - Factor out the renamer monad and error type into separate modules - All name resultion is done through a single function `resolveName` - The renamer now computes the dependencies between declarations, orders things in dependency order, and checks for bad recursion. * Typechecker: Redo checking of declarations (both top-level and local). Previously we used a sort of CPS to add things in scope. Now we use a state monad and add things to the state. We assume that the renamer has been run, which means that declarations are ordered in dependency order, and things have unique name, so we don't need to worry about scoping too much. * Change specific to nested modules: - We have a new namespace for module names - The interface file of a module contains the interfaces for nested modules - Most of the changes related to nested modules in the renamer are in `ModuleSystem.NamingEnv` and `ModuleSystem.Rename` - There is some trickiness when resolving module names when importing submodules (seed `processOpen` and `openLoop`) - There are some changes to the representation of modules in the typechecked syntax, in particular: - During type-checking we "flatten" nested module declarations into a single big declaration. Hopefully, this means that passes after the type checker don't need to worry about nested modules - There is a new field containing the interfaces of the nested modules, this is needed so that when we import the module we know we have the nested structure - Declarations in functor/parameterzied modules do not appear in the flattened list of declarations. Instead thouse modules are collected in a separate field, and the plan is that they would be used from there when we implmenet functor instantiation.
2021-01-27 02:54:24 +03:00
Cryptol.TypeCheck.Interface,
2017-12-22 00:59:43 +03:00
Cryptol.TypeCheck.Error,
2014-04-18 02:34:25 +04:00
Cryptol.TypeCheck.Kind,
Cryptol.TypeCheck.Subst,
Cryptol.TypeCheck.Instantiate,
Cryptol.TypeCheck.Unify,
Cryptol.TypeCheck.PP,
Cryptol.TypeCheck.Solve,
Cryptol.TypeCheck.Default,
2017-01-31 05:14:10 +03:00
Cryptol.TypeCheck.SimpleSolver,
2014-04-18 02:34:25 +04:00
Cryptol.TypeCheck.TypeMap,
Cryptol.TypeCheck.TypeOf,
Cryptol.TypeCheck.Sanity,
2022-07-14 00:40:59 +03:00
Cryptol.TypeCheck.FFI,
Cryptol.TypeCheck.FFI.Error,
Cryptol.TypeCheck.FFI.FFIType,
2022-06-14 01:56:15 +03:00
Cryptol.TypeCheck.Module,
Cryptol.TypeCheck.ModuleInstance,
Cryptol.TypeCheck.ModuleBacktickInstance,
2014-04-18 02:34:25 +04:00
2017-02-01 01:12:53 +03:00
Cryptol.TypeCheck.Solver.Types,
Cryptol.TypeCheck.Solver.SMT,
2014-04-18 02:34:25 +04:00
Cryptol.TypeCheck.Solver.InfNat,
Cryptol.TypeCheck.Solver.Class,
Cryptol.TypeCheck.Solver.Selector,
Cryptol.TypeCheck.Solver.Utils,
2017-01-31 05:14:10 +03:00
Cryptol.TypeCheck.Solver.Numeric,
Cryptol.TypeCheck.Solver.Improve,
Cryptol.TypeCheck.Solver.Numeric.Fin,
Cryptol.TypeCheck.Solver.Numeric.Interval,
2014-04-18 02:34:25 +04:00
Cryptol.Transform.MonoValues,
Cryptol.Transform.Specialize,
Cryptol.IR.FreeVars,
2022-06-14 01:56:15 +03:00
Cryptol.IR.TraverseNames,
Cryptol.Backend,
Cryptol.Backend.Arch,
Cryptol.Backend.Concrete,
Cryptol.Backend.FFI,
2022-07-06 05:29:15 +03:00
Cryptol.Backend.FFI.Error,
Cryptol.Backend.FloatHelpers,
Cryptol.Backend.Monad,
Cryptol.Backend.SeqMap,
Cryptol.Backend.SBV,
Cryptol.Backend.What4,
Cryptol.Backend.WordValue,
2014-04-18 02:34:25 +04:00
Cryptol.Eval,
Cryptol.Eval.Concrete,
2014-04-18 02:34:25 +04:00
Cryptol.Eval.Env,
Cryptol.Eval.FFI,
2022-09-08 06:54:48 +03:00
Cryptol.Eval.FFI.GenHeader,
Cryptol.Eval.Generic,
Cryptol.Eval.Prims,
Cryptol.Eval.Reference,
Cryptol.Eval.SBV,
2014-04-18 02:34:25 +04:00
Cryptol.Eval.Type,
Cryptol.Eval.Value,
Cryptol.Eval.What4,
2014-04-18 02:34:25 +04:00
Cryptol.AES,
Cryptol.F2,
Cryptol.SHA,
Cryptol.PrimeEC,
2014-04-18 02:34:25 +04:00
Cryptol.Testing.Random,
Cryptol.Symbolic,
Cryptol.Symbolic.SBV,
Cryptol.Symbolic.What4,
2014-04-18 02:34:25 +04:00
Cryptol.REPL.Command,
2022-06-14 01:56:15 +03:00
Cryptol.REPL.Help,
Cryptol.REPL.Browse,
Cryptol.REPL.Monad,
Cryptol.REPL.Trie
2014-04-18 02:34:25 +04:00
Other-modules: Cryptol.Parser.LexerUtils,
Cryptol.Parser.ParserUtils,
Cryptol.Prelude,
GHC.Num.Compat,
2014-04-18 21:28:46 +04:00
Paths_cryptol,
2014-04-18 02:34:25 +04:00
GitRev
GHC-options: -Wall -fsimpl-tick-factor=140 -O2
2016-06-28 00:56:55 +03:00
if impl(ghc >= 8.0.1)
ghc-options: -Wno-redundant-constraints
2014-04-18 02:34:25 +04:00
if flag(relocatable)
cpp-options: -DRELOCATABLE
2014-04-18 02:34:25 +04:00
executable cryptol
Default-language:
Haskell2010
2014-04-18 02:34:25 +04:00
Main-is: Main.hs
hs-source-dirs: cryptol
2020-11-10 20:36:05 +03:00
Autogen-modules: Paths_cryptol
2014-04-18 02:34:25 +04:00
Other-modules: OptParser,
REPL.Haskeline,
2015-01-28 22:28:52 +03:00
REPL.Logo,
2014-04-18 21:28:46 +04:00
Paths_cryptol
2020-11-10 20:36:05 +03:00
2015-02-06 04:05:11 +03:00
build-depends: ansi-terminal
, base
2015-10-09 02:54:08 +03:00
, base-compat
, containers
2015-02-06 04:05:11 +03:00
, cryptol
, directory
, filepath
, haskeline >= 0.7 && < 0.9
, exceptions
, monad-control
, text
2015-02-06 04:05:11 +03:00
, transformers
GHC-options: -Wall -threaded -rtsopts "-with-rtsopts=-N1 -A64m" -O2
2016-06-28 00:56:55 +03:00
if impl(ghc >= 8.0.1)
ghc-options: -Wno-redundant-constraints
2014-04-18 02:34:25 +04:00
if os(linux) && flag(static)
ld-options: -static -pthread
ghc-options: -optl-fuse-ld=bfd
2017-10-25 21:12:37 +03:00
executable cryptol-html
Default-language:
Haskell2010
2017-10-25 21:12:37 +03:00
main-is: CryHtml.hs
hs-source-dirs: utils
2018-03-06 04:07:19 +03:00
build-depends: base, text, cryptol, blaze-html
2017-10-25 21:12:37 +03:00
GHC-options: -Wall
if os(linux) && flag(static)
ld-options: -static -pthread
ghc-options: -optl-fuse-ld=bfd
executable check-exercises
Default-language:
Haskell2010
Main-is: CheckExercises.hs
hs-source-dirs: cryptol
build-depends: ansi-terminal
, base
, containers
, directory
, extra
, filepath
, mtl
, optparse-applicative
, process
, temporary
, text
GHC-options: -Wall
benchmark cryptol-bench
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: bench
default-language: Haskell2010
GHC-options: -Wall -threaded -rtsopts "-with-rtsopts=-N1 -A64m" -O2
2016-06-28 00:56:55 +03:00
if impl(ghc >= 8.0.1)
ghc-options: -Wno-redundant-constraints
if os(linux) && flag(static)
ld-options: -static -pthread
ghc-options: -optl-fuse-ld=bfd
build-depends: base
, criterion
, cryptol
, deepseq
, directory
, filepath
, sbv
, text