2014-12-16 04:48:25 +03:00
|
|
|
Loading module Cryptol
|
|
|
|
Loading module Cryptol
|
|
|
|
Loading module test05
|
2015-02-18 02:27:59 +03:00
|
|
|
[warning] at ./test05.cry:9:3--9:6
|
2014-12-16 04:48:25 +03:00
|
|
|
This binding for foo shadows the existing binding from
|
2015-09-29 07:26:26 +03:00
|
|
|
(at ./test05.cry:4:1--4:4, foo)
|
2015-02-18 02:27:59 +03:00
|
|
|
[warning] at ./test05.cry:13:5--13:8
|
2014-12-16 04:48:25 +03:00
|
|
|
This binding for foo shadows the existing binding from
|
2015-02-18 02:27:59 +03:00
|
|
|
(at ./test05.cry:9:3--9:6, foo)
|
2014-12-16 04:48:25 +03:00
|
|
|
module test05
|
|
|
|
import Cryptol
|
|
|
|
/* Not recursive */
|
|
|
|
test05::foo : [10]
|
2018-07-27 23:52:57 +03:00
|
|
|
test05::foo = Cryptol::number 10 [10] <>
|
2014-12-16 04:48:25 +03:00
|
|
|
|
|
|
|
/* Not recursive */
|
2018-12-12 02:52:19 +03:00
|
|
|
test05::test : {n, a, b} (Zero b, Literal 10 a) => [n]b -> a
|
|
|
|
test05::test = \{n, a, b} (Zero b, Literal 10 a) (a : [n]b) ->
|
|
|
|
Cryptol::number 10 a <>
|
2014-12-16 04:48:25 +03:00
|
|
|
where
|
|
|
|
/* Not recursive */
|
2015-09-29 07:26:26 +03:00
|
|
|
test05::foo : [10]
|
2018-07-27 23:52:57 +03:00
|
|
|
test05::foo = Cryptol::number 10 [10] <>
|
2014-12-16 04:48:25 +03:00
|
|
|
|
|
|
|
/* Not recursive */
|
2018-12-12 02:52:19 +03:00
|
|
|
test05::f : {m} (fin m) => [n + m]b
|
Improvements to naming of variables.
This does a bunch of small changes, that should improve the usability
of Cryptol. Namely:
* When we are forced to make up a name, pick something derived from
the source of the variable, annotated with the unique.
* When pretty printing a schema, use "n,m,i,j,k" for numeric variables
and "a,b,c,d,e" for value type vairable.
* When generalizing, put numeric vairables first.
2018-06-29 01:58:11 +03:00
|
|
|
test05::f = \{m} (fin m) ->
|
|
|
|
test05::bar m <>
|
2015-09-29 07:26:26 +03:00
|
|
|
where
|
|
|
|
/* Not recursive */
|
2018-12-12 02:52:19 +03:00
|
|
|
test05::foo : [n]b
|
2015-09-29 07:26:26 +03:00
|
|
|
test05::foo = a
|
|
|
|
|
|
|
|
/* Not recursive */
|
2018-12-12 02:52:19 +03:00
|
|
|
test05::bar : {i} (fin i) => [i + n]b
|
Improvements to naming of variables.
This does a bunch of small changes, that should improve the usability
of Cryptol. Namely:
* When we are forced to make up a name, pick something derived from
the source of the variable, annotated with the unique.
* When pretty printing a schema, use "n,m,i,j,k" for numeric variables
and "a,b,c,d,e" for value type vairable.
* When generalizing, put numeric vairables first.
2018-06-29 01:58:11 +03:00
|
|
|
test05::bar = \{i} (fin i) ->
|
2018-12-12 02:52:19 +03:00
|
|
|
(Cryptol::#) i n b <> (Cryptol::zero ([i]b) <>) test05::foo
|
2015-09-29 07:26:26 +03:00
|
|
|
|
|
|
|
|
2014-12-16 04:48:25 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Loading module Cryptol
|
|
|
|
Loading module test05
|
2015-02-18 02:27:59 +03:00
|
|
|
[warning] at ./test05.cry:9:3--9:6
|
2014-12-16 04:48:25 +03:00
|
|
|
This binding for foo shadows the existing binding from
|
2015-06-10 00:27:43 +03:00
|
|
|
(at ./test05.cry:4:1--4:4, foo)
|
2015-02-18 02:27:59 +03:00
|
|
|
[warning] at ./test05.cry:13:5--13:8
|
2014-12-16 04:48:25 +03:00
|
|
|
This binding for foo shadows the existing binding from
|
2015-02-18 02:27:59 +03:00
|
|
|
(at ./test05.cry:9:3--9:6, foo)
|
2018-06-20 03:28:59 +03:00
|
|
|
[warning] at ./test05.cry:14:11--14:21:
|
2018-06-26 02:48:10 +03:00
|
|
|
Defaulting type argument 'front' of '(#)' to 0
|
2014-12-16 04:48:25 +03:00
|
|
|
module test05
|
|
|
|
import Cryptol
|
|
|
|
/* Not recursive */
|
|
|
|
test05::foo : [10]
|
2018-07-27 23:52:57 +03:00
|
|
|
test05::foo = Cryptol::number 10 [10] <>
|
2014-12-16 04:48:25 +03:00
|
|
|
|
|
|
|
/* Not recursive */
|
2018-12-12 02:52:19 +03:00
|
|
|
test05::test : {n, a, b} (Zero b, Literal 10 a) => [n]b -> a
|
|
|
|
test05::test = \{n, a, b} (Zero b, Literal 10 a) (a : [n]b) ->
|
|
|
|
Cryptol::number 10 a <>
|
2014-12-16 04:48:25 +03:00
|
|
|
where
|
|
|
|
/* Not recursive */
|
2015-09-29 07:26:26 +03:00
|
|
|
test05::foo : [10]
|
2018-07-27 23:52:57 +03:00
|
|
|
test05::foo = Cryptol::number 10 [10] <>
|
2014-12-16 04:48:25 +03:00
|
|
|
|
|
|
|
/* Not recursive */
|
2018-12-12 02:52:19 +03:00
|
|
|
test05::f : [n]b
|
2015-09-29 07:26:26 +03:00
|
|
|
test05::f = test05::bar
|
|
|
|
where
|
|
|
|
/* Not recursive */
|
2018-12-12 02:52:19 +03:00
|
|
|
test05::foo : [n]b
|
2015-09-29 07:26:26 +03:00
|
|
|
test05::foo = a
|
|
|
|
|
|
|
|
/* Not recursive */
|
2018-12-12 02:52:19 +03:00
|
|
|
test05::bar : [n]b
|
|
|
|
test05::bar = (Cryptol::#) 0 n b <> (Cryptol::zero ([0]b) <>) test05::foo
|
2015-09-29 07:26:26 +03:00
|
|
|
|
|
|
|
|
2014-12-16 04:48:25 +03:00
|
|
|
|
|
|
|
|
|
|
|
|