1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

📝 the AbstractValue instances.

This commit is contained in:
Rob Rix 2017-12-21 09:50:02 -05:00
parent 8e3a14ce4d
commit 9c481b6567

View File

@ -103,6 +103,7 @@ instance (FreeVariables term, Ord location) => ValueRoots location (Value locati
| Just (Closure names body env) <- prj v = envRoots env (foldr Set.delete (freeVariables body) names)
| otherwise = mempty
-- | Construct a 'Value' wrapping the value arguments (if any).
instance AbstractValue (Value location term) where
unit = inj Unit
integer = inj . Integer
@ -112,6 +113,7 @@ instance AbstractValue (Value location term) where
instance ValueRoots Monovariant Type.Type where
valueRoots _ = mempty
-- | Discard the value arguments (if any), constructing a 'Type.Type' instead.
instance AbstractValue Type.Type where
unit = Type.Unit
integer _ = Type.Int