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

Provide empty cells with a Lower constraint.

This commit is contained in:
Rob Rix 2018-05-04 19:40:53 -04:00
parent 1e173c4f2c
commit d31dce7490

View File

@ -7,9 +7,10 @@ import Control.Abstract.Addressable
import Control.Abstract.Evaluator
import Control.Abstract.Value
import Data.Abstract.Address
import Data.Semilattice.Lower
import Prologue
resumingBadAddresses :: (AbstractHole value, Monoid (Cell location value), Show location) => Evaluator location term value (Resumable (AddressError location value) ': effects) a -> Evaluator location term value effects a
resumingBadAddresses :: (AbstractHole value, Lower (Cell location value), Show location) => Evaluator location term value (Resumable (AddressError location value) ': effects) a -> Evaluator location term value effects a
resumingBadAddresses = raiseHandler (relay pure (\ (Resumable err) yield -> traceM ("AddressError:" <> show err) *> case err of
UnallocatedAddress _ -> yield mempty
UnallocatedAddress _ -> yield lowerBound
UninitializedAddress _ -> yield hole))