1
1
mirror of https://github.com/github/semantic.git synced 2024-11-27 12:57:49 +03:00

Reference variables using the Domain effect.

This commit is contained in:
Rob Rix 2019-12-19 12:11:37 -05:00
parent c4db1c9db4
commit f68bce11f6
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -102,8 +102,8 @@ eval Analysis{..} eval = \case
c' <- eval c >>= A.asBool @Term @address
if c' then ref t else ref e
a :. b -> do
a' <- ref a
a' ... b >>= maybe (freeVariable (show b)) pure
a' <- eval a >>= asRecord @Term @address
maybe (freeVariable (show b)) ref (lookup b a')
c -> invalidRef (show c)
Term.Alg (R (R c)) -> invalidRef (show c)
Term.Alg (L (Ann span c)) -> local (const span) (ref c)