From 9c0ca729c93b20f9da19e31e078614b1a33d6789 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 11 Dec 2018 16:01:37 -0500 Subject: [PATCH] Define a carrier for String. Co-Authored-By: Ayman Nadeem --- src/Control/Abstract/Value.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Control/Abstract/Value.hs b/src/Control/Abstract/Value.hs index c381b7ad7..76f70f1aa 100644 --- a/src/Control/Abstract/Value.hs +++ b/src/Control/Abstract/Value.hs @@ -29,6 +29,7 @@ module Control.Abstract.Value , runUnit , UnitC(..) , String(..) +, StringC(..) ) where import Control.Abstract.Evaluator @@ -227,6 +228,8 @@ instance Effect (String value) where handle state handler (String text k) = String text (handler . (<$ state) . k) handle state handler (AsString v k) = AsString v (handler . (<$ state) . k) +newtype StringC value m a = StringC { runStringC :: m a } + class Show value => AbstractIntro value where -- | Construct an abstract string value.