Skip to content

Commit

Permalink
Merge pull request #1774 from GaloisInc/T1773-fix-TNominal-freeVars
Browse files Browse the repository at this point in the history
Fix `freeVars` calculation for `TNominal`
  • Loading branch information
RyanGlScott authored Nov 21, 2024
2 parents 8ba9700 + 406f2c3 commit 56a93da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 56a93da

Please sign in to comment.