Commit Graph

2007 Commits

Author SHA1 Message Date
Brian Huffman
f53c1f8777 Disambiguate Parser.y so we don't need to rely on operator precedences. 2019-06-25 09:54:23 -07:00
Brian Huffman
5b912afe5a Fix typo in comment. 2019-06-24 13:18:41 -07:00
Brian Huffman
eb7b74a041 Improved formatting for fixity error message.
Cf. #590.
2019-06-24 11:43:08 -07:00
Brian Huffman
f0e527a9dc More informative, nicer error message for fixity errors.
Fixes #590.
2019-06-21 16:01:17 -07:00
Brian Huffman
8001e5d09c Fix typo in comment. 2019-06-21 11:58:21 -07:00
Brian Huffman
5d19320bfa Regenerate pdf of Programming Cryptol book. 2019-06-20 11:07:36 -07:00
Brian Huffman
c62a88a8ec Regenerate Syntax.tex from Syntax.md. 2019-06-20 11:07:18 -07:00
Brian Huffman
bf2a235c1c Regenerate ProgrammingCryptol.pdf. 2019-06-20 11:03:14 -07:00
Brian Huffman
7da982ab2d Update old cryptol-1 syntax in example code. 2019-06-20 10:54:06 -07:00
Brian Huffman
030349f6de Fix outdated usage of value-level function width in Cryptol book.
It is now called `length` and has a generalized type.

Cf. #549.
2019-06-20 10:47:40 -07:00
brianhuffman
641f6563c4
Merge pull request #609 from GaloisInc/lhs-indexing
Lhs indexing
2019-06-19 13:03:42 -07:00
Brian Huffman
00eaa3c187 Factor out function from duplicated code in parser. 2019-06-19 11:34:02 -07:00
Brian Huffman
b83d887551 Update generated Syntax.pdf. 2019-06-19 11:25:46 -07:00
Brian Huffman
8d2f1ed2ba Add examples of x @ i = e syntax to Syntax.md. 2019-06-19 11:25:30 -07:00
Brian Huffman
088126076e Remove trailing whitespace. 2019-06-19 11:24:59 -07:00
Brian Huffman
829c9b9494 Support lhs indexing on record field constructors and updaters.
For example, we can now write

    foo = { f : [8] -> [4][4][8] }
    foo = { f i @ j @ k = i + j + k }
2019-06-19 10:30:28 -07:00
Brian Huffman
4e8ec4f8d0 Fix pretty printer precedences for type expressions to match grammar.
Fixes #610.
2019-06-18 17:57:18 -07:00
Brian Huffman
d94a37adea Add parser fixity declaration for '@' to avoid shift/reduce conflict. 2019-06-18 17:10:46 -07:00
Brian Huffman
69ebb77a56 Support indexing on the left-hand sides of declarations.
The declaration `xs @ i = e` is syntactic sugar for
`xs = generate (\i -> e)`.
2019-06-18 16:11:01 -07:00
Brian Huffman
0a1cea2912 Update test suite output to accommodate new prelude function. 2019-06-18 15:39:56 -07:00
Brian Huffman
2df66aa7c1 Add function generate to Cryptol prelude.
generate : {n, ix, a}
  (fin ix, n >= 1, ix >= width (n - 1)) => ([ix] -> a) -> [n]a
generate f = [ f i | i <- [0 .. n-1] ]
2019-06-18 15:39:13 -07:00
Iavor Diatchki
ec7c9a0f6e Don't generalize a rec. group, if any members are marked as monomorphic.
Fixes #607
2019-06-14 16:14:14 -07:00
Brian Huffman
155e5eaad5 Fix typo in error message. 2019-06-13 13:40:25 -07:00
Brian Huffman
018213dadf Print variable name in SignatureNoBind error message.
Fixes #608.
2019-06-13 11:24:48 -07:00
brianhuffman
ede8c3f647
Merge pull request #604 from GaloisInc/apats1
Remove redundant non-terminal from Cryptol grammar.
2019-06-07 09:56:25 -07:00
Brian Huffman
3549662a17 Remove redundant non-terminal from Cryptol grammar. 2019-06-06 17:55:03 -07:00
brianhuffman
019a79c0c3
Merge pull request #602 from GaloisInc/issue601
Update doc-strings for Cryptol prelude arithmetic operators.
2019-06-03 11:04:25 -07:00
Brian Huffman
97fadf2c58 Update doc-strings for Cryptol prelude arithmetic operators.
Fixes #601.
2019-05-30 18:48:03 -07:00
Iavor Diatchki
8d454113cd If a type does not have parameters, we do not need parens.
Fixes #600
2019-05-30 14:09:50 -07:00
Iavor Diatchki
d428f64bdc Add some examples about how to write Cryptol expressions. 2019-05-30 10:29:35 -07:00
Iavor Diatchki
35e07336ab Parser updates, related to #437 2019-05-30 09:50:55 -07:00
Iavor Diatchki
c5ab9649d9 Allow multiple fat arrows in schemas.
The qualifiers from all arrows are combined into a single set.

Fixes #599
2019-05-29 12:54:17 -07:00
Iavor Diatchki
4ce64e9f84 Add an extra rule for Arith when the lenght of the sequence is inf
Fixes #596
2019-05-28 15:58:53 -07:00
Iavor Diatchki
56cb58aa7d Merge branch 'master' of github.com:GaloisInc/cryptol 2019-05-14 15:25:40 -07:00
Iavor Diatchki
f607b40fc3 More flexible "start of code block" in Markdown mode.
This should fix #595.
2019-05-14 15:25:30 -07:00
Aaron Tomb
2ce982ab49 Update copyright dates 2019-04-30 09:13:37 -07:00
Aaron Tomb
6276cc6afb Add CHANGES.md file 2019-04-30 09:13:37 -07:00
Iavor Diatchki
843fe310f8 Allow _ in [ 1 .. _ ].
Fixes #588
2019-04-26 14:58:44 -07:00
Iavor Diatchki
07a30a92e8 Check type parameters after we've figured out the schema.
In this way, we know the kinds of the parameters and there is no
need to guess them.


Fixes #589
2019-04-26 14:40:46 -07:00
Aaron Tomb
4db158eafb Bump Cryptol version to 2.7.1 (next release) 2019-04-26 09:14:54 -07:00
Iavor Diatchki
75f20af6b5 Merge branch 'master' of github.com:GaloisInc/cryptol 2019-04-25 17:11:58 -07:00
Iavor Diatchki
6e7790b6fb Front end considerations for primitive types. 2019-04-25 15:35:17 -07:00
Iavor Diatchki
ad6f3b5fb8 Don't panic when there is unimplemented primitive. 2019-04-25 15:09:13 -07:00
Iavor Diatchki
ed8fb2ae46 Handle the case where evaluation of something crashes. Also add a new error for prims. 2019-04-25 15:08:23 -07:00
Iavor Diatchki
6190fcd752 Primitive type declarations. 2019-04-25 13:56:01 -07:00
Iavor Diatchki
d377eac45d Initial---incomplete---implementation of abstract types. 2019-04-24 17:10:47 -07:00
Aaron Tomb
980827280d Remove GHC 8.2 freeze file 2019-04-24 15:25:22 -07:00
Aaron Tomb
92afdb5a26 Update freeze file for GHC 8.4 2019-04-24 15:24:31 -07:00
Aaron Tomb
711551b5f1 Remove Cabal version constraints from freeze files 2019-04-24 15:19:15 -07:00
Aaron Tomb
bfe57c3c90 Update some Cabal freeze files 2019-04-17 12:40:31 -07:00