cryptol/tests/issues/issue582.icry.stdout
Iavor Diatchki f6213aff33 Improve error messages when we know a constraint will always fail.
This changes the way the special "Error" type is used. The error
message now contains only an explanation of what happened,
and the actual malformed type is the parameter of the error function,
which is always used at kind `k -> k` where `k` is the malformed kind.

This fixes (or at least improves) #768
2020-06-30 20:03:50 -07:00

89 lines
2.6 KiB
Plaintext

Loading module Cryptol
[error] at <interactive>:1:1--1:18:
Unsolvable constraints:
• fin inf
arising from
use of partial type function (/^)
at <interactive>:1:1--1:18
• Reason: Expected a finite type, but found `inf`.
[error] at <interactive>:1:1--1:18:
Unsolvable constraints:
• fin inf
arising from
use of partial type function (/^)
at <interactive>:1:1--1:18
• Reason: Expected a finite type, but found `inf`.
[error] at <interactive>:1:1--1:16:
Unsolvable constraints:
• 0 >= 1
arising from
use of partial type function (/^)
at <interactive>:1:1--1:16
• Reason: It is not the case that 0 >= 1
[error] at <interactive>:1:1--1:18:
Unsolvable constraints:
• fin inf
arising from
use of partial type function (%^)
at <interactive>:1:1--1:18
• Reason: Expected a finite type, but found `inf`.
[error] at <interactive>:1:1--1:18:
Unsolvable constraints:
• fin inf
arising from
use of partial type function (%^)
at <interactive>:1:1--1:18
• Reason: Expected a finite type, but found `inf`.
[error] at <interactive>:1:1--1:16:
Unsolvable constraints:
• 0 >= 1
arising from
use of partial type function (%^)
at <interactive>:1:1--1:16
• Reason: It is not the case that 0 >= 1
Loading module Cryptol
Loading module Main
[error] at issue582.cry:2:1--2:11:
Failed to validate user-specified signature.
in the definition of 'Main::foo', at issue582.cry:2:1--2:4,
we need to show that
for any type i, j
the following constraints hold:
• fin j
arising from
use of partial type function (/^)
at issue582.cry:1:7--1:21
• fin i
arising from
use of partial type function (/^)
at issue582.cry:1:7--1:21
• j >= 1
arising from
use of partial type function (/^)
at issue582.cry:1:7--1:21
[error] at issue582.cry:5:1--5:11:
Failed to validate user-specified signature.
in the definition of 'Main::bar', at issue582.cry:5:1--5:4,
we need to show that
for any type i, j
the following constraints hold:
• fin j
arising from
use of partial type function (%^)
at issue582.cry:4:7--4:21
• fin i
arising from
use of partial type function (%^)
at issue582.cry:4:7--4:21
• j >= 1
arising from
use of partial type function (%^)
at issue582.cry:4:7--4:21