1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 16:33:03 +03:00

Generalize lookupConcrete over the term type.

This commit is contained in:
Rob Rix 2019-07-29 12:35:59 -04:00
parent 2559f589a8
commit 2dde20051e
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -132,7 +132,7 @@ concreteAnalysis = Analysis{..}
pure (val >>= lookupConcrete heap n) pure (val >>= lookupConcrete heap n)
lookupConcrete :: Heap (Term (Core.Ann :+: Core.Core) User) -> User -> Concrete (Term (Core.Ann :+: Core.Core) User) -> Maybe Precise lookupConcrete :: Heap term -> User -> Concrete term -> Maybe Precise
lookupConcrete heap name = run . evalState IntSet.empty . runNonDet . inConcrete lookupConcrete heap name = run . evalState IntSet.empty . runNonDet . inConcrete
where -- look up the name in a concrete value where -- look up the name in a concrete value
inConcrete = inFrame <=< maybeA . recordFrame inConcrete = inFrame <=< maybeA . recordFrame