GaloisInc / cryptol-compiler

BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Add support for `Z` types #34

Open RyanGlScott opened 8 months ago

RyanGlScott commented 8 months ago

cryptol-compiler fails to compile programs involving values of type Z, as seen in this example:

main =  (5: Z 7) + 4
error[E0412]: cannot find type `Z` in crate `cry_rts`
 --> src/main.rs:6:27
  |
6 | pub fn main() -> cry_rts::Z {
  |                           ^ not found in `cry_rts`

error[E0412]: cannot find type `Z` in crate `cry_rts`
 --> src/main.rs:7:13
  |
7 |   <cry_rts::Z>::add(
  |             ^ not found in `cry_rts`

error[E0412]: cannot find type `Z` in crate `cry_rts`
 --> src/main.rs:8:15
  |
8 |     <cry_rts::Z>::number((), 5usize).as_arg(),
  |               ^ not found in `cry_rts`

error[E0412]: cannot find type `Z` in crate `cry_rts`
 --> src/main.rs:9:15
  |
9 |     <cry_rts::Z>::number((), 4usize).as_arg(),
  |               ^ not found in `cry_rts`

For more information about this error, try `rustc --explain E0412`.
error: could not compile `test` due to 4 previous errors

There are a number of test cases involving Z types, which we must mark as expected to fail for the time being due to this issue. (See #30.) This issue tracks the task of adding full support for Z types, as well repairing the associated test cases.