1
1
mirror of https://github.com/github/semantic.git synced 2024-12-14 08:25:32 +03:00

Define a carrier for String.

Co-Authored-By: Ayman Nadeem <aymannadeem@gmail.com>
This commit is contained in:
Rob Rix 2018-12-11 16:01:37 -05:00
parent 52781c6cd6
commit 9c0ca729c9

View File

@ -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.