From f85cf50f7a6e4eda85c8943beca85245d9390425 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 29 Mar 2018 09:28:32 -0400 Subject: [PATCH] Define an AbstractValue instance for LocatedValue. --- src/Data/Abstract/Located.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Data/Abstract/Located.hs b/src/Data/Abstract/Located.hs index ae10f85bb..b2b250ef0 100644 --- a/src/Data/Abstract/Located.hs +++ b/src/Data/Abstract/Located.hs @@ -1,5 +1,7 @@ +{-# LANGUAGE TypeFamilies #-} module Data.Abstract.Located where +import Control.Abstract.Evaluator import Data.AST import Data.Record @@ -9,3 +11,6 @@ type Provenance = Record Location data Located location = Located { provenance :: !Provenance, location :: location } newtype LocatedValue value = LocatedValue { getLocatedValue :: value } + +instance AbstractValue (LocatedValue value) where + type LocationFor (LocatedValue value) = Located (LocationFor value)