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

Fix freeVars calculation for TNominal #1774

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
* Fix a bug in which splitting a `[0]` value into type `[inf][0]` would panic.
([#1749](https://github.com/GaloisInc/cryptol/issues/1749))

* Fix a bug in which the free variables of types mentioning newtypes or enums
were incorrectly computed.
([#1773](https://github.com/GaloisInc/cryptol/issues/1773))

## New features

* REPL command `:dumptests <FILE> <EXPR>` updated to write to stdout when
Expand Down
3 changes: 2 additions & 1 deletion src/Cryptol/IR/FreeVars.hs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ instance FreeVars Type where

TUser _ _ t -> freeVars t
TRec fs -> freeVars (recordElements fs)
TNominal nt ts -> freeVars nt <> freeVars ts
TNominal nt ts -> mempty { tyDeps = Set.singleton (ntName nt) }
<> freeVars ts

instance FreeVars TVar where
freeVars tv = case tv of
Expand Down
Loading