cryptol/tests/parser/infix-1.cry

10 lines
117 B
Plaintext
Raw Normal View History

Add support for user-defined infix operators Squashed commit of the following: commit 9f03b7cd1a1f169ea192d735890fd6a3503ecb39 Author: Trevor Elliott <trevor@galois.com> Date: Wed Jun 3 11:40:27 2015 -0700 Add a test for user-defined infix operators commit 31656a4640e8189b880fa1ce39779c07872ebe18 Author: Trevor Elliott <trevor@galois.com> Date: Wed Jun 3 11:39:43 2015 -0700 Forgot to initialize some fields in the parser commit 73bcb2e5961691f2258f5a7a12ee2dc92d1a1ad3 Author: Trevor Elliott <trevor@galois.com> Date: Wed Jun 3 11:20:40 2015 -0700 Fix unnecessary panics in the renamer commit 03cd8130901fb7aeb12d41cc03ce970ce6571423 Author: Trevor Elliott <trevor@galois.com> Date: Mon Jun 1 01:29:36 2015 -0700 Remove a debug print commit 2934a56b31d51ac971204d3fea9f62bf8829573d Author: Trevor Elliott <trevor@galois.com> Date: Mon Jun 1 01:26:32 2015 -0700 User-defined operators commit 47f4b37fc75accaf0284addc2382c341167b8b6b Author: Trevor Elliott <trevor@galois.com> Date: Sun May 31 23:44:51 2015 -0700 Parse signatures for infix operators commit a1a11705c2eec6e669159756de2eb2cb19bcfa83 Author: Trevor Elliott <trevor@galois.com> Date: Sun May 31 23:28:56 2015 -0700 Plumb fixity information through commit 56134ac0d9fb919f280dabfcdab6506195816340 Author: Trevor Elliott <trevor@galois.com> Date: Sun May 31 22:03:55 2015 -0700 Parse fixity declarations commit f2db0ad5d47d478799dabf03a6cad9be7aec2191 Author: Trevor Elliott <trevor@galois.com> Date: Fri May 29 16:00:57 2015 -0700 Update test output for location changes commit 15949018865d3ac8efca1a081334a7213c25775c Merge: 1bd7f16 52f3a83 Author: Trevor Elliott <trevor@galois.com> Date: Fri May 29 15:36:20 2015 -0700 Merge remote-tracking branch 'origin/master' into wip/infix-operators commit 1bd7f1602bd6bbf5693871f01ca65a4cf3ed3bf8 Author: Trevor Elliott <trevor@galois.com> Date: Fri May 29 15:30:14 2015 -0700 Forgot to consider EParens in translateExprToNumT commit d63435270d5ca5bdf37584e4781a655a685c9c3b Author: Trevor Elliott <trevor@galois.com> Date: Fri May 29 15:29:47 2015 -0700 Add | to the operator character set commit 7be23372c4625bf20b8f8ccf94a148563417f6cb Author: Trevor Elliott <trevor@galois.com> Date: Fri May 29 14:49:07 2015 -0700 Fix the printing of #Uniq variables commit f9110e159aa0c3ae7450fe7a4db2a8d275d9bc1a Author: Trevor Elliott <trevor@galois.com> Date: Thu May 28 17:04:26 2015 -0700 Fix some failing tests commit 0582fd08cc402c7bfd2de2c02df14fa77906e37e Author: Trevor Elliott <trevor@galois.com> Date: Thu May 28 16:12:18 2015 -0700 Remove more primitives from the parser commit f5dafd1ea7954b64f7949c754e0c94abd2598679 Author: Trevor Elliott <trevor@galois.com> Date: Wed May 27 18:02:52 2015 -0700 Do fixity resolution during renaming
2015-06-03 21:42:33 +03:00
infixl 4 ++
infixl 5 **
(++) : [8] -> [8] -> [8]
x ++ y = x + y
2020-05-15 19:33:32 +03:00
(**) : {a} (Ring a) => a -> a -> a
Add support for user-defined infix operators Squashed commit of the following: commit 9f03b7cd1a1f169ea192d735890fd6a3503ecb39 Author: Trevor Elliott <trevor@galois.com> Date: Wed Jun 3 11:40:27 2015 -0700 Add a test for user-defined infix operators commit 31656a4640e8189b880fa1ce39779c07872ebe18 Author: Trevor Elliott <trevor@galois.com> Date: Wed Jun 3 11:39:43 2015 -0700 Forgot to initialize some fields in the parser commit 73bcb2e5961691f2258f5a7a12ee2dc92d1a1ad3 Author: Trevor Elliott <trevor@galois.com> Date: Wed Jun 3 11:20:40 2015 -0700 Fix unnecessary panics in the renamer commit 03cd8130901fb7aeb12d41cc03ce970ce6571423 Author: Trevor Elliott <trevor@galois.com> Date: Mon Jun 1 01:29:36 2015 -0700 Remove a debug print commit 2934a56b31d51ac971204d3fea9f62bf8829573d Author: Trevor Elliott <trevor@galois.com> Date: Mon Jun 1 01:26:32 2015 -0700 User-defined operators commit 47f4b37fc75accaf0284addc2382c341167b8b6b Author: Trevor Elliott <trevor@galois.com> Date: Sun May 31 23:44:51 2015 -0700 Parse signatures for infix operators commit a1a11705c2eec6e669159756de2eb2cb19bcfa83 Author: Trevor Elliott <trevor@galois.com> Date: Sun May 31 23:28:56 2015 -0700 Plumb fixity information through commit 56134ac0d9fb919f280dabfcdab6506195816340 Author: Trevor Elliott <trevor@galois.com> Date: Sun May 31 22:03:55 2015 -0700 Parse fixity declarations commit f2db0ad5d47d478799dabf03a6cad9be7aec2191 Author: Trevor Elliott <trevor@galois.com> Date: Fri May 29 16:00:57 2015 -0700 Update test output for location changes commit 15949018865d3ac8efca1a081334a7213c25775c Merge: 1bd7f16 52f3a83 Author: Trevor Elliott <trevor@galois.com> Date: Fri May 29 15:36:20 2015 -0700 Merge remote-tracking branch 'origin/master' into wip/infix-operators commit 1bd7f1602bd6bbf5693871f01ca65a4cf3ed3bf8 Author: Trevor Elliott <trevor@galois.com> Date: Fri May 29 15:30:14 2015 -0700 Forgot to consider EParens in translateExprToNumT commit d63435270d5ca5bdf37584e4781a655a685c9c3b Author: Trevor Elliott <trevor@galois.com> Date: Fri May 29 15:29:47 2015 -0700 Add | to the operator character set commit 7be23372c4625bf20b8f8ccf94a148563417f6cb Author: Trevor Elliott <trevor@galois.com> Date: Fri May 29 14:49:07 2015 -0700 Fix the printing of #Uniq variables commit f9110e159aa0c3ae7450fe7a4db2a8d275d9bc1a Author: Trevor Elliott <trevor@galois.com> Date: Thu May 28 17:04:26 2015 -0700 Fix some failing tests commit 0582fd08cc402c7bfd2de2c02df14fa77906e37e Author: Trevor Elliott <trevor@galois.com> Date: Thu May 28 16:12:18 2015 -0700 Remove more primitives from the parser commit f5dafd1ea7954b64f7949c754e0c94abd2598679 Author: Trevor Elliott <trevor@galois.com> Date: Wed May 27 18:02:52 2015 -0700 Do fixity resolution during renaming
2015-06-03 21:42:33 +03:00
x ** y = x * y