Package org.openquark.cal_Cal_Core_Prelude

Examples of org.openquark.cal_Cal_Core_Prelude.TYPE_List$CAL_Cons


    TRLoop: while (true) {
      if ($ec.isQuitRequested()) {
        throw RTValue.INTERRUPT_EXCEPTION;
      }
      // Top level supercombinator logic
      TYPE_List $case1;

      switch (($case1 = (((TYPE_List)(java.lang.Object)vertexNums.getValue()))).getOrdinalValue()) {

        case 0: {
          // Cal.Core.Prelude.Nil
          return accum.getValue();
        }

        case 1: {
          // Cal.Core.Prelude.Cons
          // Decompose data type to access members.
          RTValue n = $case1.get_head();
          RTValue ns = $case1.get_tail();
          RTValue letVar_pattern_newVisited_newAccum =
            Fold_D_F_S_Internal__dfs_All__9.$pattern_newVisited_newAccum$18$def_Lazy(
              dfsHelper,
              n,
              visited.getValue(),
View Full Code Here


    TRLoop: while (true) {
      if ($ec.isQuitRequested()) {
        throw RTValue.INTERRUPT_EXCEPTION;
      }
      // Top level supercombinator logic
      TYPE_List $case1;

      switch (($case1 = (((TYPE_List)(java.lang.Object)vertexNums.getValue()))).getOrdinalValue()) {

        case 0: {
          // Cal.Core.Prelude.Nil
          return components.getValue();
        }

        case 1: {
          // Cal.Core.Prelude.Cons
          // Decompose data type to access members.
          RTValue n = $case1.get_head();
          RTValue ns = $case1.get_tail();
          RTValue letVar_pattern_newVisited_component =
            Strongly_Connected_Components_Internal__find_Reverse_Sorted_S_C_Cs__4.$pattern_newVisited_component$12$def_Lazy(
              dfsHelper,
              n,
              visited.getValue(),
View Full Code Here

    TRLoop: while (true) {
      if ($ec.isQuitRequested()) {
        throw RTValue.INTERRUPT_EXCEPTION;
      }
      // Top level supercombinator logic
      TYPE_List $case1;

      switch (($case1 = (((TYPE_List)(java.lang.Object)stack.getValue()))).getOrdinalValue()) {

        case 0: {
          // Cal.Core.Prelude.Nil
          return
            RTRecordValue.makeTupleRecord(
              new RTValue[] {visited.getValue(), accum.getValue()});
        }

        case 1: {
          // Cal.Core.Prelude.Cons
          // Decompose data type to access members.
          RTValue stackTop = $case1.get_head();
          RTValue stackBottom = $case1.get_tail();


          RTRecordValue $recordCase2 =
            ((RTRecordValue)(java.lang.Object)
              stackTop.evaluate($ec));
View Full Code Here

   * f1S
   * This method implements the function logic of the CAL function Cal.Collections.List.head
   */
  public final RTValue f1S(RTValue list, RTExecutionContext $ec) throws CALExecutorException {
    // Top level supercombinator logic
    TYPE_List $case1;

    switch (($case1 = (((TYPE_List)(java.lang.Object)list.getValue()))).getOrdinalValue()) {

      case 0: {
        // Cal.Core.Prelude.Nil
        return
          RTError.$instance.f2S(
            RTData.CAL_Opaque.make(
              Head.Cal_Collections_List_head_71_9),
            "Empty list.",
            $ec);
      }

      case 1: {
        // Cal.Core.Prelude.Cons
        // Decompose data type to access members.
        RTValue listHead = $case1.get_head();

        return listHead;
      }

      default: {
View Full Code Here

    TRLoop: while (true) {
      if ($ec.isQuitRequested()) {
        throw RTValue.INTERRUPT_EXCEPTION;
      }
      // Top level supercombinator logic
      TYPE_List $case1;

      switch (($case1 = (((TYPE_List)(java.lang.Object)sourceList.getValue()))).getOrdinalValue()) {

        case 0: {
          // Cal.Core.Prelude.Nil
          return resultList;
        }

        case 1: {
          // Cal.Core.Prelude.Cons
          // Decompose data type to access members.
          RTValue headSourceList = $case1.get_head();
          RTValue tailSourceList = $case1.get_tail();

          sourceList = tailSourceList.evaluate($ec);
            resultList =
            (new TYPE_List.CAL_Cons(headSourceList, resultList));
          continue TRLoop;
View Full Code Here

   * f2S
   * This method implements the function logic of the CAL function Cal.Collections.List.sortBy$mergePairs$4
   */
  public final RTValue f2S(RTValue cmp, RTValue xss, RTExecutionContext $ec) throws CALExecutorException {
    // Top level supercombinator logic
    TYPE_List $case1;

    switch (($case1 = (((TYPE_List)(java.lang.Object)xss.getValue()))).getOrdinalValue()) {

      case 0: {
        // Cal.Core.Prelude.Nil
        return Sort_By__merge_Pairs__4.i_Nil;
      }

      case 1: {
        // Cal.Core.Prelude.Cons
        // Decompose data type to access members.
        RTValue xs1 = $case1.get_head();
        RTValue xssTail = $case1.get_tail();

        TYPE_List $case2;

        switch (($case2 = (((TYPE_List)(java.lang.Object)xssTail.evaluate($ec)))).getOrdinalValue()) {

          case 0: {
            // Cal.Core.Prelude.Nil
            return xss.getValue();
          }

          case 1: {
            // Cal.Core.Prelude.Cons
            // Decompose data type to access members.
            RTValue xs2 = $case2.get_head();
            RTValue xssTailTail = $case2.get_tail();

            return
              new TYPE_List.CAL_Cons(
                new RTFullApp.General._3._L(
                  Merge_By.$instance,
View Full Code Here

    TRLoop: while (true) {
      if ($ec.isQuitRequested()) {
        throw RTValue.INTERRUPT_EXCEPTION;
      }
      // Top level supercombinator logic
      TYPE_List $case1;

      switch (($case1 = (((TYPE_List)(java.lang.Object)xss.getValue()))).getOrdinalValue()) {

        case 0: {
          // Cal.Core.Prelude.Nil
          return Sort_By__sort_Helper__3.i_Nil;
        }

        case 1: {
          // Cal.Core.Prelude.Cons
          // Decompose data type to access members.
          RTValue xs1 = $case1.get_head();
          RTValue xssTail = $case1.get_tail();

          switch (xssTail.evaluate($ec).getOrdinalValue()) {

            case 0: {
              // Cal.Core.Prelude.Nil
View Full Code Here

    TRLoop: while (true) {
      if ($ec.isQuitRequested()) {
        throw RTValue.INTERRUPT_EXCEPTION;
      }
      // Top level supercombinator logic
      TYPE_List $case1;

      switch (($case1 = (((TYPE_List)(java.lang.Object)list.getValue()))).getOrdinalValue()) {

        case 0: {
          // Cal.Core.Prelude.Nil
          return Map_Just.i_Nil;
        }

        case 1: {
          // Cal.Core.Prelude.Cons
          // Decompose data type to access members.
          RTValue listHead = $case1.get_head();
          RTValue listTail = $case1.get_tail();

          TYPE_Maybe $case2;

          switch (($case2 = (((TYPE_Maybe)(java.lang.Object)mapFunction.f1L(listHead, $ec).evaluate($ec)))).getOrdinalValue()) {
View Full Code Here

      case 0: {
        return Direct_Build.i_Tip;
      }

      case 5: {
        TYPE_List $case2;

        switch (($case2 = (((TYPE_List)(java.lang.Object)list.evaluate($ec)))).getOrdinalValue()) {

          case 0: {
            // Cal.Core.Prelude.Nil
            return
              unhandledSwitchIndex(
                Direct_Build.Cal_Collections_Set_directBuild_1346_9,
                "Cal.Core.Prelude.Nil");
          }

          case 1: {
            // Cal.Core.Prelude.Cons
            // Decompose data type to access members.
            RTValue y1 = $case2.get_head();
            RTValue list2 = $case2.get_tail();

            TYPE_List $case3;

            switch (($case3 = (((TYPE_List)(java.lang.Object)list2.evaluate($ec)))).getOrdinalValue()) {

              case 0: {
                // Cal.Core.Prelude.Nil
                return
                  unhandledSwitchIndex(
                    Direct_Build.Cal_Collections_Set_directBuild_1348_9,
                    "Cal.Core.Prelude.Nil");
              }

              case 1: {
                // Cal.Core.Prelude.Cons
                // Decompose data type to access members.
                RTValue y2 = $case3.get_head();
                RTValue list3 = $case3.get_tail();

                TYPE_List $case4;

                switch (($case4 = (((TYPE_List)(java.lang.Object)list3.evaluate($ec)))).getOrdinalValue()) {

                  case 0: {
                    // Cal.Core.Prelude.Nil
                    return
                      unhandledSwitchIndex(
                        Direct_Build.Cal_Collections_Set_directBuild_1350_9,
                        "Cal.Core.Prelude.Nil");
                  }

                  case 1: {
                    // Cal.Core.Prelude.Cons
                    // Decompose data type to access members.
                    RTValue y3 = $case4.get_head();
                    RTValue list4 =
                      $case4.get_tail();

                    TYPE_List $case5;

                    switch (($case5 = (((TYPE_List)(java.lang.Object)list4.evaluate($ec)))).getOrdinalValue()) {

                      case 0: {
                        // Cal.Core.Prelude.Nil
                        return
                          unhandledSwitchIndex(
                            Direct_Build.Cal_Collections_Set_directBuild_1352_9,
                            "Cal.Core.Prelude.Nil");
                      }

                      case 1: {
                        // Cal.Core.Prelude.Cons
                        // Decompose data type to access members.
                        RTValue y4 =
                          $case5.get_head();
                        RTValue list5 =
                          $case5.get_tail();

                        TYPE_List $case6;

                        switch (($case6 = (((TYPE_List)(java.lang.Object)list5.evaluate($ec)))).getOrdinalValue()) {

                          case 0: {
                            // Cal.Core.Prelude.Nil
                            return
                              unhandledSwitchIndex(
                                Direct_Build.Cal_Collections_Set_directBuild_1354_9,
                                "Cal.Core.Prelude.Nil");
                          }

                          case 1: {
                            // Cal.Core.Prelude.Cons
                            // Decompose data type to access members.
                            RTValue y5 =
                              $case6.get_head();

                            return
                              new TYPE_Set.CAL_Bin(
                                5,
                                y4,
                                new TYPE_Set.CAL_Bin(
                                  3,
                                  y2,
                                  Single.$instance.f1S(
                                    y1,
                                    $ec).evaluate(
                                    $ec),
                                  Single.$instance.f1S(
                                    y3,
                                    $ec).evaluate(
                                    $ec)),
                                Single.$instance.f1S(
                                  y5,
                                  $ec).evaluate(
                                  $ec));
                          }

                          default: {
                            return
                              badSwitchIndex(
                                Direct_Build.Cal_Collections_Set_directBuild_1354_9);
                          }
                        }
                      }

                      default: {
                        return
                          badSwitchIndex(
                            Direct_Build.Cal_Collections_Set_directBuild_1352_9);
                      }
                    }
                  }

                  default: {
                    return
                      badSwitchIndex(
                        Direct_Build.Cal_Collections_Set_directBuild_1350_9);
                  }
                }
              }

              default: {
                return
                  badSwitchIndex(
                    Direct_Build.Cal_Collections_Set_directBuild_1348_9);
              }
            }
          }

          default: {
            return
              badSwitchIndex(
                Direct_Build.Cal_Collections_Set_directBuild_1346_9);
          }
        }
      }

      default: {
        int letVar_nLeft$U =
          Direct_Build.nLeft$12$def_Unboxed(n, $ec);

        TYPE_List $case7;

        switch (($case7 = (((TYPE_List)(java.lang.Object)Drop.$instance.f2S(letVar_nLeft$U, list.evaluate($ec), $ec).evaluate($ec)))).getOrdinalValue()) {

          case 0: {
            // Cal.Core.Prelude.Nil
            return
              unhandledSwitchIndex(
                Direct_Build.Cal_Collections_Set_directBuild_1365_13,
                "Cal.Core.Prelude.Nil");
          }

          case 1: {
            // Cal.Core.Prelude.Cons
            // Decompose data type to access members.
            RTValue root = $case7.get_head();
            RTValue rightList = $case7.get_tail();
            RTValue letVar_nRight =
              Direct_Build.nRight$13$def_Lazy(
                n,
                RTData.CAL_Int.make(letVar_nLeft$U),
                $ec);
View Full Code Here

   * f1S
   * This method implements the function logic of the CAL function Cal.Collections.List.unzip
   */
  public final RTValue f1S(RTValue list, RTExecutionContext $ec) throws CALExecutorException {
    // Top level supercombinator logic
    TYPE_List $case1;

    switch (($case1 = (((TYPE_List)(java.lang.Object)list.getValue()))).getOrdinalValue()) {

      case 0: {
        // Cal.Core.Prelude.Nil
        return
          RTRecordValue.makeTupleRecord(
            new RTValue[] {Unzip.i_Nil, Unzip.i_Nil});
      }

      case 1: {
        // Cal.Core.Prelude.Cons
        // Decompose data type to access members.
        RTValue x = $case1.get_head();
        RTValue xs = $case1.get_tail();
        RTValue letVar_pattern_tail1_tail2 =
          Unzip.$pattern_tail1_tail2$6$def_Lazy(xs, $ec);


        RTRecordValue $recordCase2 =
View Full Code Here

TOP

Related Classes of org.openquark.cal_Cal_Core_Prelude.TYPE_List$CAL_Cons

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.