mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-16 11:22:33 +03:00
When applying a defaulting substitution, keep going even if value found.
Since our substitutions are idempotent, normally this would be just wasted work, but when we are defaulting, we must make sure that we default the varibales in the looked up thing also. This fixes #534
This commit is contained in:
parent
863c165c66
commit
f398a68fad
@ -155,7 +155,7 @@ apSubstMaybe su ty =
|
||||
applySubstToVar :: Subst -> TVar -> Maybe Type
|
||||
applySubstToVar su x =
|
||||
case Map.lookup x (suMap su) of
|
||||
Just t -> Just t
|
||||
Just t -> Just (if suDefaulting su then apSubst su t else t)
|
||||
Nothing
|
||||
| suDefaulting su -> Just $! defaultFreeVar x
|
||||
| otherwise -> Nothing
|
||||
|
Loading…
Reference in New Issue
Block a user