Examples of TYPE_List


Examples of org.openquark.cal_Cal_Core_Prelude.TYPE_List

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

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

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

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

        TYPE_List $case2;

        switch (($case2 = (((TYPE_List)(java.lang.Object)list1.getValue()))).getOrdinalValue()) {

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

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

            switch (comparator.f2L(list1Head, list2Head, $ec).evaluate($ec).getOrdinalValue()) {

              case 2: {
                // Cal.Core.Prelude.GT
View Full Code Here

Examples of org.openquark.cal_Cal_Core_Prelude.TYPE_List

   * f2S
   * This method implements the function logic of the CAL function Cal.Collections.List.span
   */
  public final RTValue f2S(RTValue predicate, 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[] {Span.i_Nil, Span.i_Nil});
      }

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

        if (predicate.f1L(listHead, $ec).evaluate($ec).getBooleanValue()) {
          RTValue letVar_spanListTail =
            Span.spanListTail$5$def_Lazy(predicate, listTail, $ec);

View Full Code Here

Examples of org.openquark.cal_Cal_Core_Prelude.TYPE_List

    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 Find_Index__find_Index_Helper__3.i_Nothing;
        }

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

          if (predicate.f1L(listHead, $ec).evaluate(
            $ec).getBooleanValue()) {
            return
              new TYPE_Maybe.CAL_Just(
View Full Code Here

Examples of org.openquark.cal_Cal_Core_Prelude.TYPE_List

   * f1S
   * This method implements the function logic of the CAL function Cal.Collections.List.tail
   */
  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(
              Tail.Cal_Collections_List_tail_86_9),
            "Empty list.",
            $ec);
      }

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

        return listTail;
      }

      default: {
View Full Code Here

Examples of org.openquark.cal_Cal_Core_Prelude.TYPE_List

    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
            RTError.$instance.f2S(
              RTData.CAL_Opaque.make(
                Subscript.Cal_Collections_List_subscript_309_11),
              "Index out of bounds.",
              $ec);
        }

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

          if (index == 0) {
            return listHead;
          } else {
            if (index > 0) {
View Full Code Here

Examples of org.openquark.cal_Cal_Core_Prelude.TYPE_List

    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 Find.i_Nothing;
        }

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

          if (predicate.f1L(listHead, $ec).evaluate(
            $ec).getBooleanValue()) {
            return new TYPE_Maybe.CAL_Just(listHead);
          } else {
View Full Code Here

Examples of org.openquark.cal_Cal_Core_Prelude.TYPE_List

   * f2S
   * This method implements the function logic of the CAL function Cal.Collections.List.groupBy
   */
  public final RTValue f2S(RTValue equalityFunction, 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 Group_By.i_Nil;
      }

      case 1: {
        // Cal.Core.Prelude.Cons
        // Decompose data type to access members.
        RTValue listHead = $case1.get_head();
        RTValue listTail = $case1.get_tail();
        RTValue letVar_pr =
          Group_By.pr$5$def_Lazy(
            equalityFunction,
            listHead,
            listTail,
View Full Code Here

Examples of org.openquark.cal_Cal_Core_Prelude.TYPE_List

   * f3S
   * This method implements the function logic of the CAL function Cal.Collections.List.mapIndexed$mapIndexedHelper$3
   */
  public final RTValue f3S(RTValue mapFunction, int index, 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 Map_Indexed__map_Indexed_Helper__3.i_Nil;
      }

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

        return
          new TYPE_List.CAL_Cons(
            mapFunction.apply(
              listHead,
View Full Code Here

Examples of org.openquark.cal_Cal_Core_Prelude.TYPE_List

    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 RTData.CAL_Boolean.make(true);
        }

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

          if (predicate.f1L(listHead, $ec).evaluate(
            $ec).getBooleanValue()) {
            list = listTail.evaluate($ec);
            continue TRLoop;
View Full Code Here

Examples of org.openquark.cal_Cal_Core_Prelude.TYPE_List

    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 true;
        }

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

          if (predicate.f1L(listHead, $ec).evaluate(
            $ec).getBooleanValue()) {
            list = listTail.evaluate($ec);
            continue TRLoop;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.