1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 13:21:59 +03:00

add numeric carrier instance to abstract domain

This commit is contained in:
Ayman Nadeem 2018-12-12 16:59:46 -05:00
parent d46e7e13b5
commit e953380aaf

View File

@ -91,6 +91,16 @@ instance Carrier sig m
Abstract.String _ k -> runStringC (k Abstract)
AsString _ k -> runStringC (k ""))
instance Carrier sig m
=> Carrier (Numeric Abstract :+: sig) (NumericC Abstract m) where
ret = NumericC . ret
eff = NumericC . handleSum (eff . handleCoercible) (\case
Integer _ k -> runNumericC (k Abstract)
Float _ k -> runNumericC (k Abstract)
Rational _ k -> runNumericC (k Abstract)
LiftNumeric _ _ k -> runNumericC (k Abstract)
LiftNumeric2 _ _ _ k -> runNumericC (k Abstract))
instance Ord address => ValueRoots address Abstract where
valueRoots = mempty