mirror of
https://github.com/github/semantic.git
synced 2025-01-01 19:55:34 +03:00
remove regex
This commit is contained in:
parent
062ad8b083
commit
1676dbd999
@ -251,11 +251,6 @@ runString :: Carrier (String value :+: sig) (StringC value (Eff m))
|
|||||||
runString = raiseHandler $ runStringC . interpret
|
runString = raiseHandler $ runStringC . interpret
|
||||||
|
|
||||||
class Show value => AbstractIntro value where
|
class Show value => AbstractIntro value where
|
||||||
-- | Construct a self-evaluating symbol value.
|
|
||||||
-- TODO: Should these be interned in some table to provide stronger uniqueness guarantees?
|
|
||||||
-- | Construct an abstract regex value.
|
|
||||||
regex :: Text -> value
|
|
||||||
|
|
||||||
-- | Construct an abstract integral value.
|
-- | Construct an abstract integral value.
|
||||||
integer :: Integer -> value
|
integer :: Integer -> value
|
||||||
|
|
||||||
|
@ -100,7 +100,6 @@ instance AbstractHole Abstract where
|
|||||||
instance AbstractIntro Abstract where
|
instance AbstractIntro Abstract where
|
||||||
integer _ = Abstract
|
integer _ = Abstract
|
||||||
float _ = Abstract
|
float _ = Abstract
|
||||||
regex _ = Abstract
|
|
||||||
rational _ = Abstract
|
rational _ = Abstract
|
||||||
hash _ = Abstract
|
hash _ = Abstract
|
||||||
kvPair _ _ = Abstract
|
kvPair _ _ = Abstract
|
||||||
|
@ -184,7 +184,6 @@ instance (Show address, Show term) => AbstractIntro (Value term address) where
|
|||||||
integer = Integer . Number.Integer
|
integer = Integer . Number.Integer
|
||||||
float = Float . Number.Decimal
|
float = Float . Number.Decimal
|
||||||
rational = Rational . Number.Ratio
|
rational = Rational . Number.Ratio
|
||||||
regex = Regex
|
|
||||||
|
|
||||||
kvPair = KVPair
|
kvPair = KVPair
|
||||||
hash = Hash . map (uncurry KVPair)
|
hash = Hash . map (uncurry KVPair)
|
||||||
|
@ -346,7 +346,6 @@ instance AbstractHole Type where
|
|||||||
instance AbstractIntro Type where
|
instance AbstractIntro Type where
|
||||||
integer _ = Int
|
integer _ = Int
|
||||||
float _ = Float
|
float _ = Float
|
||||||
regex _ = Regex
|
|
||||||
rational _ = Rational
|
rational _ = Rational
|
||||||
hash = Hash
|
hash = Hash
|
||||||
kvPair k v = k :* v
|
kvPair k v = k :* v
|
||||||
|
@ -231,7 +231,7 @@ instance Show1 Regex where liftShowsPrec = genericLiftShowsPrec
|
|||||||
|
|
||||||
-- TODO: Implement Eval instance for Regex
|
-- TODO: Implement Eval instance for Regex
|
||||||
instance Evaluatable Regex where
|
instance Evaluatable Regex where
|
||||||
eval _ _ (Regex x) = pure (regex x)
|
eval _ _ (Regex x) = string x
|
||||||
|
|
||||||
instance Tokenize Regex where
|
instance Tokenize Regex where
|
||||||
tokenize = yield . Run . regexContent
|
tokenize = yield . Run . regexContent
|
||||||
|
Loading…
Reference in New Issue
Block a user