diff --git a/src/Analysis/Abstract/Graph.hs b/src/Analysis/Abstract/Graph.hs index 8f840d3d5..8e302838c 100644 --- a/src/Analysis/Abstract/Graph.hs +++ b/src/Analysis/Abstract/Graph.hs @@ -16,7 +16,7 @@ module Analysis.Abstract.Graph ) where import Algebra.Graph.Export.Dot hiding (vertexName) -import Control.Abstract +import Control.Abstract hiding (Function(..)) import Data.Abstract.Address import Data.Abstract.Declarations import Data.Abstract.Module (Module (moduleInfo), ModuleInfo (..)) diff --git a/src/Control/Abstract/Value.hs b/src/Control/Abstract/Value.hs index b2fccc404..e357cdc08 100644 --- a/src/Control/Abstract/Value.hs +++ b/src/Control/Abstract/Value.hs @@ -4,6 +4,7 @@ module Control.Abstract.Value , AbstractIntro(..) , AbstractFunction(..) , Comparator(..) +, Function(..) , asBool , while , doWhile @@ -47,6 +48,11 @@ class Show value => AbstractFunction address value effects where call :: value -> [Evaluator address value effects address] -> Evaluator address value effects address +data Function address value m result where + Function :: [Name] -> Set Name -> m address -> Function address value m value + Call :: value -> [address] -> Function address value m address + + class Show value => AbstractIntro value where -- | Construct an abstract unit value. -- TODO: This might be the same as the empty tuple for some value types diff --git a/src/Data/Abstract/Evaluatable.hs b/src/Data/Abstract/Evaluatable.hs index 781bee5dc..209aa37d3 100644 --- a/src/Data/Abstract/Evaluatable.hs +++ b/src/Data/Abstract/Evaluatable.hs @@ -25,7 +25,7 @@ import Control.Abstract.Environment as X hiding (runEnvironmentError, runEnviron import Control.Abstract.Evaluator as X hiding (LoopControl(..), Return(..), catchLoopControl, runLoopControl, catchReturn, runReturn) import Control.Abstract.Heap as X hiding (AddressError(..), runAddressError, runAddressErrorWith) import Control.Abstract.Modules as X (Modules, ResolutionError(..), load, lookupModule, listModulesInDir, require, resolve) -import Control.Abstract.Value as X +import Control.Abstract.Value as X hiding (Function(..)) import Data.Abstract.Declarations as X import Data.Abstract.Environment as X import Data.Abstract.FreeVariables as X