1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Generalize substitute.

This commit is contained in:
Rob Rix 2018-10-22 12:27:06 -04:00
parent 0960f0cd9e
commit 3c267f2757

View File

@ -192,10 +192,11 @@ substitute :: ( Member (Reader ModuleInfo) sig
, Member (Resumable (BaseError TypeError)) sig
, Member (State TypeMap) sig
, Carrier sig m
, Monad m
)
=> TName
-> Type
-> Evaluator term address Type m Type
-> m Type
substitute id ty = do
infiniteType <- occur id ty
ty <- if infiniteType