early throw on cyclic graphs

This commit is contained in:
Mike J Innes 2017-05-22 17:32:10 +01:00
parent 45c5502f90
commit 3532c7174f

View File

@ -15,6 +15,7 @@ end
function interp(ctx, f, xs...) function interp(ctx, f, xs...)
g = graph(f) g = graph(f)
g nothing && iscyclic(g) && error("Can't interpret cyclic graph")
@icatch(ctx, g nothing ? @icatch(ctx, g nothing ?
interpret(ctx, reifyparams(g), xs...) : interpret(ctx, reifyparams(g), xs...) :
f(xs...)) f(xs...))