* f7S
* This method implements the function logic of the CAL function Cal.Utilities.DirectedGraph.foldDFSInternal
*/
public final RTValue f7S(RTValue $dictvarCal_Core_Prelude_Eq_1, RTValue maybeStartVertex, RTValue startVertexFn, RTValue revisitVertexFn, RTValue finishVertexFn, RTValue init, RTValue graph, RTExecutionContext $ec) throws CALExecutorException {
// Top level supercombinator logic
TYPE_Maybe $case1;
switch (($case1 = (((TYPE_Maybe)(java.lang.Object)maybeStartVertex.evaluate($ec)))).getOrdinalValue()) {
case 0: {
// Cal.Core.Prelude.Nothing
return
new Fold_D_F_S_Internal__dfs_All__9.RTAppS(
Fold_D_F_S_Internal__dfs_All__9.$instance,
Fold_D_F_S_Internal.dfsHelper$7$def_Lazy(
graph,
startVertexFn,
revisitVertexFn,
finishVertexFn,
$ec),
Fold_D_F_S_Internal.i_Tip,
init.evaluate($ec),
Keys.$instance.f1S(
(((RTCons)(java.lang.Object)
graph.evaluate($ec))).getFieldByIndex(
0,
1,
Fold_D_F_S_Internal.Cal_Utilities_DirectedGraph_foldDFSInternal_980_61).evaluate(
$ec),
$ec).evaluate(
$ec));
}
case 1: {
// Cal.Core.Prelude.Just
// Decompose data type to access members.
RTValue startVertex = $case1.get_value();
TYPE_Maybe $case2;
switch (($case2 = (((TYPE_Maybe)(java.lang.Object)Get_Maybe_Vertex_Number.$instance.f3S($dictvarCal_Core_Prelude_Eq_1, graph, startVertex, $ec).evaluate($ec)))).getOrdinalValue()) {
case 0: {
// Cal.Core.Prelude.Nothing
return
Trace.$instance.f1S(
Fold_D_F_S_Internal.message$23$def_Unboxed(
startVertex,
graph,
$ec),
$ec).evaluate(
$ec).apply(
new RTError.RTAppS(
RTError.$instance,
RTData.CAL_Opaque.make(
Fold_D_F_S_Internal.Cal_Utilities_DirectedGraph_foldDFSInternal_992_43),
"Invalid start node."));
}
case 1: {
// Cal.Core.Prelude.Just
// Decompose data type to access members.
RTValue startVertexNum = $case2.get_value();
return
Fold_D_F_S_Internal__dfs_Reachable__8.$instance.f3S(
Fold_D_F_S_Internal.dfsHelper$7$def_Lazy(
graph,