mirror of
https://github.com/github/semantic.git
synced 2024-12-20 21:31:48 +03:00
create string carrier instance for type-checking domain
This commit is contained in:
parent
191723db94
commit
ca687a66a7
@ -326,6 +326,19 @@ instance Carrier sig m
|
||||
(eff . handleCoercible)
|
||||
(\ (Abstract.Unit k) -> runUnitC (k Unit))
|
||||
|
||||
instance ( Member (Reader ModuleInfo) sig
|
||||
, Member (Reader Span) sig
|
||||
, Member (Resumable (BaseError TypeError)) sig
|
||||
, Member (State TypeMap) sig
|
||||
, Carrier sig m
|
||||
, Alternative m
|
||||
, Monad m
|
||||
)
|
||||
=> Carrier (Abstract.String Type :+: sig) (StringC Type m) where
|
||||
ret = StringC . ret
|
||||
eff = StringC . handleSum (eff . handleCoercible) (\case
|
||||
Abstract.String _ k -> runStringC (k String)
|
||||
Abstract.AsString t k -> unify t String *> runStringC (k ""))
|
||||
|
||||
instance AbstractHole Type where
|
||||
hole = Hole
|
||||
|
Loading…
Reference in New Issue
Block a user