Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type variables from the Cryptol environment are not in scope within type brackets {| |} #37

Closed
brianhuffman opened this issue Jul 9, 2015 · 1 comment

Comments

@brianhuffman
Copy link
Contributor

SAWScript Int variables are added as numeric type variables to the Cryptol context for parsing expressions:

sawscript> let foo (n:Int) = {{ zero:[n] }}
sawscript> foo 8
Cryptol.ecZero
  (Cryptol.seq (Cryptol.TCNum 8)
     Prelude.Bool)

However, the same variables are not in scope when parsing types within {| |} brackets:

sawscript> let bar (n:Int) = {| [n] |}
sawscript> bar 8
Cryptol error:
[error] at <stdin>:1:23--1:24:
  Undefined type 'n'
@brianhuffman
Copy link
Contributor Author

Even types defined in the Cryptol prelude are not in scope:

sawscript> print {| Bit |}

Cryptol error:
[error] at <stdin>:1:10--1:13:
  Undefined type 'Bit'

@brianhuffman brianhuffman reopened this Jul 31, 2015
brianhuffman pushed a commit that referenced this issue Apr 26, 2021
Add vector size and bvAt checks in scVectorReduced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant