diff --git a/src/Data/Abstract/Located.hs b/src/Data/Abstract/Located.hs index ff5d49b03..f5d45be44 100644 --- a/src/Data/Abstract/Located.hs +++ b/src/Data/Abstract/Located.hs @@ -1,15 +1,10 @@ {-# LANGUAGE TypeFamilies #-} module Data.Abstract.Located where -import Control.Abstract.Evaluator -import Control.Abstract.Value import Data.Abstract.Address -import Data.Bifunctor import Data.Range import Data.Record import Data.Span -import Prelude hiding (null) -import Prologue hiding (hash, null) -- TODO: Dependencies type Provenance = Record '[Range, Span] @@ -20,23 +15,3 @@ data Located location = Located { provenance :: !Provenance, location :: locatio instance Location location => Location (Located location) where type Cell (Located location) = Cell location - - -newtype LocatedValue value = LocatedValue { unLocatedValue :: value } - deriving (Eq, Ord, Show) - -instance MonadValue (Located location) value m => MonadValue (Located location) (LocatedValue value) m where - unit = LocatedValue <$> unit - null = LocatedValue <$> null - integer = fmap LocatedValue . integer - float = fmap LocatedValue . float - rational = fmap LocatedValue . rational - boolean = fmap LocatedValue . boolean - multiple = fmap LocatedValue . multiple . map unLocatedValue - string = fmap LocatedValue . string - symbol = fmap LocatedValue . symbol - array = fmap LocatedValue . array . map unLocatedValue - hash = fmap LocatedValue . hash . map (bimap unLocatedValue unLocatedValue) - ifthenelse = ifthenelse . unLocatedValue - kvPair = fmap (fmap LocatedValue) . (kvPair `on` unLocatedValue) - -- klass name vals env = LocatedValue <$> klass name (map unLocatedValue vals) (fmap unLocatedValue env)