mirror of
https://github.com/github/semantic.git
synced 2024-12-14 17:31:48 +03:00
Define a carrier for String.
Co-Authored-By: Ayman Nadeem <aymannadeem@gmail.com>
This commit is contained in:
parent
52781c6cd6
commit
9c0ca729c9
@ -29,6 +29,7 @@ module Control.Abstract.Value
|
|||||||
, runUnit
|
, runUnit
|
||||||
, UnitC(..)
|
, UnitC(..)
|
||||||
, String(..)
|
, String(..)
|
||||||
|
, StringC(..)
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Abstract.Evaluator
|
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 (String text k) = String text (handler . (<$ state) . k)
|
||||||
handle state handler (AsString v k) = AsString v (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
|
class Show value => AbstractIntro value where
|
||||||
-- | Construct an abstract string value.
|
-- | Construct an abstract string value.
|
||||||
|
Loading…
Reference in New Issue
Block a user