// ===========================================================================
// This file has been generated by
// Typical, version 1.14.3,
// (C) 2004-2009 Robert Grimm and New York University,
// on Sunday, September 27, 2009 at 10:36:55 PM.
// Edit at your own risk.
// ===========================================================================

package xtc.typical;

import java.math.BigInteger;

import java.util.List;
import java.util.ArrayList;

import xtc.util.Pair;
import xtc.util.Runtime;
import xtc.util.Function;

import xtc.tree.Node;
import xtc.tree.GNode;

/** Type checker for Typical. */
public class TypicalAnalyzer extends Analyzer {
  protected String nodeType = null;

  public TypicalAnalyzer(Runtime runt, String nodeType) {
    super(runt);
    analyzer = analyze;
    this.nodeType = nodeType;
  }

  public void getScopeNodes() {
    processScopeNodes.add("ValueDefinition");
    processScopeNodes.add("LetExpression");
    processScopeNodes.add("FunExpression");
    processScopeNodes.add("PatternMatch");
  }

  final Function.F1<Tuple.T3<Name, String, String>, Node> getNameSpace = new Function.F1<Tuple.T3<Name, String, String>, Node>() {
    public Tuple.T3<Name, String, String> apply(final Node n) {
      return new Match<Tuple.T3<Name, String, String>>() {
        public Tuple.T3<Name, String, String> apply() {
          final Node arg$1 = GNode.cast(n);

          if ((null == arg$1)) {
            return null;
          }
          if (TypicalSupport.match$2(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$5 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "constructor", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$5);
          }
          if (TypicalSupport.match$6(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$9 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "constructor", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$9);
          }
          if (TypicalSupport.match$10(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$13 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "constructor", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$13);
          }
          if (TypicalSupport.match$14(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$17 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "constructor", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$17);
          }
          if (TypicalSupport.match$18(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$21 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "poly", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$21);
          }
          if (TypicalSupport.match$22(arg$1)) {
            final String s = (arg$1.size() > 1 ? arg$1.getString(1) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$25 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "type", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$25);
          }
          if (TypicalSupport.match$26(arg$1)) {
            final String s = (arg$1.size() > 1 ? arg$1.getString(1) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$29 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "type", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$29);
          }
          if (TypicalSupport.match$30(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$33 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "type", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$33);
          }
          if (TypicalSupport.match$34(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$37 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "field", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$37);
          }
          if (TypicalSupport.match$38(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$41 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "field", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$41);
          }
          if (TypicalSupport.match$42(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$45 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "field", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$45);
          }
          if (TypicalSupport.match$46(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$49 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "field", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$49);
          }
          if (TypicalSupport.match$50(arg$1)) {
            final String s = (arg$1.size() > 1 ? arg$1.getString(1) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$53 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "field", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$53);
          }
          if (TypicalSupport.match$54(arg$1)) {
            final String s = (arg$1.getGeneric(0).size() > 0 ? arg$1.getGeneric(0).getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            List<Node> listName$56 = new ArrayList<Node>();
            Node nodeName$55 = arg$1;

            nodeName$55 = nodeName$55.getGeneric(0);
            if ((null != nodeName$55 && processScopeNodes.contains(nodeName$55.getName()))) {
              processScope(nodeName$55, getScope);
            }
            checkEnterScope(nodeName$55);
            listName$56.add(0, nodeName$55);

            final Object retValue$57 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "field", "type"));

            for (Node no : listName$56) {
              checkExitScope(no);
            }
            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$57);
          }
          if (TypicalSupport.match$58(arg$1)) {
            final String s = (arg$1.size() > 1 ? arg$1.getString(1) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$61 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "value", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$61);
          }
          if (TypicalSupport.match$62(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$65 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "value", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$65);
          }
          if (TypicalSupport.match$66(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$69 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "value", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$69);
          }
          if (TypicalSupport.match$70(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$73 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "value", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$73);
          }
          if (TypicalSupport.match$74(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$77 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "value", "type"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$77);
          }
          if (TypicalSupport.match$78(arg$1)) {
            final String s = (arg$1.size() > 0 ? arg$1.getString(0) : null);

            matching_nodes.add(arg$1);
            if ((null != arg$1 && processScopeNodes.contains(arg$1.getName()))) {
              processScope(arg$1, getScope);
            }
            checkEnterScope(arg$1);

            final Object retValue$81 = Analyzer.cast(new Tuple.T3<Name, String, String>(new Name.SimpleName(s), "node", "node"));

            checkExitScope(arg$1);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$81);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Scope, Node> getScope = new Function.F1<Scope, Node>() {
    public Scope apply(final Node n) {
      if (TypicalSupport.match$74(n)) {
        final String s = (n.size() > 0 ? n.getString(0) : null);
        final Node a = (n.size() > 1 ? n.getGeneric(1) : null);
        final Node b = (n.size() > 2 ? n.getGeneric(2) : null);

        return Analyzer.cast(new Scope(new ScopeKind.Named(new Name.SimpleName(s)), new Pair<Node>(a).append(new Pair<Node>(b))));
      }
      if (TypicalSupport.match$84(n)) {
        final Node a = (n.size() > 1 ? n.getGeneric(1) : null);

        return Analyzer.cast(new Scope(new ScopeKind.Anonymous("let"), new Pair<Node>(a)));
      }
      if (TypicalSupport.match$85(n)) {
        final Node a = (n.size() > 0 ? n.getGeneric(0) : null);
        final Node b = (n.size() > 1 ? n.getGeneric(1) : null);

        return Analyzer.cast(new Scope(new ScopeKind.Anonymous("fun"), new Pair<Node>(a).append(new Pair<Node>(b))));
      }
      if (TypicalSupport.match$86(n)) {
        final Node a = Analyzer.cast(n);

        return Analyzer.cast(new Scope(new ScopeKind.Anonymous("patternmatching"), new Pair<Node>(a)));
      }
      return null;
    }
  };

  final TypicalTypes.raw_type<?> wildt = Analyzer.cast(new TypicalTypes.WildcardT());
  final TypicalTypes.raw_type<?> typet = Analyzer.cast(new TypicalTypes.TypeName("type"));
  final TypicalTypes.raw_type<?> strt = Analyzer.cast(new TypicalTypes.StringT());
  final TypicalTypes.raw_type<?> intt = Analyzer.cast(new TypicalTypes.IntT());
  final TypicalTypes.raw_type<?> boolt = Analyzer.cast(new TypicalTypes.BoolT());
  final TypicalTypes.raw_type<?> floatt = Analyzer.cast(new TypicalTypes.Float64T());
  final TypicalTypes.raw_type<?> nodet = Analyzer.cast(new TypicalTypes.NodeTypeT());

  final Function.F1<String, TypicalTypes.raw_type<?>> getTypeName = new Function.F1<String, TypicalTypes.raw_type<?>>() {
    public String apply(final TypicalTypes.raw_type<?> t) {
      return (null == Primitives.isBottom.apply(t) ? null : Primitives.isBottom.apply(t) ? "null type" : new Match<String>() {
        public String apply() {
          final TypicalTypes.raw_type<?> arg$88 = Analyzer.cast(t);

          if ((null == arg$88)) {
            return null;
          }
          if ((null != arg$88))
                        switch (arg$88.tag()) {
            case ConstructedT:
              if (TypicalSupport.match$111(arg$88)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$88.getTuple().get1());
                final String s = Analyzer.cast(arg$88.getTuple().get2());

                return Analyzer.cast(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(s, " of ("), getTypeName.apply(TypicalSupport.head$100.apply(tl))), getTypeListName.apply(TypicalSupport.tail$101.apply(tl), "")), ")"));
              }
              break;
            case Float64T:
              if (TypicalSupport.match$92(arg$88)) {
                return Analyzer.cast("64-bit float");
              }
              break;
            case FieldT:
              if (TypicalSupport.match$98(arg$88)) {
                final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$88.getTuple().get3());

                return Analyzer.cast(getTypeName.apply(ty));
              }
              break;
            case ConstructorT:
              if (TypicalSupport.match$96(arg$88)) {
                final String s = Analyzer.cast(arg$88.getTuple().get1());

                return Analyzer.cast(s);
              }
              break;
            case PairOfType:
              if (TypicalSupport.match$112(arg$88)) {
                final TypicalTypes.raw_type<?> t1 = Analyzer.cast(arg$88.getTuple().get1());
                final TypicalTypes.raw_type<?> t2 = Analyzer.cast(arg$88.getTuple().get2());

                return Analyzer.cast(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply("pair of types of ", getTypeName.apply(t1)), " -> "), getTypeName.apply(t2)));
              }
              break;
            case Float32T:
              if (TypicalSupport.match$91(arg$88)) {
                return Analyzer.cast("32-bit float");
              }
              break;
            case NodeTypeT:
              if (TypicalSupport.match$115(arg$88)) {
                return Analyzer.cast("node");
              }
              break;
            case PolyVariantT:
              if (TypicalSupport.match$114(arg$88)) {
                return Analyzer.cast("node");
              }
              break;
            case VariableT:
              if (TypicalSupport.match$113(arg$88)) {
                final String str = Analyzer.cast(arg$88.getTuple().get1());

                return Analyzer.cast(new Let<String>() {
                  final TypicalTypes.raw_type<?> ty;

                  {
                    ty = Analyzer.cast(Analyzer.cast(Primitives.get.apply(str, hashTable)));
                  }

                  public String apply() {
                    return Analyzer.cast(null == Primitives.isBottom.apply(ty) ? null : Primitives.isBottom.apply(ty) ? "variable type" : getTypeName.apply(ty));
                  }
                }.apply());
              }
              break;
            case TypeName:
              if (TypicalSupport.match$97(arg$88)) {
                final String s = Analyzer.cast(arg$88.getTuple().get1());

                return Analyzer.cast(s);
              }
              break;
            case RecordT:
              if (TypicalSupport.match$106(arg$88)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$88.getTuple().get1());

                return Analyzer.cast(new Let<String>() {
                  final TypicalTypes.raw_type<?> t;

                  {
                    t = Analyzer.cast(TypicalSupport.head$100.apply(tl));
                  }

                  public String apply() {
                    return Analyzer.cast(new Match<String>() {
                      public String apply() {
                        final TypicalTypes.raw_type<?> arg$107 = Analyzer.cast(t);

                        if ((null == arg$107)) {
                          return null;
                        }
                        if ((null != arg$107))
                                                    switch (arg$107.tag()) {
                          case FieldT:
                            if (TypicalSupport.match$98(arg$107)) {
                              final String s = Analyzer.cast(arg$107.getTuple().get1());

                              return Analyzer.cast(s);
                            }
                            break;
                          default:
                            break;
                          };
                        if (true) {
                          return Analyzer.cast(null);
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply());
              }
              break;
            case WildcardT:
              if (TypicalSupport.match$94(arg$88)) {
                return Analyzer.cast("wildcard");
              }
              break;
            case TupleT:
              if (TypicalSupport.match$110(arg$88)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$88.getTuple().get1());

                return Analyzer.cast(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply("tuple type (", getTypeName.apply(TypicalSupport.head$100.apply(tl))), getTypeListName.apply(TypicalSupport.tail$101.apply(tl), "")), ")"));
              }
              break;
            case StringT:
              if (TypicalSupport.match$93(arg$88)) {
                return Analyzer.cast("string");
              }
              break;
            case FunctionT:
              if (TypicalSupport.match$99(arg$88)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$88.getTuple().get1());
                final TypicalTypes.raw_type<?> t = Analyzer.cast(arg$88.getTuple().get2());

                return Analyzer.cast(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply("function type (", getTypeName.apply(TypicalSupport.head$100.apply(tl))), getTypeListName.apply(TypicalSupport.tail$101.apply(tl), "")), ") -> "), getTypeName.apply(t)));
              }
              break;
            case BoolT:
              if (TypicalSupport.match$89(arg$88)) {
                return Analyzer.cast("boolean");
              }
              break;
            case AnyT:
              if (TypicalSupport.match$95(arg$88)) {
                return Analyzer.cast("'any'");
              }
              break;
            case VariantT:
              if (TypicalSupport.match$102(arg$88)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$88.getTuple().get1());

                return Analyzer.cast(new Let<String>() {
                  final TypicalTypes.raw_type<?> t;

                  {
                    t = Analyzer.cast(TypicalSupport.head$100.apply(tl));
                  }

                  public String apply() {
                    return Analyzer.cast(new Match<String>() {
                      public String apply() {
                        final TypicalTypes.raw_type<?> arg$103 = Analyzer.cast(t);

                        if ((null == arg$103)) {
                          return null;
                        }
                        if ((null != arg$103))
                                                    switch (arg$103.tag()) {
                          case ConstructorT:
                            if (TypicalSupport.match$96(arg$103)) {
                              final String s = Analyzer.cast(arg$103.getTuple().get1());

                              return Analyzer.cast(s);
                            }
                            break;
                          default:
                            break;
                          };
                        if (true) {
                          return Analyzer.cast(null);
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply());
              }
              break;
            case IntT:
              if (TypicalSupport.match$90(arg$88)) {
                return Analyzer.cast("integer");
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(null);
          }
          return null;
        }
      }.apply());
    }
  };

  final Function.F2<String, Pair<TypicalTypes.raw_type<?>>, String> getTypeListName = new Function.F2<String, Pair<TypicalTypes.raw_type<?>>, String>() {
    public String apply(final Pair<TypicalTypes.raw_type<?>> tl, final String str) {
      return (null == Primitives.isBottom.apply(tl) ? null : Primitives.isBottom.apply(tl) ? str : new Match<String>() {
        public String apply() {
          final Pair<TypicalTypes.raw_type<?>> arg$117 = Analyzer.cast(tl);

          if ((null == arg$117)) {
            return null;
          }
          if (TypicalSupport.match$118(arg$117)) {
            return Analyzer.cast(str);
          }
          if ((null != arg$117 && !((Pair)arg$117).isEmpty())) {
            final Pair<TypicalTypes.raw_type<?>> list$119 = Analyzer.cast(arg$117);
            final TypicalTypes.raw_type<?> x = Analyzer.cast(Primitives.wrapHead(list$119));
            final Pair<TypicalTypes.raw_type<?>> xs = Analyzer.cast(Primitives.wrapTail(list$119));

            return Analyzer.cast(getTypeListName.apply(xs, Primitives.concat.apply(Primitives.concat.apply(str, ","), getTypeName.apply(x))));
          }
          return null;
        }
      }.apply());
    }
  };

  final Function.F1<TypicalTypes.raw_type<?>, Node> analyze = new Function.F1<TypicalTypes.raw_type<?>, Node>() {
    public TypicalTypes.raw_type<?> apply(final Node no) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final Node arg$121 = GNode.cast(no);

          if ((null == arg$121)) {
            return null;
          }
          if (TypicalSupport.match$122(arg$121)) {
            final Node n = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Pair<Node> l = Analyzer.cast(Primitives.getChildren(arg$121, 1, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$128 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final Pair<Node> nl;
              final Pair<TypicalTypes.raw_type<?>> atts;
              final Pair<String> strList;

              {
                nl = Analyzer.cast(TypicalSupport.append$123.apply(new Pair<Node>(n), l));
                TypicalSupport.map$124.apply(scanNode, nl);
                atts = Analyzer.cast(processAttributes.apply(nl));
                createTypeRecord.apply(atts);
                preload.apply(no);
                strList = Analyzer.cast(getNodeTypes.apply(nl));
                Primitives.annotate.apply(no, "__node_types", new TypicalTypes.StringList(strList));
                TypicalSupport.map$125.apply(analyzeTypeDefinition, nl);
                processFunctionCalls.apply(nl);
                processScopeSpace.apply(nl);
                TypicalSupport.map$125.apply(analyze, nl);
                checkUnusedParameters.apply(nl);
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null);
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$128);
            }
            return Analyzer.cast(retValue$128);
          }
          if (TypicalSupport.match$22(arg$121)) {
            final Node tp = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final String s = (arg$121.size() > 1 ? arg$121.getString(1) : null);
            final Node dec = (arg$121.size() > 2 ? arg$121.getGeneric(2) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$133 = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "visited") ? null : Primitives.hasAnnotation.apply(no, "visited") ? null : new Let<TypicalTypes.raw_type<?>>() {
              {
                Primitives.annotate.apply(no, "visited", wildt);
                Primitives.annotate.apply(dec, "parent", new TypicalTypes.StringName(s));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final Boolean var$130 = checkMonomorphic.apply(no, dec);

                    if ((null != var$130 && !var$130)) {
                      showMessage("error", Primitives.concat.apply(s, " must be a monomorphic variant"), null);
                    }
                    if ((null == var$130)) {
                      return null;
                    }
                    if (var$130) {
                      return (null == Primitives.isBottom.apply(tp) ? null : Primitives.isBottom.apply(tp) ? new Let<TypicalTypes.raw_type<?>>() {
                        final TypicalTypes.raw_type<?> tdec;

                        {
                          tdec = Analyzer.cast(analyze.apply(dec));
                          redefine.apply(no, tdec, getNameSpace);
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(tdec);
                        }
                      }.apply() : new Let<TypicalTypes.raw_type<?>>() {
                        final Pair<Node> nl;
                        final Pair<String> vars;

                        {
                          nl = Analyzer.cast(getNodeList.apply(tp));
                          vars = Analyzer.cast(getTypeVariables.apply(nl, Pair.<String>empty()));
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(null == Primitives.isNotBottom.apply(vars) || !Primitives.isNotBottom.apply(vars) ? null : new Let<TypicalTypes.raw_type<?>>() {
                            final TypicalTypes.raw_type<?> tdec;

                            {
                              Primitives.annotate.apply(dec, "type_variables", new TypicalTypes.StringList(vars));
                              Primitives.annotate.apply(no, "type_variables", new TypicalTypes.StringList(vars));
                              tdec = Analyzer.cast(analyze.apply(dec));
                              checkUnusedVariables.apply(vars, dec);
                              redefine.apply(no, tdec, getNameSpace);
                            }

                            public TypicalTypes.raw_type<?> apply() {
                              return Analyzer.cast(tdec);
                            }
                          }.apply());
                        }
                      }.apply());
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$133);
            }
            return Analyzer.cast(retValue$133);
          }
          if (TypicalSupport.match$34(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);
            final Node n = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$137 = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "visited") ? null : Primitives.hasAnnotation.apply(no, "visited") ? Analyzer.cast(lookup2.apply(no, getNameSpace)) : new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;

              {
                Primitives.annotate.apply(no, "visited", wildt);
                t = Analyzer.cast(analyze.apply(n));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isNotBottom.apply(t) || !Primitives.isNotBottom.apply(t) ? null : new Let<TypicalTypes.raw_type<?>>() {
                  {
                    define5.apply(no, new TypicalTypes.FieldT("type", s, t), "error", Primitives.concat.apply(Primitives.concat.apply("attribute ", s), " has been previously defined"), getNameSpace);
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new TypicalTypes.FieldT("type", s, t));
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$137);
            }
            return Analyzer.cast(retValue$137);
          }
          if (TypicalSupport.match$38(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);
            final Node n = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$141 = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "visited") ? null : Primitives.hasAnnotation.apply(no, "visited") ? Analyzer.cast(lookup2.apply(no, getNameSpace)) : new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;

              {
                Primitives.annotate.apply(no, "visited", wildt);
                t = Analyzer.cast(analyze.apply(n));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isNotBottom.apply(t) || !Primitives.isNotBottom.apply(t) ? null : new Let<TypicalTypes.raw_type<?>>() {
                  {
                    define5.apply(no, new TypicalTypes.FieldT("type", s, t), "error", Primitives.concat.apply(Primitives.concat.apply("attribute ", s), " has been previously defined"), getNameSpace);
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new TypicalTypes.FieldT("type", s, t));
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$141);
            }
            return Analyzer.cast(retValue$141);
          }
          if (TypicalSupport.match$142(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);
            final Pair<Node> l = Analyzer.cast(Primitives.getChildren(arg$121, 1, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$146 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              {
                TypicalSupport.map$125.apply(analyze, l);
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Require<Object>() {
                  public Object apply() {
                    final Boolean var$143 = Primitives.equal.apply("raw_type", s);

                    if ((null != var$143 && !var$143)) {
                      showMessage("error", "raw_type is expected in equality definition", null);
                    }
                    if ((null == var$143)) {
                      return null;
                    }
                    if (var$143) {
                      return null;
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$146);
            }
            return Analyzer.cast(retValue$146);
          }
          if (TypicalSupport.match$147(arg$121)) {
            final Node up = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node n = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);
            final Pair<Node> l = Analyzer.cast(Primitives.getChildren(arg$121, 2, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$157 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final String s;
              final Pair<Node> nl;
              final TypicalTypes.raw_type<?> t;

              {
                s = Analyzer.cast(getString.apply(up));
                nl = Analyzer.cast(TypicalSupport.append$123.apply(new Pair<Node>(n), l));
                t = Analyzer.cast(Analyzer.cast(lookup4.apply(up, "error", Primitives.concat.apply(Primitives.concat.apply("constructor ", s), " is undefined"), getNameSpace)));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final TypicalTypes.raw_type<?> arg$148 = Analyzer.cast(t);

                    if ((null == arg$148)) {
                      return null;
                    }
                    if ((null != arg$148))
                                            switch (arg$148.tag()) {
                      case ConstructorT:
                        if (TypicalSupport.match$149(arg$148)) {
                          final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$148.getTuple().get3());

                          return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              final TypicalTypes.raw_type<?> arg$150 = Analyzer.cast(ty);

                              if ((null == arg$150)) {
                                return null;
                              }
                              if ((null != arg$150))
                                                                switch (arg$150.tag()) {
                                case TupleT:
                                  if (TypicalSupport.match$110(arg$150)) {
                                    final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$150.getTuple().get1());

                                    return Analyzer.cast(null == Primitives.lessInt.apply(Primitives.length.apply(nl), Primitives.length.apply(tl)) ? null : Primitives.lessInt.apply(Primitives.length.apply(nl), Primitives.length.apply(tl)) ? error(Primitives.concat.apply(s, " does not have enough children"), null) : null == Primitives.greaterInt.apply(Primitives.length.apply(nl), Primitives.length.apply(tl)) || !Primitives.greaterInt.apply(Primitives.length.apply(nl), Primitives.length.apply(tl)) ? null : error(Primitives.concat.apply(s, " has too many children"), null));
                                  }
                                  break;
                                default:
                                  break;
                                };
                              if (true) {
                                return Analyzer.cast(new Require<Object>() {
                                  public Object apply() {
                                    final Boolean var$152 = Primitives.equal.apply(Primitives.length.apply(nl), BigInteger.valueOf(1));

                                    if ((null != var$152 && !var$152)) {
                                      showMessage("error", Primitives.concat.apply(s, " must have only one child"), null);
                                    }
                                    if ((null == var$152)) {
                                      return null;
                                    }
                                    if (var$152) {
                                      return null;
                                    }
                                    return null;
                                  }
                                }.apply());
                              }
                              return null;
                            }
                          }.apply());
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(error("raw_type constructor is expected in equality definition", null));
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$157);
            }
            return Analyzer.cast(retValue$157);
          }
          if (TypicalSupport.match$158(arg$121)) {
            final Pair<Node> l = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$162 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final String str;
              final Pair<String> vars;
              final Pair<TypicalTypes.raw_type<?>> tl;

              {
                str = Analyzer.cast(getAnnotatedString.apply(no, "parent"));
                vars = Analyzer.cast(getAnnotatedStringList.apply(no, "type_variables"));
                Primitives.annotateList.apply(l, "parent", new TypicalTypes.StringName(str));
                Analyzer.discard(null == Primitives.isNotBottom.apply(vars) || !Primitives.isNotBottom.apply(vars) ? null : Primitives.annotateList.apply(l, "type_variables", new TypicalTypes.StringList(vars)));
                tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, l));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : new TypicalTypes.RecordT(tl));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$162);
            }
            return Analyzer.cast(retValue$162);
          }
          if (TypicalSupport.match$42(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);
            final Node n = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$166 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final String ano;
              final Pair<String> vars;
              final TypicalTypes.raw_type<?> t;

              {
                ano = Analyzer.cast(getAnnotatedString.apply(no, "parent"));
                vars = Analyzer.cast(getAnnotatedStringList.apply(no, "type_variables"));
                Analyzer.discard(null == Primitives.isNotBottom.apply(vars) || !Primitives.isNotBottom.apply(vars) ? null : Primitives.annotate.apply(n, "type_variables", new TypicalTypes.StringList(vars)));
                t = Analyzer.cast(analyze.apply(n));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == isDefined.apply(no, getNameSpace) ? null : isDefined.apply(no, getNameSpace) ? error(Primitives.concat.apply(Primitives.concat.apply("field ", s), " has been previously defined"), null) : null == Primitives.isNotBottom.apply(t) || !Primitives.isNotBottom.apply(t) ? null : new Let<TypicalTypes.raw_type<?>>() {
                  {
                    redefine.apply(no, new TypicalTypes.FieldT(ano, s, t), getNameSpace);
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new TypicalTypes.FieldT(ano, s, t));
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$166);
            }
            return Analyzer.cast(retValue$166);
          }
          if (TypicalSupport.match$167(arg$121)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$170 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final String str;
              final Pair<String> vars;
              final Pair<TypicalTypes.raw_type<?>> tl;

              {
                str = Analyzer.cast(getAnnotatedString.apply(no, "parent"));
                vars = Analyzer.cast(getAnnotatedStringList.apply(no, "type_variables"));
                Primitives.annotateList.apply(nl, "parent", new TypicalTypes.StringName(str));
                Analyzer.discard(null == Primitives.isNotBottom.apply(vars) || !Primitives.isNotBottom.apply(vars) ? null : Primitives.annotateList.apply(nl, "type_variables", new TypicalTypes.StringList(vars)));
                tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, nl));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : new TypicalTypes.VariantT(tl));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$170);
            }
            return Analyzer.cast(retValue$170);
          }
          if (TypicalSupport.match$14(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);
            final Node n = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$174 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final String ano;
              final Pair<String> vars;
              final TypicalTypes.raw_type<?> t;

              {
                ano = Analyzer.cast(getAnnotatedString.apply(no, "parent"));
                vars = Analyzer.cast(getAnnotatedStringList.apply(no, "type_variables"));
                Analyzer.discard(null == Primitives.isNotBottom.apply(vars) || !Primitives.isNotBottom.apply(vars) ? null : Primitives.annotate.apply(n, "type_variables", new TypicalTypes.StringList(vars)));
                Primitives.annotate.apply(n, "parent", new TypicalTypes.StringName(ano));
                t = Analyzer.cast(analyze.apply(n));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == isDefined.apply(no, getNameSpace) ? null : isDefined.apply(no, getNameSpace) ? error(Primitives.concat.apply(Primitives.concat.apply("constructor ", s), " has been previously defined"), null) : new Let<TypicalTypes.raw_type<?>>() {
                  {
                    redefine.apply(no, new TypicalTypes.ConstructorT(ano, s, t), getNameSpace);
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new TypicalTypes.ConstructorT(ano, s, t));
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$174);
            }
            return Analyzer.cast(retValue$174);
          }
          if (TypicalSupport.match$175(arg$121)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$178 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final String str;

              {
                str = Analyzer.cast(getAnnotatedString.apply(no, "parent"));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == reachableFromNode.apply(str) ? null : reachableFromNode.apply(str) ? new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<TypicalTypes.raw_type<?>> tl;

                  {
                    tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, nl));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? new TypicalTypes.PolyVariantT(tl) : null);
                  }
                }.apply() : error("polymorphic variant is not allowed outside node closure", null));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$178);
            }
            return Analyzer.cast(retValue$178);
          }
          if (TypicalSupport.match$18(arg$121)) {
            final String s1 = (arg$121.size() > 0 ? arg$121.getString(0) : null);
            final String s2 = (arg$121.size() > 1 ? arg$121.getString(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$186 = Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
              public TypicalTypes.raw_type<?> apply() {
                final Boolean var$183 = isDefined.apply(GNode.create("UserDefinedType", s2), getNameSpace);

                if ((null != var$183 && !var$183)) {
                  showMessage("error", Primitives.concat.apply(s2, " is undefined"), null);
                }
                if ((null == var$183)) {
                  return null;
                }
                if (var$183) {
                  return (null == isDefined.apply(no, getNameSpace) ? null : isDefined.apply(no, getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
                    final TypicalTypes.raw_type<?> t;

                    {
                      t = Analyzer.cast(Analyzer.cast(lookup2.apply(no, getNameSpace)));
                    }

                    public TypicalTypes.raw_type<?> apply() {
                      return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                        public TypicalTypes.raw_type<?> apply() {
                          final TypicalTypes.raw_type<?> arg$180 = Analyzer.cast(t);

                          if ((null == arg$180)) {
                            return null;
                          }
                          if ((null != arg$180))
                                                        switch (arg$180.tag()) {
                            case TypeName:
                              if (TypicalSupport.match$97(arg$180)) {
                                final String s = Analyzer.cast(arg$180.getTuple().get1());

                                return Analyzer.cast(null == Primitives.equal.apply(s, s2) ? null : Primitives.equal.apply(s, s2) ? t : error(Primitives.concat.apply(Primitives.concat.apply(s1, " is previously defined with "), s), null));
                              }
                              break;
                            default:
                              break;
                            };
                          if (true) {
                            return Analyzer.cast(error(Primitives.concat.apply(Primitives.concat.apply(s1, " is previously defined with "), getTypeName.apply(t)), null));
                          }
                          return null;
                        }
                      }.apply());
                    }
                  }.apply() : new Let<TypicalTypes.raw_type<?>>() {
                    {
                      redefine.apply(no, new TypicalTypes.TypeName(s2), getNameSpace);
                    }

                    public TypicalTypes.raw_type<?> apply() {
                      return Analyzer.cast(new TypicalTypes.TypeName(s2));
                    }
                  }.apply());
                }
                return null;
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$186);
            }
            return Analyzer.cast(retValue$186);
          }
          if (TypicalSupport.match$187(arg$121)) {
            final Node n = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$190 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              {
                Primitives.annotate.apply(n, "non_exhaustive", wildt);
                Primitives.annotate.apply(n, "no_binding_check", wildt);
                Primitives.annotate.apply(n, "ensure_node", wildt);
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(analyze.apply(n));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$190);
            }
            return Analyzer.cast(retValue$190);
          }
          if (TypicalSupport.match$191(arg$121)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$196 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final Pair<TypicalTypes.raw_type<?>> tl;

              {
                tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, nl));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> res;

                  {
                    res = Analyzer.cast(TypicalSupport.foldl$193.apply(unify, tl, wildt));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                      public TypicalTypes.raw_type<?> apply() {
                        final Boolean var$192 = Primitives.isNotBottom.apply(res);

                        if ((null != var$192 && !var$192)) {
                          showMessage("error", Primitives.concat.apply("types of pattern matches in matching structure ", "do not match together"), null);
                        }
                        if ((null == var$192)) {
                          return null;
                        }
                        if (var$192) {
                          return res;
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$196);
            }
            return Analyzer.cast(retValue$196);
          }
          if (TypicalSupport.match$78(arg$121)) {
            final String tagStr = (arg$121.size() > 0 ? arg$121.getString(0) : null);
            final String typeStr = (arg$121.size() > 1 ? arg$121.getString(1) : null);
            final Node pat = (arg$121.size() > 2 ? arg$121.getGeneric(2) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$201 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> ty;

              {
                ty = Analyzer.cast(Analyzer.cast(lookup4.apply(GNode.create("UserDefinedType", typeStr), "error", Primitives.concat.apply(typeStr, " is an undefined type"), getNameSpace)));
                Primitives.annotate.apply(pat, "no_binding_check", wildt);
                Primitives.annotate.apply(pat, "non_exhaustive", wildt);
                Primitives.annotate.apply(pat, "ensure_node", wildt);
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isNotBottom.apply(ty) || !Primitives.isNotBottom.apply(ty) ? null : null == Primitives.not.apply(isDefined.apply(GNode.create("UserDefinedType", Primitives.concat.apply("tag", tagStr)), getNameSpace)) ? null : Primitives.not.apply(isDefined.apply(GNode.create("UserDefinedType", Primitives.concat.apply("tag", tagStr)), getNameSpace)) ? new Let<TypicalTypes.raw_type<?>>() {
                  {
                    redefine.apply(GNode.create("UserDefinedType", Primitives.concat.apply("tag", tagStr)), new TypicalTypes.TypeName(typeStr), getNameSpace);
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(analyze.apply(pat));
                  }
                }.apply() : new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> ta;

                  {
                    ta = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", Primitives.concat.apply("tag", tagStr)), getNameSpace)));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                      public TypicalTypes.raw_type<?> apply() {
                        final Boolean var$198 = Primitives.isNotBottom.apply(unify.apply(ta, ty));

                        if ((null != var$198 && !var$198)) {
                          showMessage("error", Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply("tag ", tagStr), " must be defined with "), getTypeName.apply(ta)), ", found "), getTypeName.apply(ty)), null);
                        }
                        if ((null == var$198)) {
                          return null;
                        }
                        if (var$198) {
                          return analyze.apply(pat);
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$201);
            }
            return Analyzer.cast(retValue$201);
          }
          if (TypicalSupport.match$74(arg$121)) {
            final Node p = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);
            final Node v = (arg$121.size() > 2 ? arg$121.getGeneric(2) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$209 = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "visited") ? null : Primitives.hasAnnotation.apply(no, "visited") ? Analyzer.cast(lookup2.apply(no, getNameSpace)) : new Let<TypicalTypes.raw_type<?>>() {
              {
                Primitives.annotate.apply(no, "visited", wildt);
                visitDepend.apply(no);
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(Primitives.hasAnnotation.apply(no, "secondary")) ? null : Primitives.not.apply(Primitives.hasAnnotation.apply(no, "secondary")) ? new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> pts;

                  {
                    pts = Analyzer.cast(analyze.apply(p));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                      public TypicalTypes.raw_type<?> apply() {
                        final TypicalTypes.raw_type<?> arg$203 = Analyzer.cast(pts);

                        if ((null == arg$203)) {
                          return null;
                        }
                        if ((null != arg$203))
                                                    switch (arg$203.tag()) {
                          case TupleT:
                            if (TypicalSupport.match$204(arg$203)) {
                              return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                final TypicalTypes.raw_type<?> ty;
                                final TypicalTypes.raw_type<?> ret;

                                {
                                  ty = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));
                                  redefine.apply(no, ty, getNameSpace);
                                  processMutual.apply(no);
                                  ret = Analyzer.cast(analyze.apply(v));
                                  unify.apply(ty, ret);
                                  resolveMutual.apply(no);
                                }

                                public TypicalTypes.raw_type<?> apply() {
                                  return Analyzer.cast(Analyzer.cast(lookup2.apply(no, getNameSpace)));
                                }
                              }.apply());
                            }
                            if (TypicalSupport.match$110(arg$203)) {
                              final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$203.getTuple().get1());

                              return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                final TypicalTypes.raw_type<?> ty;
                                final TypicalTypes.raw_type<?> ret;

                                {
                                  ty = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));
                                  redefine.apply(no, new TypicalTypes.FunctionT(tl, ty), getNameSpace);
                                  processMutual.apply(no);
                                  ret = Analyzer.cast(analyze.apply(v));
                                  unify.apply(ty, ret);
                                  resolveMutual.apply(no);
                                }

                                public TypicalTypes.raw_type<?> apply() {
                                  return Analyzer.cast(Analyzer.cast(lookup2.apply(no, getNameSpace)));
                                }
                              }.apply());
                            }
                            break;
                          default:
                            break;
                          };
                        if (true) {
                          return Analyzer.cast(null);
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply() : Analyzer.cast(lookup2.apply(no, getNameSpace)));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$209);
            }
            return Analyzer.cast(retValue$209);
          }
          if (TypicalSupport.match$85(arg$121)) {
            final Node p = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node v = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$217 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> pts;

              {
                pts = Analyzer.cast(analyze.apply(p));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final TypicalTypes.raw_type<?> arg$211 = Analyzer.cast(pts);

                    if ((null == arg$211)) {
                      return null;
                    }
                    if ((null != arg$211))
                                            switch (arg$211.tag()) {
                      case TupleT:
                        if (TypicalSupport.match$204(arg$211)) {
                          return Analyzer.cast(error("FunEpression must have parameters", null));
                        }
                        if (TypicalSupport.match$110(arg$211)) {
                          final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$211.getTuple().get1());

                          return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                            final TypicalTypes.raw_type<?> ret;
                            final TypicalTypes.raw_type<?> funT;

                            {
                              ret = Analyzer.cast(analyze.apply(v));
                              funT = Analyzer.cast(new TypicalTypes.FunctionT(tl, ret));
                            }

                            public TypicalTypes.raw_type<?> apply() {
                              return Analyzer.cast(resolveType.apply(funT));
                            }
                          }.apply());
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(null);
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$217);
            }
            return Analyzer.cast(retValue$217);
          }
          if (TypicalSupport.match$218(arg$121)) {
            final Pair<Node> pl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$221 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final Pair<TypicalTypes.raw_type<?>> tl;

              {
                tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, pl));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : new TypicalTypes.TupleT(tl));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$221);
            }
            return Analyzer.cast(retValue$221);
          }
          if (TypicalSupport.match$70(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);
            final Node n = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$226 = Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
              public TypicalTypes.raw_type<?> apply() {
                final Boolean var$223 = Primitives.not.apply(isDefinedLocally.apply(no, getNameSpace));

                if ((null != var$223 && !var$223)) {
                  showMessage("error", Primitives.concat.apply(Primitives.concat.apply("parameter ", s), " has been previously defined"), null);
                }
                if ((null == var$223)) {
                  return null;
                }
                if (var$223) {
                  return (null == Primitives.isBottom.apply(n) ? null : Primitives.isBottom.apply(n) ? new Let<TypicalTypes.raw_type<?>>() {
                    final TypicalTypes.raw_type<?> ty;

                    {
                      ty = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));
                      define3.apply(no, ty, getNameSpace);
                    }

                    public TypicalTypes.raw_type<?> apply() {
                      return Analyzer.cast(ty);
                    }
                  }.apply() : new Let<TypicalTypes.raw_type<?>>() {
                    final TypicalTypes.raw_type<?> t;

                    {
                      t = Analyzer.cast(analyze.apply(n));
                      define3.apply(no, t, getNameSpace);
                    }

                    public TypicalTypes.raw_type<?> apply() {
                      return Analyzer.cast(t);
                    }
                  }.apply());
                }
                return null;
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$226);
            }
            return Analyzer.cast(retValue$226);
          }
          if (TypicalSupport.match$227(arg$121)) {
            final Node n1 = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node n2 = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$234 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;
              final TypicalTypes.raw_type<?> ty;

              {
                t = Analyzer.cast(analyze.apply(n1));
                ty = Analyzer.cast(analyze.apply(n2));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final TypicalTypes.raw_type<?> arg$228 = Analyzer.cast(ty);

                    if ((null == arg$228)) {
                      return null;
                    }
                    if ((null != arg$228))
                                            switch (arg$228.tag()) {
                      case PairOfType:
                        if (TypicalSupport.match$112(arg$228)) {
                          final TypicalTypes.raw_type<?> t1 = Analyzer.cast(arg$228.getTuple().get1());
                          final TypicalTypes.raw_type<?> t2 = Analyzer.cast(arg$228.getTuple().get2());

                          return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                            {
                              new Guard<TypicalTypes.raw_type<?>>() {
                                public TypicalTypes.raw_type<?> apply() {
                                  if ((null == t1)) {
                                    return null;
                                  }
                                  if ((null == t)) {
                                    return null;
                                  }
                                  if ((null == unify)) {
                                    return null;
                                  }

                                  final TypicalTypes.raw_type<?> result$230 = unify.apply(t, t1);

                                  if ((null == result$230)) {
                                    return Analyzer.cast(error(Primitives.concat.apply("type of the expression does not match ", "the type of patterns"), null));
                                  }
                                  return result$230;
                                }
                              }.apply();
                            }

                            public TypicalTypes.raw_type<?> apply() {
                              return Analyzer.cast(t2);
                            }
                          }.apply());
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(null);
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$234);
            }
            return Analyzer.cast(retValue$234);
          }
          if (TypicalSupport.match$235(arg$121)) {
            final Pair<Node> l = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$238 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final Pair<TypicalTypes.raw_type<?>> typeList;

              {
                Analyzer.discard(null == Primitives.hasAnnotation.apply(no, "no_binding_check") || !Primitives.hasAnnotation.apply(no, "no_binding_check") ? null : Primitives.annotateList.apply(l, "no_binding_check", wildt));
                Analyzer.discard(null == Primitives.hasAnnotation.apply(no, "ensure_node") || !Primitives.hasAnnotation.apply(no, "ensure_node") ? null : Primitives.annotateList.apply(l, "ensure_node", wildt));
                typeList = Analyzer.cast(TypicalSupport.map$125.apply(analyze, l));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, typeList)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, typeList)) ? null : new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> res;

                  {
                    res = Analyzer.cast(TypicalSupport.foldl$193.apply(unify, typeList, wildt));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(null == Primitives.isNotBottom.apply(res) ? null : Primitives.isNotBottom.apply(res) ? new Let<TypicalTypes.raw_type<?>>() {
                      {
                        Analyzer.discard(null == Primitives.hasAnnotation.apply(no, "is_reduce") ? null : Primitives.hasAnnotation.apply(no, "is_reduce") ? checkReduceMatching.apply(l) : checkIrredundant.apply(l));
                        Analyzer.discard(null == Primitives.not.apply(Primitives.hasAnnotation.apply(no, "non_exhaustive")) ? null : Primitives.not.apply(Primitives.hasAnnotation.apply(no, "non_exhaustive")) ? checkExhaustive.apply(l) : Boolean.TRUE);
                      }

                      public TypicalTypes.raw_type<?> apply() {
                        return Analyzer.cast(res);
                      }
                    }.apply() : error(Primitives.concat.apply("types of pattern matches in pattern matching structure ", "do not match together"), null));
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$238);
            }
            return Analyzer.cast(retValue$238);
          }
          if (TypicalSupport.match$86(arg$121)) {
            final Node pat = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node ne = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$242 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> tpat;
              final TypicalTypes.raw_type<?> tne;
              final Pair<String> strList;
              final Pair<String> newList;

              {
                Analyzer.discard(null == Primitives.hasAnnotation.apply(no, "no_binding_check") || !Primitives.hasAnnotation.apply(no, "no_binding_check") ? null : Primitives.annotate.apply(pat, "no_binding_check", wildt));
                Analyzer.discard(null == Primitives.hasAnnotation.apply(no, "ensure_node") || !Primitives.hasAnnotation.apply(no, "ensure_node") ? null : Primitives.annotate.apply(pat, "ensure_node", wildt));
                tpat = Analyzer.cast(analyze.apply(pat));
                tne = Analyzer.cast(analyze.apply(ne));
                strList = Analyzer.cast(retrieveVariables.apply(pat));
                Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(strList));
                newList = Analyzer.cast(removeUsedVariables.apply(strList, pat));
                checkUnusedVariables.apply(newList, ne);
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.and.apply(Primitives.isNotBottom.apply(tpat), Primitives.isNotBottom.apply(tne)) || !Primitives.and.apply(Primitives.isNotBottom.apply(tpat), Primitives.isNotBottom.apply(tne)) ? null : new TypicalTypes.PairOfType(tpat, tne));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$242);
            }
            return Analyzer.cast(retValue$242);
          }
          if (TypicalSupport.match$243(arg$121)) {
            final Pair<Node> pl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$248 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final Pair<TypicalTypes.raw_type<?>> tl;

              {
                Analyzer.discard(null == Primitives.hasAnnotation.apply(no, "no_binding_check") || !Primitives.hasAnnotation.apply(no, "no_binding_check") ? null : Primitives.annotateList.apply(pl, "no_binding_check", wildt));
                tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, pl));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> res;

                  {
                    res = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "ensure_node") ? null : Primitives.hasAnnotation.apply(no, "ensure_node") ? checkNodeList.apply(tl) : TypicalSupport.foldl$193.apply(unify, tl, wildt));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(null == Primitives.and.apply(Primitives.isBottom.apply(res), Primitives.not.apply(Primitives.hasAnnotation.apply(no, "ensure_node"))) ? null : Primitives.and.apply(Primitives.isBottom.apply(res), Primitives.not.apply(Primitives.hasAnnotation.apply(no, "ensure_node"))) ? error("types of the patterns do not match together", null) : new Let<TypicalTypes.raw_type<?>>() {
                      final Pair<String> strList;

                      {
                        strList = Analyzer.cast(retrieveVariables.apply(TypicalSupport.head$245.apply(pl)));
                      }

                      public TypicalTypes.raw_type<?> apply() {
                        return Analyzer.cast(null == haveSameVariables.apply(strList, TypicalSupport.tail$244.apply(pl)) ? null : haveSameVariables.apply(strList, TypicalSupport.tail$244.apply(pl)) ? new Let<TypicalTypes.raw_type<?>>() {
                          {
                            Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(strList));
                          }

                          public TypicalTypes.raw_type<?> apply() {
                            return Analyzer.cast(res);
                          }
                        }.apply() : error("parallel patterns do not have the same variables", null));
                      }
                    }.apply());
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$248);
            }
            return Analyzer.cast(retValue$248);
          }
          if (TypicalSupport.match$249(arg$121)) {
            final Pair<Node> pl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$252 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final Pair<TypicalTypes.raw_type<?>> tl;

              {
                Analyzer.discard(null == Primitives.hasAnnotation.apply(no, "no_binding_check") || !Primitives.hasAnnotation.apply(no, "no_binding_check") ? null : Primitives.annotateList.apply(pl, "no_binding_check", wildt));
                tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, pl));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<String> strList;

                  {
                    strList = Analyzer.cast(combineVariables.apply(pl));
                    Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(strList));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new TypicalTypes.TupleT(tl));
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$252);
            }
            return Analyzer.cast(retValue$252);
          }
          if (TypicalSupport.match$253(arg$121)) {
            final Node p = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node e = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$257 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> tp;
              final TypicalTypes.raw_type<?> te;

              {
                Analyzer.discard(null == Primitives.hasAnnotation.apply(no, "no_binding_check") || !Primitives.hasAnnotation.apply(no, "no_binding_check") ? null : Primitives.annotate.apply(p, "no_binding_check", wildt));
                tp = Analyzer.cast(analyze.apply(p));
                te = Analyzer.cast(analyze.apply(e));
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == boolt)) {
                      return null;
                    }
                    if ((null == te)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$254 = unify.apply(te, boolt);

                    if ((null == result$254)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected boolean, found ", getTypeName.apply(te)), e));
                    }
                    return result$254;
                  }
                }.apply();
                Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(retrieveVariables.apply(p)));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(Primitives.hasAnnotation.apply(p, "has_bindings")) ? null : Primitives.not.apply(Primitives.hasAnnotation.apply(p, "has_bindings")) ? tp : new Let<TypicalTypes.raw_type<?>>() {
                  {
                    Primitives.annotate.apply(no, "has_bindings", wildt);
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(tp);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$257);
            }
            return Analyzer.cast(retValue$257);
          }
          if (TypicalSupport.match$58(arg$121)) {
            final Node p = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final String s = (arg$121.size() > 1 ? arg$121.getString(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$266 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> tp;

              {
                Analyzer.discard(null == Primitives.hasAnnotation.apply(no, "no_binding_check") || !Primitives.hasAnnotation.apply(no, "no_binding_check") ? null : Primitives.annotate.apply(p, "no_binding_check", wildt));
                tp = Analyzer.cast(analyze.apply(p));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final Boolean var$263 = Primitives.not.apply(isDefinedLocally.apply(no, getNameSpace));

                    if ((null != var$263 && !var$263)) {
                      showMessage("error", Primitives.concat.apply(Primitives.concat.apply("variable ", s), " has been previously defined"), null);
                    }
                    if ((null == var$263)) {
                      return null;
                    }
                    if (var$263) {
                      return new Let<TypicalTypes.raw_type<?>>() {
                        final TypicalTypes.raw_type<?> res;
                        final Pair<String> strList;

                        {
                          res = Analyzer.cast(null == Primitives.isBottom.apply(tp) ? null : Primitives.isBottom.apply(tp) ? null : new Match<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              final TypicalTypes.raw_type<?> arg$259 = Analyzer.cast(tp);

                              if ((null == arg$259)) {
                                return null;
                              }
                              if ((null != arg$259))
                                                                switch (arg$259.tag()) {
                                case WildcardT:
                                  if (TypicalSupport.match$94(arg$259)) {
                                    return Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));
                                  }
                                  break;
                                default:
                                  break;
                                };
                              if (true) {
                                return Analyzer.cast(tp);
                              }
                              return null;
                            }
                          }.apply());
                          redefine.apply(no, res, getNameSpace);
                          strList = Analyzer.cast(TypicalSupport.append$262.apply(retrieveVariables.apply(p), new Pair<String>(s)));
                          Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(strList));
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(null == Primitives.and.apply(Primitives.hasAnnotation.apply(p, "has_bindings"), Primitives.not.apply(Primitives.hasAnnotation.apply(no, "no_binding_check"))) ? null : Primitives.and.apply(Primitives.hasAnnotation.apply(p, "has_bindings"), Primitives.not.apply(Primitives.hasAnnotation.apply(no, "no_binding_check"))) ? error("AsPattern contains bindings in the pattern", null) : res);
                        }
                      }.apply();
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$266);
            }
            return Analyzer.cast(retValue$266);
          }
          if (TypicalSupport.match$267(arg$121)) {
            final Node pat = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node ty = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$271 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> tp;
              final TypicalTypes.raw_type<?> t;
              final TypicalTypes.raw_type<?> res;

              {
                Analyzer.discard(null == Primitives.hasAnnotation.apply(no, "no_binding_check") || !Primitives.hasAnnotation.apply(no, "no_binding_check") ? null : Primitives.annotate.apply(pat, "no_binding_check", wildt));
                tp = Analyzer.cast(analyze.apply(pat));
                t = Analyzer.cast(analyze.apply(ty));
                res = Analyzer.cast(unify.apply(t, tp));
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == t)) {
                      return null;
                    }
                    if ((null == tp)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$268 = unify.apply(t, tp);

                    if ((null == result$268)) {
                      return Analyzer.cast(error(Primitives.concat.apply("type of the pattern does not match ", "with the explicit type"), pat));
                    }
                    return result$268;
                  }
                }.apply();
                Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(retrieveVariables.apply(pat)));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(Primitives.hasAnnotation.apply(pat, "has_bindings")) ? null : Primitives.not.apply(Primitives.hasAnnotation.apply(pat, "has_bindings")) ? res : new Let<TypicalTypes.raw_type<?>>() {
                  {
                    Primitives.annotate.apply(no, "has_bindings", wildt);
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(res);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$271);
            }
            return Analyzer.cast(retValue$271);
          }
          if (TypicalSupport.match$272(arg$121)) {
            final Node n = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node con = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$278 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;
              final TypicalTypes.raw_type<?> tl;

              {
                Analyzer.discard(null == Primitives.hasAnnotation.apply(no, "no_binding_check") || !Primitives.hasAnnotation.apply(no, "no_binding_check") ? null : new Let<Object>() {
                  {
                    Primitives.annotate.apply(n, "no_binding_check", wildt);
                  }

                  public Object apply() {
                    return Analyzer.cast(Primitives.annotate.apply(con, "no_binding_check", wildt));
                  }
                }.apply());
                t = Analyzer.cast(analyze.apply(n));
                tl = Analyzer.cast(analyze.apply(con));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.and.apply(Primitives.isNotBottom.apply(t), Primitives.isNotBottom.apply(tl)) || !Primitives.and.apply(Primitives.isNotBottom.apply(t), Primitives.isNotBottom.apply(tl)) ? null : null == isListType.apply(tl) ? null : isListType.apply(tl) ? new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> res;

                  {
                    res = Analyzer.cast(unify.apply(tl, new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(t), "list")));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                      public TypicalTypes.raw_type<?> apply() {
                        final Boolean var$275 = Primitives.isNotBottom.apply(res);

                        if ((null != var$275 && !var$275)) {
                          showMessage("error", Primitives.concat.apply(Primitives.concat.apply("type of the head does not match with ", "type in the list"), " in cons pattern"), null);
                        }
                        if ((null == var$275)) {
                          return null;
                        }
                        if (var$275) {
                          return new Require<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              final Boolean var$274 = Primitives.or.apply(Primitives.not.apply(isNodeType.apply(t)), checkBindings.apply(new Pair<Node>(n).append(new Pair<Node>(con)), BigInteger.valueOf(0), BigInteger.valueOf(0)));

                              if ((null != var$274 && !var$274)) {
                                showMessage("error", "bindings in different nodes in cons pattern", null);
                              }
                              if ((null == var$274)) {
                                return null;
                              }
                              if (var$274) {
                                return new Let<TypicalTypes.raw_type<?>>() {
                                  final Pair<String> strList;

                                  {
                                    strList = Analyzer.cast(TypicalSupport.union$273.apply(retrieveVariables.apply(n), retrieveVariables.apply(con)));
                                  }

                                  public TypicalTypes.raw_type<?> apply() {
                                    return Analyzer.cast(null == Primitives.isEmpty.apply(strList) ? null : Primitives.isEmpty.apply(strList) ? res : new Let<TypicalTypes.raw_type<?>>() {
                                      {
                                        Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(strList));
                                        Primitives.annotate.apply(no, "has_bindings", wildt);
                                      }

                                      public TypicalTypes.raw_type<?> apply() {
                                        return Analyzer.cast(res);
                                      }
                                    }.apply());
                                  }
                                }.apply();
                              }
                              return null;
                            }
                          }.apply();
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply() : error("the tail of a cons pattern must be a list", null));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$278);
            }
            return Analyzer.cast(retValue$278);
          }
          if (TypicalSupport.match$279(arg$121)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$287 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              {
                Analyzer.discard(null == Primitives.hasAnnotation.apply(no, "no_binding_check") || !Primitives.hasAnnotation.apply(no, "no_binding_check") ? null : Primitives.annotateList.apply(nl, "no_binding_check", wildt));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final Pair<Node> arg$280 = Analyzer.cast(nl);

                    if ((null == arg$280)) {
                      return null;
                    }
                    if (TypicalSupport.match$281(arg$280)) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        final TypicalTypes.raw_type<?> varT;

                        {
                          varT = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(varT), "list"));
                        }
                      }.apply());
                    }
                    if (true) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        final Pair<TypicalTypes.raw_type<?>> tl;

                        {
                          tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, nl));
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : new Let<TypicalTypes.raw_type<?>>() {
                            final TypicalTypes.raw_type<?> res;

                            {
                              res = Analyzer.cast(TypicalSupport.foldl$193.apply(unify, tl, wildt));
                            }

                            public TypicalTypes.raw_type<?> apply() {
                              return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                                public TypicalTypes.raw_type<?> apply() {
                                  final Boolean var$283 = Primitives.isNotBottom.apply(res);

                                  if ((null != var$283 && !var$283)) {
                                    showMessage("error", "types do not match in list pattern", null);
                                  }
                                  if ((null == var$283)) {
                                    return null;
                                  }
                                  if (var$283) {
                                    return new Require<TypicalTypes.raw_type<?>>() {
                                      public TypicalTypes.raw_type<?> apply() {
                                        final Boolean var$282 = Primitives.or.apply(Primitives.not.apply(isNodeType.apply(res)), checkBindings.apply(nl, BigInteger.valueOf(0), BigInteger.valueOf(0)));

                                        if ((null != var$282 && !var$282)) {
                                          showMessage("error", Primitives.concat.apply("bindings in different nodes ", "in list pattern"), null);
                                        }
                                        if ((null == var$282)) {
                                          return null;
                                        }
                                        if (var$282) {
                                          return new Let<TypicalTypes.raw_type<?>>() {
                                            final Pair<String> strList;

                                            {
                                              strList = Analyzer.cast(combineVariables.apply(nl));
                                            }

                                            public TypicalTypes.raw_type<?> apply() {
                                              return Analyzer.cast(null == Primitives.isEmpty.apply(strList) ? null : Primitives.isEmpty.apply(strList) ? new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(res), "list") : new Let<TypicalTypes.raw_type<?>>() {
                                                {
                                                  Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(strList));
                                                  Primitives.annotate.apply(no, "has_bindings", wildt);
                                                }

                                                public TypicalTypes.raw_type<?> apply() {
                                                  return Analyzer.cast(new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(res), "list"));
                                                }
                                              }.apply());
                                            }
                                          }.apply();
                                        }
                                        return null;
                                      }
                                    }.apply();
                                  }
                                  return null;
                                }
                              }.apply());
                            }
                          }.apply());
                        }
                      }.apply());
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$287);
            }
            return Analyzer.cast(retValue$287);
          }
          if (TypicalSupport.match$288(arg$121)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$298 = Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
              public TypicalTypes.raw_type<?> apply() {
                final Pair<Node> arg$289 = Analyzer.cast(nl);

                if ((null == arg$289)) {
                  return null;
                }
                if (TypicalSupport.match$281(arg$289)) {
                  return Analyzer.cast(error("empty record pattern", null));
                }
                if ((null != arg$289 && !((Pair)arg$289).isEmpty())) {
                  final Pair<Node> list$291 = Analyzer.cast(arg$289);
                  final Node x = GNode.cast(Primitives.wrapHead(list$291));
                  final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$291));

                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                    final TypicalTypes.raw_type<?> tx;

                    {
                      tx = Analyzer.cast(analyze.apply(x));
                    }

                    public TypicalTypes.raw_type<?> apply() {
                      return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                        public TypicalTypes.raw_type<?> apply() {
                          final TypicalTypes.raw_type<?> arg$292 = Analyzer.cast(tx);

                          if ((null == arg$292)) {
                            return null;
                          }
                          if ((null != arg$292))
                                                        switch (arg$292.tag()) {
                            case FieldT:
                              if (TypicalSupport.match$98(arg$292)) {
                                final String s = Analyzer.cast(arg$292.getTuple().get1());

                                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                  final Pair<String> strList;

                                  {
                                    Primitives.annotateList.apply(xs, "parent", new TypicalTypes.StringName(s));
                                    TypicalSupport.map$125.apply(analyze, xs);
                                    strList = Analyzer.cast(combineVariables.apply(nl));
                                    Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(strList));
                                  }

                                  public TypicalTypes.raw_type<?> apply() {
                                    return Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", s), getNameSpace)));
                                  }
                                }.apply());
                              }
                              break;
                            default:
                              break;
                            };
                          if (true) {
                            return Analyzer.cast(null);
                          }
                          return null;
                        }
                      }.apply());
                    }
                  }.apply());
                }
                return null;
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$298);
            }
            return Analyzer.cast(retValue$298);
          }
          if (TypicalSupport.match$299(arg$121)) {
            final Node name = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node p = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$307 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final String s;
              final TypicalTypes.raw_type<?> t;

              {
                s = Analyzer.cast(getString.apply(name));
                t = Analyzer.cast(Analyzer.cast(lookup4.apply(no, "error", Primitives.concat.apply(Primitives.concat.apply("field ", s), " is undefined"), getNameSpace)));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final TypicalTypes.raw_type<?> arg$300 = Analyzer.cast(t);

                    if ((null == arg$300)) {
                      return null;
                    }
                    if ((null != arg$300))
                                            switch (arg$300.tag()) {
                      case FieldT:
                        if (TypicalSupport.match$98(arg$300)) {
                          final String str = Analyzer.cast(arg$300.getTuple().get1());

                          return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                            final String ps;

                            {
                              ps = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "parent") ? null : Primitives.hasAnnotation.apply(no, "parent") ? new Let<String>() {
                                final String stri;

                                {
                                  stri = Analyzer.cast(getAnnotatedString.apply(no, "parent"));
                                }

                                public String apply() {
                                  return Analyzer.cast(stri);
                                }
                              }.apply() : str);
                            }

                            public TypicalTypes.raw_type<?> apply() {
                              return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                                public TypicalTypes.raw_type<?> apply() {
                                  final Boolean var$303 = Primitives.equal.apply(ps, str);

                                  if ((null != var$303 && !var$303)) {
                                    showMessage("error", Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply("record ", ps), " does not contain the field "), s), null);
                                  }
                                  if ((null == var$303)) {
                                    return null;
                                  }
                                  if (var$303) {
                                    return new Let<TypicalTypes.raw_type<?>>() {
                                      final TypicalTypes.raw_type<?> tp;

                                      {
                                        tp = Analyzer.cast(analyze.apply(p));
                                        new Guard<TypicalTypes.raw_type<?>>() {
                                          public TypicalTypes.raw_type<?> apply() {
                                            if ((null == t)) {
                                              return null;
                                            }
                                            if ((null == tp)) {
                                              return null;
                                            }
                                            if ((null == unify)) {
                                              return null;
                                            }

                                            final TypicalTypes.raw_type<?> result$302 = unify.apply(t, tp);

                                            if ((null == result$302)) {
                                              return Analyzer.cast(error(Primitives.concat.apply(Primitives.concat.apply("type of the pattern does not match with ", "the declared type of field "), s), null));
                                            }
                                            return result$302;
                                          }
                                        }.apply();
                                        Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(retrieveVariables.apply(p)));
                                      }

                                      public TypicalTypes.raw_type<?> apply() {
                                        return Analyzer.cast(t);
                                      }
                                    }.apply();
                                  }
                                  return null;
                                }
                              }.apply());
                            }
                          }.apply());
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(null);
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$307);
            }
            return Analyzer.cast(retValue$307);
          }
          if (TypicalSupport.match$66(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$311 = Analyzer.cast(null == isDefinedLocally.apply(no, getNameSpace) ? null : isDefinedLocally.apply(no, getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
              {
                Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(new Pair<String>(s)));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(Analyzer.cast(lookup2.apply(no, getNameSpace)));
              }
            }.apply() : new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;

              {
                t = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));
                define3.apply(no, t, getNameSpace);
                Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(new Pair<String>(s)));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(t);
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$311);
            }
            return Analyzer.cast(retValue$311);
          }
          if (TypicalSupport.match$6(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$121, 1, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$331 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> ty;
              final Boolean check;

              {
                ty = Analyzer.cast(Analyzer.cast(lookup4.apply(no, "error", Primitives.concat.apply(Primitives.concat.apply("constructor ", s), " is undefined"), getNameSpace)));
                check = Analyzer.cast(Primitives.hasAnnotation.apply(no, "no_binding_check"));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isNotBottom.apply(ty) || !Primitives.isNotBottom.apply(ty) ? null : new Let<TypicalTypes.raw_type<?>>() {
                  final String p;
                  final TypicalTypes.raw_type<?> t;

                  {
                    p = Analyzer.cast(getParent.apply(ty));
                    t = Analyzer.cast(null == Primitives.not.apply(hasTypeVariables.apply(p)) ? null : Primitives.not.apply(hasTypeVariables.apply(p)) ? ty : copy.apply(ty));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                      public TypicalTypes.raw_type<?> apply() {
                        final Pair<Node> arg$313 = Analyzer.cast(nl);

                        if ((null == arg$313)) {
                          return null;
                        }
                        if (TypicalSupport.match$314(arg$313)) {
                          final Pair<Node> pl = Analyzer.cast(Primitives.getChildren(arg$313.get(0), 0, arg$313.get(0).size()));

                          return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                            {
                              Analyzer.discard(null == check || !check ? null : Primitives.annotateList.apply(pl, "no_binding_check", wildt));
                            }

                            public TypicalTypes.raw_type<?> apply() {
                              return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                                public TypicalTypes.raw_type<?> apply() {
                                  final TypicalTypes.raw_type<?> arg$315 = Analyzer.cast(t);

                                  if ((null == arg$315)) {
                                    return null;
                                  }
                                  if ((null != arg$315))
                                                                        switch (arg$315.tag()) {
                                    case ConstructorT:
                                      if (TypicalSupport.match$96(arg$315)) {
                                        final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$315.getTuple().get3());

                                        return Analyzer.cast(null == Primitives.isBottom.apply(ty) ? null : Primitives.isBottom.apply(ty) ? error(Primitives.concat.apply(Primitives.concat.apply("constructor ", s), " must have no children"), null) : new Match<TypicalTypes.raw_type<?>>() {
                                          public TypicalTypes.raw_type<?> apply() {
                                            final TypicalTypes.raw_type<?> arg$317 = Analyzer.cast(ty);

                                            if ((null == arg$317)) {
                                              return null;
                                            }
                                            if ((null != arg$317))
                                                                                            switch (arg$317.tag()) {
                                              case TupleT:
                                                if (TypicalSupport.match$110(arg$317)) {
                                                  final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$317.getTuple().get1());

                                                  return Analyzer.cast(null == Primitives.lessInt.apply(Primitives.length.apply(pl), Primitives.length.apply(tl)) ? null : Primitives.lessInt.apply(Primitives.length.apply(pl), Primitives.length.apply(tl)) ? error(Primitives.concat.apply(Primitives.concat.apply("constructor ", s), " does not have enough children"), null) : null == Primitives.greaterInt.apply(Primitives.length.apply(pl), Primitives.length.apply(tl)) ? null : Primitives.greaterInt.apply(Primitives.length.apply(pl), Primitives.length.apply(tl)) ? error(Primitives.concat.apply(Primitives.concat.apply("constructor ", s), " has too many children"), null) : new Let<TypicalTypes.raw_type<?>>() {
                                                    final TypicalTypes.raw_type<?> res;

                                                    {
                                                      res = Analyzer.cast(processArguments.apply(pl, tl, t));
                                                    }

                                                    public TypicalTypes.raw_type<?> apply() {
                                                      return Analyzer.cast(null == Primitives.isNotBottom.apply(res) || !Primitives.isNotBottom.apply(res) ? null : new Require<TypicalTypes.raw_type<?>>() {
                                                        public TypicalTypes.raw_type<?> apply() {
                                                          final Boolean var$319 = Primitives.or.apply(Primitives.or.apply(Primitives.not.apply(isNodeType.apply(t)), check), checkBindings.apply(pl, BigInteger.valueOf(0), BigInteger.valueOf(0)));

                                                          if ((null != var$319 && !var$319)) {
                                                            showMessage("error", Primitives.concat.apply("bindings in different nodes ***", "in the node pattern"), null);
                                                          }
                                                          if ((null == var$319)) {
                                                            return null;
                                                          }
                                                          if (var$319) {
                                                            return new Let<TypicalTypes.raw_type<?>>() {
                                                              final Pair<String> strList;

                                                              {
                                                                strList = Analyzer.cast(combineVariables.apply(pl));
                                                              }

                                                              public TypicalTypes.raw_type<?> apply() {
                                                                return Analyzer.cast(null == Primitives.isEmpty.apply(strList) ? null : Primitives.isEmpty.apply(strList) ? res : new Let<TypicalTypes.raw_type<?>>() {
                                                                  {
                                                                    Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(strList));
                                                                    Primitives.annotate.apply(no, "has_bindings", wildt);
                                                                  }

                                                                  public TypicalTypes.raw_type<?> apply() {
                                                                    return Analyzer.cast(res);
                                                                  }
                                                                }.apply());
                                                              }
                                                            }.apply();
                                                          }
                                                          return null;
                                                        }
                                                      }.apply());
                                                    }
                                                  }.apply());
                                                }
                                                break;
                                              default:
                                                break;
                                              };
                                            if (true) {
                                              return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                                                public TypicalTypes.raw_type<?> apply() {
                                                  final Boolean var$320 = Primitives.equal.apply(Primitives.length.apply(pl), BigInteger.valueOf(1));

                                                  if ((null != var$320 && !var$320)) {
                                                    showMessage("error", Primitives.concat.apply(s, " must have only one child"), null);
                                                  }
                                                  if ((null == var$320)) {
                                                    return null;
                                                  }
                                                  if (var$320) {
                                                    return new Let<TypicalTypes.raw_type<?>>() {
                                                      final TypicalTypes.raw_type<?> res;

                                                      {
                                                        res = Analyzer.cast(processArguments.apply(pl, new Pair<TypicalTypes.raw_type<?>>(ty), t));
                                                      }

                                                      public TypicalTypes.raw_type<?> apply() {
                                                        return Analyzer.cast(null == Primitives.isNotBottom.apply(res) || !Primitives.isNotBottom.apply(res) ? null : new Let<TypicalTypes.raw_type<?>>() {
                                                          final Pair<String> strList;

                                                          {
                                                            strList = Analyzer.cast(combineVariables.apply(pl));
                                                          }

                                                          public TypicalTypes.raw_type<?> apply() {
                                                            return Analyzer.cast(null == Primitives.isEmpty.apply(strList) ? null : Primitives.isEmpty.apply(strList) ? res : new Let<TypicalTypes.raw_type<?>>() {
                                                              {
                                                                Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(strList));
                                                                Primitives.annotate.apply(no, "has_bindings", wildt);
                                                              }

                                                              public TypicalTypes.raw_type<?> apply() {
                                                                return Analyzer.cast(res);
                                                              }
                                                            }.apply());
                                                          }
                                                        }.apply());
                                                      }
                                                    }.apply();
                                                  }
                                                  return null;
                                                }
                                              }.apply());
                                            }
                                            return null;
                                          }
                                        }.apply());
                                      }
                                      break;
                                    default:
                                      break;
                                    };
                                  if (true) {
                                    return Analyzer.cast(error(Primitives.concat.apply("expected constructor type, found ", getTypeName.apply(t)), null));
                                  }
                                  return null;
                                }
                              }.apply());
                            }
                          }.apply());
                        }
                        if (TypicalSupport.match$323(arg$313)) {
                          return Analyzer.cast(t);
                        }
                        if (TypicalSupport.match$281(arg$313)) {
                          return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              final TypicalTypes.raw_type<?> arg$325 = Analyzer.cast(t);

                              if ((null == arg$325)) {
                                return null;
                              }
                              if ((null != arg$325))
                                                                switch (arg$325.tag()) {
                                case ConstructorT:
                                  if (TypicalSupport.match$96(arg$325)) {
                                    final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$325.getTuple().get3());

                                    return Analyzer.cast(null == Primitives.isBottom.apply(ty) ? null : Primitives.isBottom.apply(ty) ? t : error(Primitives.concat.apply(Primitives.concat.apply("constructor ", s), " does not have enough children"), null));
                                  }
                                  break;
                                default:
                                  break;
                                };
                              if (true) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected constructor type, found ", getTypeName.apply(t)), null));
                              }
                              return null;
                            }
                          }.apply());
                        }
                        if (true) {
                          return Analyzer.cast(null);
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$331);
            }
            return Analyzer.cast(retValue$331);
          }
          if (TypicalSupport.match$332(arg$121)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$335 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final Pair<TypicalTypes.raw_type<?>> tl;

              {
                tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, nl));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : new TypicalTypes.TupleT(tl));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$335);
            }
            return Analyzer.cast(retValue$335);
          }
          if (TypicalSupport.match$336(arg$121)) {
            final Node left = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node right = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$341 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> tl;
              final TypicalTypes.raw_type<?> tr;

              {
                tl = Analyzer.cast(analyze.apply(left));
                tr = Analyzer.cast(analyze.apply(right));
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == tl)) {
                      return null;
                    }
                    if ((null == boolt)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$337 = unify.apply(boolt, tl);

                    if ((null == result$337)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected boolean, found ", getTypeName.apply(tl)), left));
                    }
                    return result$337;
                  }
                }.apply();
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == tr)) {
                      return null;
                    }
                    if ((null == boolt)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$338 = unify.apply(boolt, tr);

                    if ((null == result$338)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected boolean, found ", getTypeName.apply(tr)), right));
                    }
                    return result$338;
                  }
                }.apply();
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(boolt);
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$341);
            }
            return Analyzer.cast(retValue$341);
          }
          if (TypicalSupport.match$342(arg$121)) {
            final Node left = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node right = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$347 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> tl;
              final TypicalTypes.raw_type<?> tr;

              {
                tl = Analyzer.cast(analyze.apply(left));
                tr = Analyzer.cast(analyze.apply(right));
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == tl)) {
                      return null;
                    }
                    if ((null == boolt)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$343 = unify.apply(boolt, tl);

                    if ((null == result$343)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected boolean, found ", getTypeName.apply(tl)), left));
                    }
                    return result$343;
                  }
                }.apply();
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == tr)) {
                      return null;
                    }
                    if ((null == boolt)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$344 = unify.apply(boolt, tr);

                    if ((null == result$344)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected boolean, found ", getTypeName.apply(tr)), right));
                    }
                    return result$344;
                  }
                }.apply();
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(boolt);
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$347);
            }
            return Analyzer.cast(retValue$347);
          }
          if (TypicalSupport.match$348(arg$121)) {
            final Node left = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node right = (arg$121.size() > 2 ? arg$121.getGeneric(2) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$352 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> tl;
              final TypicalTypes.raw_type<?> tr;

              {
                tl = Analyzer.cast(analyze.apply(left));
                tr = Analyzer.cast(analyze.apply(right));
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == tl)) {
                      return null;
                    }
                    if ((null == tr)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$349 = unify.apply(tl, tr);

                    if ((null == result$349)) {
                      return Analyzer.cast(error(Primitives.concat.apply("types of left and right expressions", " do not match"), null));
                    }
                    return result$349;
                  }
                }.apply();
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(boolt);
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$352);
            }
            return Analyzer.cast(retValue$352);
          }
          if (TypicalSupport.match$353(arg$121)) {
            final Node left = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final String s = (arg$121.size() > 1 ? arg$121.getString(1) : null);
            final Node right = (arg$121.size() > 2 ? arg$121.getGeneric(2) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$368 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> tl;
              final TypicalTypes.raw_type<?> tr;

              {
                tl = Analyzer.cast(analyze.apply(left));
                tr = Analyzer.cast(analyze.apply(right));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final String arg$354 = Analyzer.cast(s);

                    if ((null == arg$354)) {
                      return null;
                    }
                    if ((null != "<=" && "<=".equals(arg$354))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$355 = unify.apply(tl, intt);

                              if ((null == result$355)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$355;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$356 = unify.apply(tr, intt);

                              if ((null == result$356)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$356;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(boolt);
                        }
                      }.apply());
                    }
                    if ((null != "<" && "<".equals(arg$354))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$357 = unify.apply(tl, intt);

                              if ((null == result$357)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$357;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$358 = unify.apply(tr, intt);

                              if ((null == result$358)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$358;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(boolt);
                        }
                      }.apply());
                    }
                    if ((null != ">=" && ">=".equals(arg$354))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$359 = unify.apply(tl, intt);

                              if ((null == result$359)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$359;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$360 = unify.apply(tr, intt);

                              if ((null == result$360)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$360;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(boolt);
                        }
                      }.apply());
                    }
                    if ((null != ">" && ">".equals(arg$354))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$361 = unify.apply(tl, intt);

                              if ((null == result$361)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$361;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$362 = unify.apply(tr, intt);

                              if ((null == result$362)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$362;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(boolt);
                        }
                      }.apply());
                    }
                    if (true) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == floatt)) {
                                return null;
                              }
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$363 = unify.apply(tl, floatt);

                              if ((null == result$363)) {
                                return Analyzer.cast(error(Primitives.concat.apply(Primitives.concat.apply("expected 64-bit float", ", found "), getTypeName.apply(tl)), left));
                              }
                              return result$363;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == floatt)) {
                                return null;
                              }
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$364 = unify.apply(tr, floatt);

                              if ((null == result$364)) {
                                return Analyzer.cast(error(Primitives.concat.apply(Primitives.concat.apply("expected 64-bit float", ", found "), getTypeName.apply(tr)), right));
                              }
                              return result$364;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(boolt);
                        }
                      }.apply());
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$368);
            }
            return Analyzer.cast(retValue$368);
          }
          if (TypicalSupport.match$369(arg$121)) {
            final Node left = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final String s = (arg$121.size() > 1 ? arg$121.getString(1) : null);
            final Node right = (arg$121.size() > 2 ? arg$121.getGeneric(2) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$386 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> tl;
              final TypicalTypes.raw_type<?> tr;

              {
                tl = Analyzer.cast(analyze.apply(left));
                tr = Analyzer.cast(analyze.apply(right));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final String arg$370 = Analyzer.cast(s);

                    if ((null == arg$370)) {
                      return null;
                    }
                    if ((null != "+" && "+".equals(arg$370))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$371 = unify.apply(tl, intt);

                              if ((null == result$371)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$371;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$372 = unify.apply(tr, intt);

                              if ((null == result$372)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$372;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(intt);
                        }
                      }.apply());
                    }
                    if ((null != "-" && "-".equals(arg$370))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$373 = unify.apply(tl, intt);

                              if ((null == result$373)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$373;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$374 = unify.apply(tr, intt);

                              if ((null == result$374)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$374;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(intt);
                        }
                      }.apply());
                    }
                    if ((null != "*" && "*".equals(arg$370))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$375 = unify.apply(tl, intt);

                              if ((null == result$375)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$375;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$376 = unify.apply(tr, intt);

                              if ((null == result$376)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$376;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(intt);
                        }
                      }.apply());
                    }
                    if ((null != "/" && "/".equals(arg$370))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$377 = unify.apply(tl, intt);

                              if ((null == result$377)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$377;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$378 = unify.apply(tr, intt);

                              if ((null == result$378)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$378;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(intt);
                        }
                      }.apply());
                    }
                    if ((null != "%" && "%".equals(arg$370))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$379 = unify.apply(tl, intt);

                              if ((null == result$379)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$379;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$380 = unify.apply(tr, intt);

                              if ((null == result$380)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$380;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(intt);
                        }
                      }.apply());
                    }
                    if (true) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == floatt)) {
                                return null;
                              }
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$381 = unify.apply(tl, floatt);

                              if ((null == result$381)) {
                                return Analyzer.cast(error(Primitives.concat.apply(Primitives.concat.apply("expected 64-bit float", ", found "), getTypeName.apply(tl)), left));
                              }
                              return result$381;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == floatt)) {
                                return null;
                              }
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$382 = unify.apply(tr, floatt);

                              if ((null == result$382)) {
                                return Analyzer.cast(error(Primitives.concat.apply(Primitives.concat.apply("expected 64-bit float", ", found "), getTypeName.apply(tr)), right));
                              }
                              return result$382;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(floatt);
                        }
                      }.apply());
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$386);
            }
            return Analyzer.cast(retValue$386);
          }
          if (TypicalSupport.match$387(arg$121)) {
            final Node left = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final String s = (arg$121.size() > 1 ? arg$121.getString(1) : null);
            final Node right = (arg$121.size() > 2 ? arg$121.getGeneric(2) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$404 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> tl;
              final TypicalTypes.raw_type<?> tr;

              {
                tl = Analyzer.cast(analyze.apply(left));
                tr = Analyzer.cast(analyze.apply(right));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final String arg$388 = Analyzer.cast(s);

                    if ((null == arg$388)) {
                      return null;
                    }
                    if ((null != "+" && "+".equals(arg$388))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$389 = unify.apply(tl, intt);

                              if ((null == result$389)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$389;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$390 = unify.apply(tr, intt);

                              if ((null == result$390)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$390;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(intt);
                        }
                      }.apply());
                    }
                    if ((null != "-" && "-".equals(arg$388))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$391 = unify.apply(tl, intt);

                              if ((null == result$391)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$391;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$392 = unify.apply(tr, intt);

                              if ((null == result$392)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$392;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(intt);
                        }
                      }.apply());
                    }
                    if ((null != "*" && "*".equals(arg$388))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$393 = unify.apply(tl, intt);

                              if ((null == result$393)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$393;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$394 = unify.apply(tr, intt);

                              if ((null == result$394)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$394;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(intt);
                        }
                      }.apply());
                    }
                    if ((null != "/" && "/".equals(arg$388))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$395 = unify.apply(tl, intt);

                              if ((null == result$395)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$395;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$396 = unify.apply(tr, intt);

                              if ((null == result$396)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$396;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(intt);
                        }
                      }.apply());
                    }
                    if ((null != "%" && "%".equals(arg$388))) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$397 = unify.apply(tl, intt);

                              if ((null == result$397)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tl)), left));
                              }
                              return result$397;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == intt)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$398 = unify.apply(tr, intt);

                              if ((null == result$398)) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected integer, found ", getTypeName.apply(tr)), right));
                              }
                              return result$398;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(intt);
                        }
                      }.apply());
                    }
                    if (true) {
                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                        {
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == floatt)) {
                                return null;
                              }
                              if ((null == tl)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$399 = unify.apply(tl, floatt);

                              if ((null == result$399)) {
                                return Analyzer.cast(error(Primitives.concat.apply(Primitives.concat.apply("expected 64-bit float", ", found "), getTypeName.apply(tl)), left));
                              }
                              return result$399;
                            }
                          }.apply();
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == floatt)) {
                                return null;
                              }
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$400 = unify.apply(tr, floatt);

                              if ((null == result$400)) {
                                return Analyzer.cast(error(Primitives.concat.apply(Primitives.concat.apply("expected 64-bit float", ", found "), getTypeName.apply(tr)), right));
                              }
                              return result$400;
                            }
                          }.apply();
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(floatt);
                        }
                      }.apply());
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$404);
            }
            return Analyzer.cast(retValue$404);
          }
          if (TypicalSupport.match$405(arg$121)) {
            final Node left = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node right = (arg$121.size() > 2 ? arg$121.getGeneric(2) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$410 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> tl;
              final TypicalTypes.raw_type<?> tr;

              {
                tl = Analyzer.cast(analyze.apply(left));
                tr = Analyzer.cast(analyze.apply(right));
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == tl)) {
                      return null;
                    }
                    if ((null == strt)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$406 = unify.apply(tl, strt);

                    if ((null == result$406)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(tl)), left));
                    }
                    return result$406;
                  }
                }.apply();
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == tr)) {
                      return null;
                    }
                    if ((null == strt)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$407 = unify.apply(tr, strt);

                    if ((null == result$407)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(tr)), right));
                    }
                    return result$407;
                  }
                }.apply();
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(strt);
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$410);
            }
            return Analyzer.cast(retValue$410);
          }
          if (TypicalSupport.match$411(arg$121)) {
            final Node n = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node con = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$415 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;
              final TypicalTypes.raw_type<?> tl;

              {
                t = Analyzer.cast(analyze.apply(n));
                tl = Analyzer.cast(analyze.apply(con));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.and.apply(Primitives.isNotBottom.apply(t), Primitives.isNotBottom.apply(tl)) || !Primitives.and.apply(Primitives.isNotBottom.apply(t), Primitives.isNotBottom.apply(tl)) ? null : null == isListType.apply(tl) ? null : isListType.apply(tl) ? new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> res;

                  {
                    res = Analyzer.cast(unify.apply(tl, new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(t), "list")));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                      public TypicalTypes.raw_type<?> apply() {
                        final Boolean var$412 = Primitives.isNotBottom.apply(res);

                        if ((null != var$412 && !var$412)) {
                          showMessage("error", "type of the head does not match type of the tail", null);
                        }
                        if ((null == var$412)) {
                          return null;
                        }
                        if (var$412) {
                          return res;
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply() : error("the tail of a cons expression must be a list", null));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$415);
            }
            return Analyzer.cast(retValue$415);
          }
          if (TypicalSupport.match$416(arg$121)) {
            final Pair<Node> pl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$545 = Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
              public TypicalTypes.raw_type<?> apply() {
                final Pair<Node> arg$417 = Analyzer.cast(pl);

                if ((null == arg$417)) {
                  return null;
                }
                if (TypicalSupport.match$418(arg$417)) {
                  final Node mod = Analyzer.cast(arg$417.get(0));
                  final Node name = Analyzer.cast(arg$417.get(1));
                  final Node args = Analyzer.cast(arg$417.get(2));

                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                    final String mol;
                    final String s;
                    final Pair<Node> nl;

                    {
                      mol = Analyzer.cast(getString.apply(mod));
                      s = Analyzer.cast(getString.apply(name));
                      nl = Analyzer.cast(getNodeList.apply(args));
                    }

                    public TypicalTypes.raw_type<?> apply() {
                      return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                        public TypicalTypes.raw_type<?> apply() {
                          final String arg$419 = Analyzer.cast(mol);

                          if ((null == arg$419)) {
                            return null;
                          }
                          if ((null != "List" && "List".equals(arg$419))) {
                            return Analyzer.cast(null == isDefined.apply(GNode.create("Parameter", Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), null), getNameSpace) ? null : isDefined.apply(GNode.create("Parameter", Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), null), getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
                              final TypicalTypes.raw_type<?> funcType;

                              {
                                funcType = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("Parameter", Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), null), getNameSpace)));
                              }

                              public TypicalTypes.raw_type<?> apply() {
                                return Analyzer.cast(processFunctionApplication.apply(copy.apply(funcType), nl));
                              }
                            }.apply() : error(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), " is undefined"), null));
                          }
                          if ((null != "String" && "String".equals(arg$419))) {
                            return Analyzer.cast(null == isDefined.apply(GNode.create("Parameter", Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), null), getNameSpace) ? null : isDefined.apply(GNode.create("Parameter", Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), null), getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
                              final TypicalTypes.raw_type<?> funcType;

                              {
                                funcType = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("Parameter", Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), null), getNameSpace)));
                              }

                              public TypicalTypes.raw_type<?> apply() {
                                return Analyzer.cast(processFunctionApplication.apply(copy.apply(funcType), nl));
                              }
                            }.apply() : error(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), " is undefined"), null));
                          }
                          if ((null != "Map" && "Map".equals(arg$419))) {
                            return Analyzer.cast(null == isDefined.apply(GNode.create("Parameter", Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), null), getNameSpace) ? null : isDefined.apply(GNode.create("Parameter", Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), null), getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
                              final TypicalTypes.raw_type<?> funcType;

                              {
                                funcType = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("Parameter", Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), null), getNameSpace)));
                              }

                              public TypicalTypes.raw_type<?> apply() {
                                return Analyzer.cast(processFunctionApplication.apply(copy.apply(funcType), nl));
                              }
                            }.apply() : error(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), " is undefined"), null));
                          }
                          if ((null != "Float32" && "Float32".equals(arg$419))) {
                            return Analyzer.cast(null == isDefined.apply(GNode.create("Parameter", Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), null), getNameSpace) ? null : isDefined.apply(GNode.create("Parameter", Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), null), getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
                              final TypicalTypes.raw_type<?> funcType;

                              {
                                funcType = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("Parameter", Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), null), getNameSpace)));
                              }

                              public TypicalTypes.raw_type<?> apply() {
                                return Analyzer.cast(processFunctionApplication.apply(copy.apply(funcType), nl));
                              }
                            }.apply() : error(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), " is undefined"), null));
                          }
                          if ((null != "Prelude" && "Prelude".equals(arg$419))) {
                            return Analyzer.cast(null == isDefined.apply(GNode.create("Parameter", s, null), getNameSpace) ? null : isDefined.apply(GNode.create("Parameter", s, null), getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
                              final TypicalTypes.raw_type<?> funcType;

                              {
                                funcType = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("Parameter", s, null), getNameSpace)));
                              }

                              public TypicalTypes.raw_type<?> apply() {
                                return Analyzer.cast(processFunctionApplication.apply(copy.apply(funcType), nl));
                              }
                            }.apply() : error(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(mol, "."), s), " is undefined"), null));
                          }
                          if (true) {
                            return Analyzer.cast(error(Primitives.concat.apply(Primitives.concat.apply("module ", mol), " is undefined"), null));
                          }
                          return null;
                        }
                      }.apply());
                    }
                  }.apply());
                }
                if (TypicalSupport.match$421(arg$417)) {
                  final Node name = Analyzer.cast(arg$417.get(0));
                  final Node args = Analyzer.cast(arg$417.get(1));

                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                    final String s;
                    final Pair<Node> nl;

                    {
                      s = Analyzer.cast(getString.apply(name));
                      nl = Analyzer.cast(getNodeList.apply(args));
                    }

                    public TypicalTypes.raw_type<?> apply() {
                      return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                        public TypicalTypes.raw_type<?> apply() {
                          final String arg$422 = Analyzer.cast(s);

                          if ((null == arg$422)) {
                            return null;
                          }
                          if ((null != "lookup" && "lookup".equals(arg$422))) {
                            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                              public TypicalTypes.raw_type<?> apply() {
                                final Pair<Node> arg$423 = Analyzer.cast(nl);

                                if ((null == arg$423)) {
                                  return null;
                                }
                                if (TypicalSupport.match$424(arg$423)) {
                                  final Node e1 = Analyzer.cast(arg$423.get(0));
                                  final Node strNode = Analyzer.cast(arg$423.get(1));
                                  final Node errNode = Analyzer.cast(arg$423.get(2));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final String str;
                                    final Node e2;
                                    final TypicalTypes.raw_type<?> t1;
                                    final TypicalTypes.raw_type<?> t2;

                                    {
                                      str = Analyzer.cast(getString.apply(strNode));
                                      e2 = Analyzer.cast(new Match<Node>() {
                                        public Node apply() {
                                          final Node arg$426 = GNode.cast(errNode);

                                          if ((null == arg$426)) {
                                            return null;
                                          }
                                          if (TypicalSupport.match$427(arg$426)) {
                                            final Node ne = (arg$426.size() > 1 ? arg$426.getGeneric(1) : null);

                                            matching_nodes.add(arg$426);
                                            if ((null != arg$426 && processScopeNodes.contains(arg$426.getName()))) {
                                              processScope(arg$426, getScope);
                                            }
                                            checkEnterScope(arg$426);

                                            final Object retValue$430 = Analyzer.cast(ne);

                                            checkExitScope(arg$426);
                                            matching_nodes.remove(matching_nodes.size() - 1);
                                            return Analyzer.cast(retValue$430);
                                          }
                                          if (true) {
                                            matching_nodes.add(arg$426);
                                            if ((null != arg$426 && processScopeNodes.contains(arg$426.getName()))) {
                                              processScope(arg$426, getScope);
                                            }
                                            checkEnterScope(arg$426);

                                            final Object retValue$433 = Analyzer.cast(error("ErrorClause is expected", null));

                                            checkExitScope(arg$426);
                                            matching_nodes.remove(matching_nodes.size() - 1);
                                            return Analyzer.cast(retValue$433);
                                          }
                                          return null;
                                        }
                                      }.apply());
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      t2 = Analyzer.cast(analyze.apply(e2));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$435 = ensureNodeType.apply(t1);

                                          if ((null == result$435)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$435;
                                        }
                                      }.apply();
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == t2)) {
                                            return null;
                                          }
                                          if ((null == strt)) {
                                            return null;
                                          }
                                          if ((null == unify)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$436 = unify.apply(t2, strt);

                                          if ((null == result$436)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(t2)), e2));
                                          }
                                          return result$436;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          final Boolean var$425 = isDefined.apply(GNode.create("UserDefinedType", Primitives.concat.apply("tag", str)), getNameSpace);

                                          if ((null != var$425 && !var$425)) {
                                            showMessage("error", Primitives.concat.apply(Primitives.concat.apply("tag ", str), " is undefined"), null);
                                          }
                                          if ((null == var$425)) {
                                            return null;
                                          }
                                          if (var$425) {
                                            return Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", Primitives.concat.apply("tag", str)), getNameSpace));
                                          }
                                          return null;
                                        }
                                      }.apply());
                                    }
                                  }.apply());
                                }
                                if (TypicalSupport.match$437(arg$423)) {
                                  final Node e1 = Analyzer.cast(arg$423.get(0));
                                  final Node errNode = Analyzer.cast(arg$423.get(1));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final Node e2;
                                    final TypicalTypes.raw_type<?> t1;
                                    final TypicalTypes.raw_type<?> t2;

                                    {
                                      e2 = Analyzer.cast(new Match<Node>() {
                                        public Node apply() {
                                          final Node arg$438 = GNode.cast(errNode);

                                          if ((null == arg$438)) {
                                            return null;
                                          }
                                          if (TypicalSupport.match$427(arg$438)) {
                                            final Node ne = (arg$438.size() > 1 ? arg$438.getGeneric(1) : null);

                                            matching_nodes.add(arg$438);
                                            if ((null != arg$438 && processScopeNodes.contains(arg$438.getName()))) {
                                              processScope(arg$438, getScope);
                                            }
                                            checkEnterScope(arg$438);

                                            final Object retValue$442 = Analyzer.cast(ne);

                                            checkExitScope(arg$438);
                                            matching_nodes.remove(matching_nodes.size() - 1);
                                            return Analyzer.cast(retValue$442);
                                          }
                                          if (true) {
                                            matching_nodes.add(arg$438);
                                            if ((null != arg$438 && processScopeNodes.contains(arg$438.getName()))) {
                                              processScope(arg$438, getScope);
                                            }
                                            checkEnterScope(arg$438);

                                            final Object retValue$445 = Analyzer.cast(error("ErrorClause is expected", null));

                                            checkExitScope(arg$438);
                                            matching_nodes.remove(matching_nodes.size() - 1);
                                            return Analyzer.cast(retValue$445);
                                          }
                                          return null;
                                        }
                                      }.apply());
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      t2 = Analyzer.cast(analyze.apply(e2));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$447 = ensureNodeType.apply(t1);

                                          if ((null == result$447)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("node is expedted, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$447;
                                        }
                                      }.apply();
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == t2)) {
                                            return null;
                                          }
                                          if ((null == strt)) {
                                            return null;
                                          }
                                          if ((null == unify)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$448 = unify.apply(t2, strt);

                                          if ((null == result$448)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(t2)), e2));
                                          }
                                          return result$448;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(typet);
                                    }
                                  }.apply());
                                }
                                if (TypicalSupport.match$449(arg$423)) {
                                  final Node e1 = Analyzer.cast(arg$423.get(0));
                                  final Node strNode = Analyzer.cast(arg$423.get(1));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final TypicalTypes.raw_type<?> t1;
                                    final String str;

                                    {
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      str = Analyzer.cast(getString.apply(strNode));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$451 = ensureNodeType.apply(t1);

                                          if ((null == result$451)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$451;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          final Boolean var$450 = isDefined.apply(GNode.create("UserDefinedType", Primitives.concat.apply("tag", str)), getNameSpace);

                                          if ((null != var$450 && !var$450)) {
                                            showMessage("error", Primitives.concat.apply(Primitives.concat.apply("tag ", str), " is undefined"), null);
                                          }
                                          if ((null == var$450)) {
                                            return null;
                                          }
                                          if (var$450) {
                                            return Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", Primitives.concat.apply("tag", str)), getNameSpace));
                                          }
                                          return null;
                                        }
                                      }.apply());
                                    }
                                  }.apply());
                                }
                                if (TypicalSupport.match$452(arg$423)) {
                                  final Node e1 = Analyzer.cast(arg$423.get(0));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final TypicalTypes.raw_type<?> t1;

                                    {
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$453 = ensureNodeType.apply(t1);

                                          if ((null == result$453)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$453;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(typet);
                                    }
                                  }.apply());
                                }
                                if (true) {
                                  return Analyzer.cast(error(Primitives.concat.apply(s, " is applied with invalid arguments"), null));
                                }
                                return null;
                              }
                            }.apply());
                          }
                          if ((null != "lookup_locally" && "lookup_locally".equals(arg$422))) {
                            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                              public TypicalTypes.raw_type<?> apply() {
                                final Pair<Node> arg$455 = Analyzer.cast(nl);

                                if ((null == arg$455)) {
                                  return null;
                                }
                                if (TypicalSupport.match$424(arg$455)) {
                                  final Node e1 = Analyzer.cast(arg$455.get(0));
                                  final Node strNode = Analyzer.cast(arg$455.get(1));
                                  final Node errNode = Analyzer.cast(arg$455.get(2));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final String str;
                                    final Node e2;
                                    final TypicalTypes.raw_type<?> t1;
                                    final TypicalTypes.raw_type<?> t2;

                                    {
                                      str = Analyzer.cast(getString.apply(strNode));
                                      e2 = Analyzer.cast(new Match<Node>() {
                                        public Node apply() {
                                          final Node arg$458 = GNode.cast(errNode);

                                          if ((null == arg$458)) {
                                            return null;
                                          }
                                          if (TypicalSupport.match$427(arg$458)) {
                                            final Node ne = (arg$458.size() > 1 ? arg$458.getGeneric(1) : null);

                                            matching_nodes.add(arg$458);
                                            if ((null != arg$458 && processScopeNodes.contains(arg$458.getName()))) {
                                              processScope(arg$458, getScope);
                                            }
                                            checkEnterScope(arg$458);

                                            final Object retValue$462 = Analyzer.cast(ne);

                                            checkExitScope(arg$458);
                                            matching_nodes.remove(matching_nodes.size() - 1);
                                            return Analyzer.cast(retValue$462);
                                          }
                                          if (true) {
                                            matching_nodes.add(arg$458);
                                            if ((null != arg$458 && processScopeNodes.contains(arg$458.getName()))) {
                                              processScope(arg$458, getScope);
                                            }
                                            checkEnterScope(arg$458);

                                            final Object retValue$465 = Analyzer.cast(error("ErrorClause is expected", null));

                                            checkExitScope(arg$458);
                                            matching_nodes.remove(matching_nodes.size() - 1);
                                            return Analyzer.cast(retValue$465);
                                          }
                                          return null;
                                        }
                                      }.apply());
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      t2 = Analyzer.cast(analyze.apply(e2));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$467 = ensureNodeType.apply(t1);

                                          if ((null == result$467)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$467;
                                        }
                                      }.apply();
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == t2)) {
                                            return null;
                                          }
                                          if ((null == strt)) {
                                            return null;
                                          }
                                          if ((null == unify)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$468 = unify.apply(t2, strt);

                                          if ((null == result$468)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(t2)), e2));
                                          }
                                          return result$468;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          final Boolean var$457 = isDefined.apply(GNode.create("UserDefinedType", Primitives.concat.apply("tag", str)), getNameSpace);

                                          if ((null != var$457 && !var$457)) {
                                            showMessage("error", Primitives.concat.apply(Primitives.concat.apply("tag ", str), " is undefined"), null);
                                          }
                                          if ((null == var$457)) {
                                            return null;
                                          }
                                          if (var$457) {
                                            return Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", Primitives.concat.apply("tag", str)), getNameSpace));
                                          }
                                          return null;
                                        }
                                      }.apply());
                                    }
                                  }.apply());
                                }
                                if (TypicalSupport.match$437(arg$455)) {
                                  final Node e1 = Analyzer.cast(arg$455.get(0));
                                  final Node errNode = Analyzer.cast(arg$455.get(1));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final Node e2;
                                    final TypicalTypes.raw_type<?> t1;
                                    final TypicalTypes.raw_type<?> t2;

                                    {
                                      e2 = Analyzer.cast(new Match<Node>() {
                                        public Node apply() {
                                          final Node arg$470 = GNode.cast(errNode);

                                          if ((null == arg$470)) {
                                            return null;
                                          }
                                          if (TypicalSupport.match$427(arg$470)) {
                                            final Node ne = (arg$470.size() > 1 ? arg$470.getGeneric(1) : null);

                                            matching_nodes.add(arg$470);
                                            if ((null != arg$470 && processScopeNodes.contains(arg$470.getName()))) {
                                              processScope(arg$470, getScope);
                                            }
                                            checkEnterScope(arg$470);

                                            final Object retValue$474 = Analyzer.cast(ne);

                                            checkExitScope(arg$470);
                                            matching_nodes.remove(matching_nodes.size() - 1);
                                            return Analyzer.cast(retValue$474);
                                          }
                                          if (true) {
                                            matching_nodes.add(arg$470);
                                            if ((null != arg$470 && processScopeNodes.contains(arg$470.getName()))) {
                                              processScope(arg$470, getScope);
                                            }
                                            checkEnterScope(arg$470);

                                            final Object retValue$477 = Analyzer.cast(error("ErrorClause is expected", null));

                                            checkExitScope(arg$470);
                                            matching_nodes.remove(matching_nodes.size() - 1);
                                            return Analyzer.cast(retValue$477);
                                          }
                                          return null;
                                        }
                                      }.apply());
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      t2 = Analyzer.cast(analyze.apply(e2));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$479 = ensureNodeType.apply(t1);

                                          if ((null == result$479)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("node is expedted, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$479;
                                        }
                                      }.apply();
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == t2)) {
                                            return null;
                                          }
                                          if ((null == strt)) {
                                            return null;
                                          }
                                          if ((null == unify)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$480 = unify.apply(t2, strt);

                                          if ((null == result$480)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(t2)), e2));
                                          }
                                          return result$480;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(typet);
                                    }
                                  }.apply());
                                }
                                if (TypicalSupport.match$449(arg$455)) {
                                  final Node e1 = Analyzer.cast(arg$455.get(0));
                                  final Node strNode = Analyzer.cast(arg$455.get(1));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final TypicalTypes.raw_type<?> t1;
                                    final String str;

                                    {
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      str = Analyzer.cast(getString.apply(strNode));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$483 = ensureNodeType.apply(t1);

                                          if ((null == result$483)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$483;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          final Boolean var$482 = isDefined.apply(GNode.create("UserDefinedType", Primitives.concat.apply("tag", str)), getNameSpace);

                                          if ((null != var$482 && !var$482)) {
                                            showMessage("error", Primitives.concat.apply(Primitives.concat.apply("tag ", str), " is undefined"), null);
                                          }
                                          if ((null == var$482)) {
                                            return null;
                                          }
                                          if (var$482) {
                                            return Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", Primitives.concat.apply("tag", str)), getNameSpace));
                                          }
                                          return null;
                                        }
                                      }.apply());
                                    }
                                  }.apply());
                                }
                                if (TypicalSupport.match$452(arg$455)) {
                                  final Node e1 = Analyzer.cast(arg$455.get(0));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final TypicalTypes.raw_type<?> t1;

                                    {
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$485 = ensureNodeType.apply(t1);

                                          if ((null == result$485)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$485;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(typet);
                                    }
                                  }.apply());
                                }
                                if (true) {
                                  return Analyzer.cast(error(Primitives.concat.apply(s, " is applied with invalid arguments"), null));
                                }
                                return null;
                              }
                            }.apply());
                          }
                          if ((null != "define" && "define".equals(arg$422))) {
                            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                              public TypicalTypes.raw_type<?> apply() {
                                final Pair<Node> arg$487 = Analyzer.cast(nl);

                                if ((null == arg$487)) {
                                  return null;
                                }
                                if (TypicalSupport.match$424(arg$487)) {
                                  final Node e1 = Analyzer.cast(arg$487.get(0));
                                  final Node e2 = Analyzer.cast(arg$487.get(1));
                                  final Node errNode = Analyzer.cast(arg$487.get(2));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final Node e3;
                                    final TypicalTypes.raw_type<?> t1;
                                    final TypicalTypes.raw_type<?> t3;

                                    {
                                      e3 = Analyzer.cast(new Match<Node>() {
                                        public Node apply() {
                                          final Node arg$489 = GNode.cast(errNode);

                                          if ((null == arg$489)) {
                                            return null;
                                          }
                                          if (TypicalSupport.match$427(arg$489)) {
                                            final Node ne = (arg$489.size() > 1 ? arg$489.getGeneric(1) : null);

                                            matching_nodes.add(arg$489);
                                            if ((null != arg$489 && processScopeNodes.contains(arg$489.getName()))) {
                                              processScope(arg$489, getScope);
                                            }
                                            checkEnterScope(arg$489);

                                            final Object retValue$493 = Analyzer.cast(ne);

                                            checkExitScope(arg$489);
                                            matching_nodes.remove(matching_nodes.size() - 1);
                                            return Analyzer.cast(retValue$493);
                                          }
                                          if (true) {
                                            matching_nodes.add(arg$489);
                                            if ((null != arg$489 && processScopeNodes.contains(arg$489.getName()))) {
                                              processScope(arg$489, getScope);
                                            }
                                            checkEnterScope(arg$489);

                                            final Object retValue$496 = Analyzer.cast(error("ErrorClause is expected", null));

                                            checkExitScope(arg$489);
                                            matching_nodes.remove(matching_nodes.size() - 1);
                                            return Analyzer.cast(retValue$496);
                                          }
                                          return null;
                                        }
                                      }.apply());
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      analyze.apply(e2);
                                      t3 = Analyzer.cast(analyze.apply(e3));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$498 = ensureNodeType.apply(t1);

                                          if ((null == result$498)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$498;
                                        }
                                      }.apply();
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == t3)) {
                                            return null;
                                          }
                                          if ((null == strt)) {
                                            return null;
                                          }
                                          if ((null == unify)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$499 = unify.apply(t3, strt);

                                          if ((null == result$499)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(t3)), e3));
                                          }
                                          return result$499;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(wildt);
                                    }
                                  }.apply());
                                }
                                if (TypicalSupport.match$421(arg$487)) {
                                  final Node e1 = Analyzer.cast(arg$487.get(0));
                                  final Node e2 = Analyzer.cast(arg$487.get(1));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final TypicalTypes.raw_type<?> t1;

                                    {
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      analyze.apply(e2);
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$501 = ensureNodeType.apply(t1);

                                          if ((null == result$501)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$501;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(wildt);
                                    }
                                  }.apply());
                                }
                                if (true) {
                                  return Analyzer.cast(error(Primitives.concat.apply(s, " is applied with invalid arguments"), null));
                                }
                                return null;
                              }
                            }.apply());
                          }
                          if ((null != "redefine" && "redefine".equals(arg$422))) {
                            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                              public TypicalTypes.raw_type<?> apply() {
                                final Pair<Node> arg$503 = Analyzer.cast(nl);

                                if ((null == arg$503)) {
                                  return null;
                                }
                                if (TypicalSupport.match$421(arg$503)) {
                                  final Node e1 = Analyzer.cast(arg$503.get(0));
                                  final Node e2 = Analyzer.cast(arg$503.get(1));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final TypicalTypes.raw_type<?> t1;

                                    {
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      analyze.apply(e2);
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$505 = ensureNodeType.apply(t1);

                                          if ((null == result$505)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$505;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(wildt);
                                    }
                                  }.apply());
                                }
                                if (true) {
                                  return Analyzer.cast(error(Primitives.concat.apply(s, " is applied with invalid arguments"), null));
                                }
                                return null;
                              }
                            }.apply());
                          }
                          if ((null != "is_defined" && "is_defined".equals(arg$422))) {
                            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                              public TypicalTypes.raw_type<?> apply() {
                                final Pair<Node> arg$507 = Analyzer.cast(nl);

                                if ((null == arg$507)) {
                                  return null;
                                }
                                if (TypicalSupport.match$452(arg$507)) {
                                  final Node e1 = Analyzer.cast(arg$507.get(0));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final TypicalTypes.raw_type<?> t1;

                                    {
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$509 = ensureNodeType.apply(t1);

                                          if ((null == result$509)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$509;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(boolt);
                                    }
                                  }.apply());
                                }
                                if (true) {
                                  return Analyzer.cast(error(Primitives.concat.apply(s, "must have one argument"), null));
                                }
                                return null;
                              }
                            }.apply());
                          }
                          if ((null != "is_defined_locally" && "is_defined_locally".equals(arg$422))) {
                            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                              public TypicalTypes.raw_type<?> apply() {
                                final Pair<Node> arg$511 = Analyzer.cast(nl);

                                if ((null == arg$511)) {
                                  return null;
                                }
                                if (TypicalSupport.match$452(arg$511)) {
                                  final Node e1 = Analyzer.cast(arg$511.get(0));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final TypicalTypes.raw_type<?> t1;

                                    {
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$513 = ensureNodeType.apply(t1);

                                          if ((null == result$513)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$513;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(boolt);
                                    }
                                  }.apply());
                                }
                                if (true) {
                                  return Analyzer.cast(error(Primitives.concat.apply(s, "must have one argument"), null));
                                }
                                return null;
                              }
                            }.apply());
                          }
                          if ((null != "annotate" && "annotate".equals(arg$422))) {
                            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                              public TypicalTypes.raw_type<?> apply() {
                                final Pair<Node> arg$515 = Analyzer.cast(nl);

                                if ((null == arg$515)) {
                                  return null;
                                }
                                if (TypicalSupport.match$418(arg$515)) {
                                  final Node e1 = Analyzer.cast(arg$515.get(0));
                                  final Node e2 = Analyzer.cast(arg$515.get(1));
                                  final Node e3 = Analyzer.cast(arg$515.get(2));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final TypicalTypes.raw_type<?> t1;
                                    final TypicalTypes.raw_type<?> t2;
                                    final TypicalTypes.raw_type<?> t3;

                                    {
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      t2 = Analyzer.cast(analyze.apply(e2));
                                      t3 = Analyzer.cast(analyze.apply(e3));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$517 = ensureNodeType.apply(t1);

                                          if ((null == result$517)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$517;
                                        }
                                      }.apply();
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == t2)) {
                                            return null;
                                          }
                                          if ((null == strt)) {
                                            return null;
                                          }
                                          if ((null == unify)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$518 = unify.apply(t2, strt);

                                          if ((null == result$518)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(t2)), e2));
                                          }
                                          return result$518;
                                        }
                                      }.apply();
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == t3)) {
                                            return null;
                                          }
                                          if ((null == unify)) {
                                            return null;
                                          }
                                          if ((null == typet)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$519 = unify.apply(t3, typet);

                                          if ((null == result$519)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected type, found ", getTypeName.apply(t3)), e3));
                                          }
                                          return result$519;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(wildt);
                                    }
                                  }.apply());
                                }
                                if (true) {
                                  return Analyzer.cast(null);
                                }
                                return null;
                              }
                            }.apply());
                          }
                          if ((null != "has_annotation" && "has_annotation".equals(arg$422))) {
                            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                              public TypicalTypes.raw_type<?> apply() {
                                final Pair<Node> arg$521 = Analyzer.cast(nl);

                                if ((null == arg$521)) {
                                  return null;
                                }
                                if (TypicalSupport.match$421(arg$521)) {
                                  final Node e1 = Analyzer.cast(arg$521.get(0));
                                  final Node e2 = Analyzer.cast(arg$521.get(1));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final TypicalTypes.raw_type<?> t1;
                                    final TypicalTypes.raw_type<?> t2;

                                    {
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      t2 = Analyzer.cast(analyze.apply(e2));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$523 = ensureNodeType.apply(t1);

                                          if ((null == result$523)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$523;
                                        }
                                      }.apply();
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == t2)) {
                                            return null;
                                          }
                                          if ((null == strt)) {
                                            return null;
                                          }
                                          if ((null == unify)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$524 = unify.apply(t2, strt);

                                          if ((null == result$524)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(t2)), e2));
                                          }
                                          return result$524;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(boolt);
                                    }
                                  }.apply());
                                }
                                if (true) {
                                  return Analyzer.cast(null);
                                }
                                return null;
                              }
                            }.apply());
                          }
                          if ((null != "get_annotation" && "get_annotation".equals(arg$422))) {
                            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                              public TypicalTypes.raw_type<?> apply() {
                                final Pair<Node> arg$526 = Analyzer.cast(nl);

                                if ((null == arg$526)) {
                                  return null;
                                }
                                if (TypicalSupport.match$421(arg$526)) {
                                  final Node e1 = Analyzer.cast(arg$526.get(0));
                                  final Node e2 = Analyzer.cast(arg$526.get(1));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final TypicalTypes.raw_type<?> t1;
                                    final TypicalTypes.raw_type<?> t2;

                                    {
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      t2 = Analyzer.cast(analyze.apply(e2));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == ensureNodeType)) {
                                            return null;
                                          }
                                          if ((null == t1)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$528 = ensureNodeType.apply(t1);

                                          if ((null == result$528)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$528;
                                        }
                                      }.apply();
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == t2)) {
                                            return null;
                                          }
                                          if ((null == strt)) {
                                            return null;
                                          }
                                          if ((null == unify)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$529 = unify.apply(t2, strt);

                                          if ((null == result$529)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(t2)), e2));
                                          }
                                          return result$529;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(typet);
                                    }
                                  }.apply());
                                }
                                if (true) {
                                  return Analyzer.cast(null);
                                }
                                return null;
                              }
                            }.apply());
                          }
                          if ((null != "annotate_list" && "annotate_list".equals(arg$422))) {
                            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                              public TypicalTypes.raw_type<?> apply() {
                                final Pair<Node> arg$531 = Analyzer.cast(nl);

                                if ((null == arg$531)) {
                                  return null;
                                }
                                if (TypicalSupport.match$418(arg$531)) {
                                  final Node e1 = Analyzer.cast(arg$531.get(0));
                                  final Node e2 = Analyzer.cast(arg$531.get(1));
                                  final Node e3 = Analyzer.cast(arg$531.get(2));

                                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                    final TypicalTypes.raw_type<?> t1;
                                    final TypicalTypes.raw_type<?> t2;
                                    final TypicalTypes.raw_type<?> t3;

                                    {
                                      t1 = Analyzer.cast(analyze.apply(e1));
                                      t2 = Analyzer.cast(analyze.apply(e2));
                                      t3 = Analyzer.cast(analyze.apply(e3));
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == t1)) {
                                            return null;
                                          }
                                          if ((null == ensureNodeList)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$533 = ensureNodeList.apply(t1);

                                          if ((null == result$533)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected list of node, found ", getTypeName.apply(t1)), e1));
                                          }
                                          return result$533;
                                        }
                                      }.apply();
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == t2)) {
                                            return null;
                                          }
                                          if ((null == strt)) {
                                            return null;
                                          }
                                          if ((null == unify)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$534 = unify.apply(t2, strt);

                                          if ((null == result$534)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(t2)), e2));
                                          }
                                          return result$534;
                                        }
                                      }.apply();
                                      new Guard<TypicalTypes.raw_type<?>>() {
                                        public TypicalTypes.raw_type<?> apply() {
                                          if ((null == t3)) {
                                            return null;
                                          }
                                          if ((null == unify)) {
                                            return null;
                                          }
                                          if ((null == typet)) {
                                            return null;
                                          }

                                          final TypicalTypes.raw_type<?> result$535 = unify.apply(t3, typet);

                                          if ((null == result$535)) {
                                            return Analyzer.cast(error(Primitives.concat.apply("expected type, found ", getTypeName.apply(t2)), e2));
                                          }
                                          return result$535;
                                        }
                                      }.apply();
                                    }

                                    public TypicalTypes.raw_type<?> apply() {
                                      return Analyzer.cast(wildt);
                                    }
                                  }.apply());
                                }
                                if (true) {
                                  return Analyzer.cast(null);
                                }
                                return null;
                              }
                            }.apply());
                          }
                          if (true) {
                            return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                              final Node lo;
                              final TypicalTypes.raw_type<?> funcT;
                              final Node nod;
                              final Pair<String> muts;

                              {
                                lo = Analyzer.cast(TypicalSupport.head$245.apply(pl));
                                funcT = Analyzer.cast(Analyzer.cast(lookup4.apply(lo, "error", Primitives.concat.apply(s, " is undefined"), getNameSpace)));
                                nod = Analyzer.cast(null == isDefined.apply(GNode.create("NameSpaceStructure", s, null, null), getNameSpace) || !isDefined.apply(GNode.create("NameSpaceStructure", s, null, null), getNameSpace) ? null : Analyzer.cast(lookup2.apply(GNode.create("NameSpaceStructure", s, null, null), getNameSpace)));
                                muts = Analyzer.cast(null == Primitives.isNotBottom.apply(nod) || !Primitives.isNotBottom.apply(nod) ? null : getAnnotatedStringList.apply(nod, "mutual"));
                                Analyzer.discard(null == Primitives.isNotBottom.apply(muts) || !Primitives.isNotBottom.apply(muts) ? null : Primitives.annotateList.apply(nl, "mutual", new TypicalTypes.StringList(TypicalSupport.append$262.apply(muts, new Pair<String>(s)))));
                              }

                              public TypicalTypes.raw_type<?> apply() {
                                return Analyzer.cast(null == Primitives.isNotBottom.apply(funcT) || !Primitives.isNotBottom.apply(funcT) ? null : new Match<TypicalTypes.raw_type<?>>() {
                                  public TypicalTypes.raw_type<?> apply() {
                                    final TypicalTypes.raw_type<?> arg$537 = Analyzer.cast(funcT);

                                    if ((null != arg$537))
                                                                            switch (arg$537.tag()) {
                                      case FunctionT:
                                        if (TypicalSupport.match$99(arg$537)) {
                                          return Analyzer.cast(processFunctionApplication.apply(copy.apply(funcT), nl));
                                        }
                                        break;
                                      case VariableT:
                                        if (TypicalSupport.match$113(arg$537)) {
                                          return Analyzer.cast(processFunctionApplication.apply(funcT, nl));
                                        }
                                        break;
                                      default:
                                        break;
                                      };
                                    if ((null == arg$537)) {
                                      return Analyzer.cast(null);
                                    }
                                    if (true) {
                                      return Analyzer.cast(error(Primitives.concat.apply("expected function type, found ", getTypeName.apply(funcT)), null));
                                    }
                                    return null;
                                  }
                                }.apply());
                              }
                            }.apply());
                          }
                          return null;
                        }
                      }.apply());
                    }
                  }.apply());
                }
                if (true) {
                  return Analyzer.cast(null);
                }
                return null;
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$545);
            }
            return Analyzer.cast(retValue$545);
          }
          if (TypicalSupport.match$546(arg$121)) {
            final Node pat = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node e = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$550 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> left;
              final TypicalTypes.raw_type<?> right;

              {
                left = Analyzer.cast(analyze.apply(pat));
                right = Analyzer.cast(analyze.apply(e));
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == left)) {
                      return null;
                    }
                    if ((null == right)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$547 = unify.apply(left, right);

                    if ((null == result$547)) {
                      return Analyzer.cast(error("types of the pattern and the expression do not match", null));
                    }
                    return result$547;
                  }
                }.apply();
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(boolt);
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$550);
            }
            return Analyzer.cast(retValue$550);
          }
          if (TypicalSupport.match$551(arg$121)) {
            final Node pat = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$554 = Analyzer.cast(analyze.apply(pat));

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$554);
            }
            return Analyzer.cast(retValue$554);
          }
          if (TypicalSupport.match$50(arg$121)) {
            final Node n = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final String s = (arg$121.size() > 1 ? arg$121.getString(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$578 = Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
              public TypicalTypes.raw_type<?> apply() {
                final Node arg$556 = GNode.cast(n);

                if ((null == arg$556)) {
                  return null;
                }
                if (TypicalSupport.match$10(arg$556)) {
                  final String str = (arg$556.size() > 0 ? arg$556.getString(0) : null);

                  matching_nodes.add(arg$556);
                  if ((null != arg$556 && processScopeNodes.contains(arg$556.getName()))) {
                    processScope(arg$556, getScope);
                  }
                  checkEnterScope(arg$556);

                  final Object retValue$560 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                    final String name;

                    {
                      name = Analyzer.cast(null == Primitives.equal.apply("Prelude", str) ? null : Primitives.equal.apply("Prelude", str) ? s : Primitives.concat.apply(Primitives.concat.apply(str, "."), s));
                    }

                    public TypicalTypes.raw_type<?> apply() {
                      return Analyzer.cast(null == isDefined.apply(GNode.create("Parameter", name, null), getNameSpace) ? null : isDefined.apply(GNode.create("Parameter", name, null), getNameSpace) ? Analyzer.cast(lookup2.apply(GNode.create("Parameter", name, null), getNameSpace)) : error(Primitives.concat.apply(name, " is undefined"), null));
                    }
                  }.apply());

                  checkExitScope(arg$556);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$560);
                }
                if (true) {
                  matching_nodes.add(arg$556);
                  if ((null != arg$556 && processScopeNodes.contains(arg$556.getName()))) {
                    processScope(arg$556, getScope);
                  }
                  checkEnterScope(arg$556);

                  final Object retValue$574 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                    final TypicalTypes.raw_type<?> temp;
                    final TypicalTypes.raw_type<?> tn;
                    final TypicalTypes.raw_type<?> ts;

                    {
                      temp = Analyzer.cast(analyze.apply(n));
                      tn = Analyzer.cast(resolveRecordType.apply(temp));
                      ts = Analyzer.cast(Analyzer.cast(lookup4.apply(no, "error", Primitives.concat.apply(Primitives.concat.apply("field ", s), " is undefined"), getNameSpace)));
                    }

                    public TypicalTypes.raw_type<?> apply() {
                      return Analyzer.cast(null == Primitives.isNotBottom.apply(ts) || !Primitives.isNotBottom.apply(ts) ? null : new Match<TypicalTypes.raw_type<?>>() {
                        public TypicalTypes.raw_type<?> apply() {
                          final TypicalTypes.raw_type<?> arg$561 = Analyzer.cast(tn);

                          if ((null == arg$561)) {
                            return null;
                          }
                          if ((null != arg$561))
                                                        switch (arg$561.tag()) {
                            case RecordT:
                              if (TypicalSupport.match$106(arg$561)) {
                                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                                  public TypicalTypes.raw_type<?> apply() {
                                    final TypicalTypes.raw_type<?> arg$563 = Analyzer.cast(ts);

                                    if ((null == arg$563)) {
                                      return null;
                                    }
                                    if ((null != arg$563))
                                                                            switch (arg$563.tag()) {
                                      case FieldT:
                                        if (TypicalSupport.match$98(arg$563)) {
                                          final String pa = Analyzer.cast(arg$563.getTuple().get1());

                                          return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                            final TypicalTypes.raw_type<?> res;
                                            final TypicalTypes.raw_type<?> tem;

                                            {
                                              res = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", pa), getNameSpace)));
                                              tem = Analyzer.cast(unify.apply(tn, res));
                                            }

                                            public TypicalTypes.raw_type<?> apply() {
                                              return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                                                public TypicalTypes.raw_type<?> apply() {
                                                  final Boolean var$565 = Primitives.isNotBottom.apply(tem);

                                                  if ((null != var$565 && !var$565)) {
                                                    showMessage("error", Primitives.concat.apply(Primitives.concat.apply(getTypeName.apply(tn), " does not contain the field "), s), null);
                                                  }
                                                  if ((null == var$565)) {
                                                    return null;
                                                  }
                                                  if (var$565) {
                                                    return ts;
                                                  }
                                                  return null;
                                                }
                                              }.apply());
                                            }
                                          }.apply());
                                        }
                                        break;
                                      default:
                                        break;
                                      };
                                    if (true) {
                                      return Analyzer.cast(null);
                                    }
                                    return null;
                                  }
                                }.apply());
                              }
                              break;
                            case VariableT:
                              if (TypicalSupport.match$113(arg$561)) {
                                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                                  public TypicalTypes.raw_type<?> apply() {
                                    final TypicalTypes.raw_type<?> arg$568 = Analyzer.cast(ts);

                                    if ((null == arg$568)) {
                                      return null;
                                    }
                                    if ((null != arg$568))
                                                                            switch (arg$568.tag()) {
                                      case FieldT:
                                        if (TypicalSupport.match$98(arg$568)) {
                                          final String pa = Analyzer.cast(arg$568.getTuple().get1());

                                          return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                            final TypicalTypes.raw_type<?> res;

                                            {
                                              res = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", pa), getNameSpace)));
                                              unify.apply(tn, res);
                                            }

                                            public TypicalTypes.raw_type<?> apply() {
                                              return Analyzer.cast(ts);
                                            }
                                          }.apply());
                                        }
                                        break;
                                      default:
                                        break;
                                      };
                                    if (true) {
                                      return Analyzer.cast(null);
                                    }
                                    return null;
                                  }
                                }.apply());
                              }
                              break;
                            default:
                              break;
                            };
                          if (true) {
                            return Analyzer.cast(error(Primitives.concat.apply("expected record, found ", getTypeName.apply(tn)), null));
                          }
                          return null;
                        }
                      }.apply());
                    }
                  }.apply());

                  checkExitScope(arg$556);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$574);
                }
                return null;
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$578);
            }
            return Analyzer.cast(retValue$578);
          }
          if (TypicalSupport.match$579(arg$121)) {
            final Node n = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$583 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;

              {
                t = Analyzer.cast(analyze.apply(n));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == t)) {
                      return null;
                    }
                    if ((null == boolt)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$580 = unify.apply(t, boolt);

                    if ((null == result$580)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected boolean, found ", getTypeName.apply(t)), null));
                    }
                    return result$580;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$583);
            }
            return Analyzer.cast(retValue$583);
          }
          if (TypicalSupport.match$84(arg$121)) {
            final Node n1 = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node n2 = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$588 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final Pair<Node> nl;
              final Pair<TypicalTypes.entry> enList;

              {
                nl = Analyzer.cast(getNodeList.apply(n1));
                enList = Analyzer.cast(analyzeBindings.apply(nl, Pair.<TypicalTypes.entry>empty()));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$585.apply(Primitives.isBottom, enList)) || !Primitives.not.apply(TypicalSupport.exists$585.apply(Primitives.isBottom, enList)) ? null : new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> res;
                  final Pair<String> strList;

                  {
                    res = Analyzer.cast(analyzeExpression.apply(n2, enList));
                    strList = Analyzer.cast(getNames.apply(enList));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(null == Primitives.isNotBottom.apply(res) || !Primitives.isNotBottom.apply(res) ? null : new Let<TypicalTypes.raw_type<?>>() {
                      {
                        checkUnusedVariables.apply(strList, n2);
                        Primitives.annotate.apply(no, "variables", new TypicalTypes.StringList(strList));
                      }

                      public TypicalTypes.raw_type<?> apply() {
                        return Analyzer.cast(res);
                      }
                    }.apply());
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$588);
            }
            return Analyzer.cast(retValue$588);
          }
          if (TypicalSupport.match$589(arg$121)) {
            final Node n = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$595 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;

              {
                t = Analyzer.cast(analyze.apply(n));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final TypicalTypes.raw_type<?> arg$590 = Analyzer.cast(t);

                    if ((null == arg$590)) {
                      return null;
                    }
                    if ((null != arg$590))
                                            switch (arg$590.tag()) {
                      case PairOfType:
                        if (TypicalSupport.match$112(arg$590)) {
                          final TypicalTypes.raw_type<?> tl = Analyzer.cast(arg$590.getTuple().get1());
                          final TypicalTypes.raw_type<?> ret = Analyzer.cast(arg$590.getTuple().get2());

                          return Analyzer.cast(new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(tl), ret));
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(null);
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$595);
            }
            return Analyzer.cast(retValue$595);
          }
          if (TypicalSupport.match$596(arg$121)) {
            final Pair<Node> l = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$600 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final Node last;
              final TypicalTypes.raw_type<?> te;

              {
                last = Analyzer.cast(TypicalSupport.nth$597.apply(l, Primitives.subtractInt.apply(Primitives.length.apply(l), BigInteger.valueOf(1))));
                te = Analyzer.cast(analyze.apply(last));
                TypicalSupport.map$125.apply(analyze, removeLast.apply(l));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(te);
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$600);
            }
            return Analyzer.cast(retValue$600);
          }
          if (TypicalSupport.match$601(arg$121)) {
            final Node e = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node ne = (arg$121.size() > 2 ? arg$121.getGeneric(2) : null);
            final Node atNode = (arg$121.size() > 3 ? arg$121.getGeneric(3) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$607 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> te;
              final TypicalTypes.raw_type<?> tne;

              {
                te = Analyzer.cast(analyze.apply(e));
                tne = Analyzer.cast(analyze.apply(ne));
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == boolt)) {
                      return null;
                    }
                    if ((null == te)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$603 = unify.apply(te, boolt);

                    if ((null == result$603)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected boolean, found ", getTypeName.apply(te)), e));
                    }
                    return result$603;
                  }
                }.apply();
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == strt)) {
                      return null;
                    }
                    if ((null == tne)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$604 = unify.apply(tne, strt);

                    if ((null == result$604)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(tne)), ne));
                    }
                    return result$604;
                  }
                }.apply();
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isBottom.apply(atNode) ? null : Primitives.isBottom.apply(atNode) ? null : new Let<TypicalTypes.raw_type<?>>() {
                  final String s;
                  final TypicalTypes.raw_type<?> ts;

                  {
                    s = Analyzer.cast(getString.apply(atNode));
                    ts = Analyzer.cast(Analyzer.cast(lookup4.apply(atNode, "error", Primitives.concat.apply(s, " is undefined"), getNameSpace)));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new Guard<TypicalTypes.raw_type<?>>() {
                      public TypicalTypes.raw_type<?> apply() {
                        if ((null == ensureNodeType)) {
                          return null;
                        }
                        if ((null == ts)) {
                          return null;
                        }

                        final TypicalTypes.raw_type<?> result$602 = ensureNodeType.apply(ts);

                        if ((null == result$602)) {
                          return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(ts)), null));
                        }
                        return result$602;
                      }
                    }.apply());
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$607);
            }
            return Analyzer.cast(retValue$607);
          }
          if (TypicalSupport.match$608(arg$121)) {
            final Node n1 = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node n2 = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$611 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              {
                analyze.apply(n2);
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(analyze.apply(n1));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$611);
            }
            return Analyzer.cast(retValue$611);
          }
          if (TypicalSupport.match$427(arg$121)) {
            final Node e = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);
            final Node n = (arg$121.size() > 2 ? arg$121.getGeneric(2) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$617 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;

              {
                t = Analyzer.cast(analyze.apply(e));
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == t)) {
                      return null;
                    }
                    if ((null == strt)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$614 = unify.apply(t, strt);

                    if ((null == result$614)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(t)), e));
                    }
                    return result$614;
                  }
                }.apply();
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isBottom.apply(n) ? null : Primitives.isBottom.apply(n) ? new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE) : new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> tn;

                  {
                    tn = Analyzer.cast(analyze.apply(n));
                    new Guard<TypicalTypes.raw_type<?>>() {
                      public TypicalTypes.raw_type<?> apply() {
                        if ((null == ensureNodeType)) {
                          return null;
                        }
                        if ((null == tn)) {
                          return null;
                        }

                        final TypicalTypes.raw_type<?> result$613 = ensureNodeType.apply(tn);

                        if ((null == result$613)) {
                          return Analyzer.cast(error(Primitives.concat.apply("expected node, found ", getTypeName.apply(tn)), null));
                        }
                        return result$613;
                      }
                    }.apply();
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$617);
            }
            return Analyzer.cast(retValue$617);
          }
          if (TypicalSupport.match$618(arg$121)) {
            final Node e1 = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node e2 = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$623 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t1;
              final TypicalTypes.raw_type<?> t2;

              {
                t1 = Analyzer.cast(analyze.apply(e1));
                t2 = Analyzer.cast(analyze.apply(e2));
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == t1)) {
                      return null;
                    }
                    if ((null == boolt)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$619 = unify.apply(t1, boolt);

                    if ((null == result$619)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected boolean, found ", getTypeName.apply(t1)), e1));
                    }
                    return result$619;
                  }
                }.apply();
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == t2)) {
                      return null;
                    }
                    if ((null == strt)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$620 = unify.apply(t2, strt);

                    if ((null == result$620)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected string, found ", getTypeName.apply(t2)), e1));
                    }
                    return result$620;
                  }
                }.apply();
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$623);
            }
            return Analyzer.cast(retValue$623);
          }
          if (TypicalSupport.match$10(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$121, 1, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$640 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> ty;

              {
                ty = Analyzer.cast(Analyzer.cast(lookup4.apply(no, "error", Primitives.concat.apply(Primitives.concat.apply("constructor ", s), " is undefined"), getNameSpace)));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isNotBottom.apply(ty) || !Primitives.isNotBottom.apply(ty) ? null : new Let<TypicalTypes.raw_type<?>>() {
                  final String p;
                  final TypicalTypes.raw_type<?> t;

                  {
                    p = Analyzer.cast(getParent.apply(ty));
                    t = Analyzer.cast(null == Primitives.not.apply(hasTypeVariables.apply(p)) ? null : Primitives.not.apply(hasTypeVariables.apply(p)) ? ty : copy.apply(ty));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                      public TypicalTypes.raw_type<?> apply() {
                        final Pair<Node> arg$625 = Analyzer.cast(nl);

                        if ((null == arg$625)) {
                          return null;
                        }
                        if (TypicalSupport.match$281(arg$625)) {
                          return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              final TypicalTypes.raw_type<?> arg$627 = Analyzer.cast(t);

                              if ((null == arg$627)) {
                                return null;
                              }
                              if ((null != arg$627))
                                                                switch (arg$627.tag()) {
                                case ConstructorT:
                                  if (TypicalSupport.match$96(arg$627)) {
                                    final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$627.getTuple().get3());

                                    return Analyzer.cast(null == Primitives.isBottom.apply(ty) ? null : Primitives.isBottom.apply(ty) ? t : error(Primitives.concat.apply(Primitives.concat.apply("contructor ", s), " does not have enough children"), null));
                                  }
                                  break;
                                default:
                                  break;
                                };
                              if (true) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected constructor type, found ", getTypeName.apply(t)), null));
                              }
                              return null;
                            }
                          }.apply());
                        }
                        if (true) {
                          return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              final TypicalTypes.raw_type<?> arg$630 = Analyzer.cast(t);

                              if ((null == arg$630)) {
                                return null;
                              }
                              if ((null != arg$630))
                                                                switch (arg$630.tag()) {
                                case ConstructorT:
                                  if (TypicalSupport.match$96(arg$630)) {
                                    final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$630.getTuple().get3());

                                    return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                                      public TypicalTypes.raw_type<?> apply() {
                                        final TypicalTypes.raw_type<?> arg$632 = Analyzer.cast(ty);

                                        if ((null == arg$632)) {
                                          return null;
                                        }
                                        if ((null != arg$632))
                                                                                    switch (arg$632.tag()) {
                                          case TupleT:
                                            if (TypicalSupport.match$110(arg$632)) {
                                              final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$632.getTuple().get1());

                                              return Analyzer.cast(null == Primitives.lessInt.apply(Primitives.length.apply(nl), Primitives.length.apply(tl)) ? null : Primitives.lessInt.apply(Primitives.length.apply(nl), Primitives.length.apply(tl)) ? error(Primitives.concat.apply(Primitives.concat.apply("constructor ", s), "does not have enough children"), null) : null == Primitives.greaterInt.apply(Primitives.length.apply(nl), Primitives.length.apply(tl)) ? null : Primitives.greaterInt.apply(Primitives.length.apply(nl), Primitives.length.apply(tl)) ? error(Primitives.concat.apply(Primitives.concat.apply("constructor ", s), "has too many children"), null) : processArguments.apply(nl, tl, t));
                                            }
                                            break;
                                          default:
                                            break;
                                          };
                                        if (true) {
                                          return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                                            public TypicalTypes.raw_type<?> apply() {
                                              final Boolean var$634 = Primitives.equal.apply(Primitives.length.apply(nl), BigInteger.valueOf(1));

                                              if ((null != var$634 && !var$634)) {
                                                showMessage("error", Primitives.concat.apply(s, " must have only one child"), null);
                                              }
                                              if ((null == var$634)) {
                                                return null;
                                              }
                                              if (var$634) {
                                                return processArguments.apply(nl, new Pair<TypicalTypes.raw_type<?>>(ty), t);
                                              }
                                              return null;
                                            }
                                          }.apply());
                                        }
                                        return null;
                                      }
                                    }.apply());
                                  }
                                  break;
                                default:
                                  break;
                                };
                              if (true) {
                                return Analyzer.cast(error(Primitives.concat.apply("expected constructor type, found ", getTypeName.apply(t)), null));
                              }
                              return null;
                            }
                          }.apply());
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$640);
            }
            return Analyzer.cast(retValue$640);
          }
          if (TypicalSupport.match$641(arg$121)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$681 = Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
              public TypicalTypes.raw_type<?> apply() {
                final Pair<Node> arg$642 = Analyzer.cast(nl);

                if ((null == arg$642)) {
                  return null;
                }
                if (TypicalSupport.match$281(arg$642)) {
                  return Analyzer.cast(error("empty record expression", null));
                }
                if ((null != arg$642 && !((Pair)arg$642).isEmpty())) {
                  final Pair<Node> list$644 = Analyzer.cast(arg$642);
                  final Node x = GNode.cast(Primitives.wrapHead(list$644));
                  final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$644));

                  return Analyzer.cast(null == Primitives.isBottom.apply(x) ? null : Primitives.isBottom.apply(x) ? new Let<TypicalTypes.raw_type<?>>() {
                    final Pair<Node> tai;
                    final Node hea;
                    final TypicalTypes.raw_type<?> tx;

                    {
                      tai = Analyzer.cast(TypicalSupport.tail$244.apply(TypicalSupport.tail$244.apply(nl)));
                      hea = Analyzer.cast(TypicalSupport.head$245.apply(TypicalSupport.tail$244.apply(nl)));
                      tx = Analyzer.cast(analyze.apply(hea));
                    }

                    public TypicalTypes.raw_type<?> apply() {
                      return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                        public TypicalTypes.raw_type<?> apply() {
                          final TypicalTypes.raw_type<?> arg$645 = Analyzer.cast(tx);

                          if ((null == arg$645)) {
                            return null;
                          }
                          if ((null != arg$645))
                                                        switch (arg$645.tag()) {
                            case FieldT:
                              if (TypicalSupport.match$98(arg$645)) {
                                final String s = Analyzer.cast(arg$645.getTuple().get1());

                                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                  final Pair<TypicalTypes.raw_type<?>> tl;

                                  {
                                    Primitives.annotateList.apply(tai, "parent", new TypicalTypes.StringName(s));
                                    tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, tai));
                                  }

                                  public TypicalTypes.raw_type<?> apply() {
                                    return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : new Let<TypicalTypes.raw_type<?>>() {
                                      final TypicalTypes.raw_type<?> recT;

                                      {
                                        recT = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", s), getNameSpace)));
                                      }

                                      public TypicalTypes.raw_type<?> apply() {
                                        return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                                          public TypicalTypes.raw_type<?> apply() {
                                            final TypicalTypes.raw_type<?> arg$647 = Analyzer.cast(recT);

                                            if ((null == arg$647)) {
                                              return null;
                                            }
                                            if ((null != arg$647))
                                                                                            switch (arg$647.tag()) {
                                              case RecordT:
                                                if (TypicalSupport.match$106(arg$647)) {
                                                  final Pair<TypicalTypes.raw_type<?>> rectl = Analyzer.cast(arg$647.getTuple().get1());

                                                  return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                                                    public TypicalTypes.raw_type<?> apply() {
                                                      final Boolean var$649 = Primitives.equal.apply(Primitives.length.apply(rectl), Primitives.addInt.apply(Primitives.length.apply(tl), BigInteger.valueOf(1)));

                                                      if ((null != var$649 && !var$649)) {
                                                        showMessage("error", Primitives.concat.apply(s, " does not have enough fields"), no);
                                                      }
                                                      if ((null == var$649)) {
                                                        return null;
                                                      }
                                                      if (var$649) {
                                                        return new TypicalTypes.RecordT(Primitives.wrapCons(tx, tl));
                                                      }
                                                      return null;
                                                    }
                                                  }.apply());
                                                }
                                                break;
                                              default:
                                                break;
                                              };
                                            if (true) {
                                              return Analyzer.cast(null);
                                            }
                                            return null;
                                          }
                                        }.apply());
                                      }
                                    }.apply());
                                  }
                                }.apply());
                              }
                              break;
                            default:
                              break;
                            };
                          if (true) {
                            return Analyzer.cast(null);
                          }
                          return null;
                        }
                      }.apply());
                    }
                  }.apply() : new Match<TypicalTypes.raw_type<?>>() {
                    public TypicalTypes.raw_type<?> apply() {
                      final Node arg$652 = GNode.cast(x);

                      if ((null == arg$652)) {
                        return null;
                      }
                      if (TypicalSupport.match$653(arg$652)) {
                        matching_nodes.add(arg$652);
                        if ((null != arg$652 && processScopeNodes.contains(arg$652.getName()))) {
                          processScope(arg$652, getScope);
                        }
                        checkEnterScope(arg$652);

                        final Object retValue$659 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                          final Pair<Node> tai;
                          final Node hea;
                          final TypicalTypes.raw_type<?> tx;

                          {
                            tai = Analyzer.cast(TypicalSupport.tail$244.apply(TypicalSupport.tail$244.apply(nl)));
                            hea = Analyzer.cast(TypicalSupport.head$245.apply(TypicalSupport.tail$244.apply(nl)));
                            tx = Analyzer.cast(analyze.apply(hea));
                          }

                          public TypicalTypes.raw_type<?> apply() {
                            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                              public TypicalTypes.raw_type<?> apply() {
                                final TypicalTypes.raw_type<?> arg$654 = Analyzer.cast(tx);

                                if ((null == arg$654)) {
                                  return null;
                                }
                                if ((null != arg$654))
                                                                    switch (arg$654.tag()) {
                                  case FieldT:
                                    if (TypicalSupport.match$98(arg$654)) {
                                      final String s = Analyzer.cast(arg$654.getTuple().get1());

                                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                        final Pair<TypicalTypes.raw_type<?>> tl;

                                        {
                                          Primitives.annotateList.apply(tai, "parent", new TypicalTypes.StringName(s));
                                          tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, tai));
                                        }

                                        public TypicalTypes.raw_type<?> apply() {
                                          return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", s), getNameSpace)));
                                        }
                                      }.apply());
                                    }
                                    break;
                                  default:
                                    break;
                                  };
                                if (true) {
                                  return Analyzer.cast(null);
                                }
                                return null;
                              }
                            }.apply());
                          }
                        }.apply());

                        checkExitScope(arg$652);
                        matching_nodes.remove(matching_nodes.size() - 1);
                        return Analyzer.cast(retValue$659);
                      }
                      if (TypicalSupport.match$660(arg$652)) {
                        final Node e = (arg$652.size() > 0 ? arg$652.getGeneric(0) : null);

                        matching_nodes.add(arg$652);
                        if ((null != arg$652 && processScopeNodes.contains(arg$652.getName()))) {
                          processScope(arg$652, getScope);
                        }
                        checkEnterScope(arg$652);

                        final Object retValue$673 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                          final TypicalTypes.raw_type<?> tx;

                          {
                            tx = Analyzer.cast(resolveRecordType.apply(analyze.apply(e)));
                          }

                          public TypicalTypes.raw_type<?> apply() {
                            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                              public TypicalTypes.raw_type<?> apply() {
                                final TypicalTypes.raw_type<?> arg$661 = Analyzer.cast(tx);

                                if ((null == arg$661)) {
                                  return null;
                                }
                                if ((null != arg$661))
                                                                    switch (arg$661.tag()) {
                                  case RecordT:
                                    if (TypicalSupport.match$106(arg$661)) {
                                      final Pair<TypicalTypes.raw_type<?>> rectl = Analyzer.cast(arg$661.getTuple().get1());

                                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                        final TypicalTypes.raw_type<?> field;

                                        {
                                          field = Analyzer.cast(TypicalSupport.head$100.apply(rectl));
                                        }

                                        public TypicalTypes.raw_type<?> apply() {
                                          return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                                            public TypicalTypes.raw_type<?> apply() {
                                              final TypicalTypes.raw_type<?> arg$663 = Analyzer.cast(field);

                                              if ((null == arg$663)) {
                                                return null;
                                              }
                                              if ((null != arg$663))
                                                                                                switch (arg$663.tag()) {
                                                case FieldT:
                                                  if (TypicalSupport.match$98(arg$663)) {
                                                    final String s = Analyzer.cast(arg$663.getTuple().get1());

                                                    return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                                      final Pair<TypicalTypes.raw_type<?>> tl;

                                                      {
                                                        Primitives.annotateList.apply(xs, "parent", new TypicalTypes.StringName(s));
                                                        tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, xs));
                                                      }

                                                      public TypicalTypes.raw_type<?> apply() {
                                                        return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : tx);
                                                      }
                                                    }.apply());
                                                  }
                                                  break;
                                                default:
                                                  break;
                                                };
                                              if (true) {
                                                return Analyzer.cast(null);
                                              }
                                              return null;
                                            }
                                          }.apply());
                                        }
                                      }.apply());
                                    }
                                    break;
                                  case VariableT:
                                    if (TypicalSupport.match$113(arg$661)) {
                                      return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                        final TypicalTypes.raw_type<?> ht;

                                        {
                                          ht = Analyzer.cast(analyze.apply(TypicalSupport.head$245.apply(xs)));
                                        }

                                        public TypicalTypes.raw_type<?> apply() {
                                          return Analyzer.cast(null == Primitives.isNotBottom.apply(ht) ? null : Primitives.isNotBottom.apply(ht) ? new Match<TypicalTypes.raw_type<?>>() {
                                            public TypicalTypes.raw_type<?> apply() {
                                              final TypicalTypes.raw_type<?> arg$667 = Analyzer.cast(ht);

                                              if ((null == arg$667)) {
                                                return null;
                                              }
                                              if ((null != arg$667))
                                                                                                switch (arg$667.tag()) {
                                                case FieldT:
                                                  if (TypicalSupport.match$98(arg$667)) {
                                                    final String s = Analyzer.cast(arg$667.getTuple().get1());

                                                    return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                                                      final Pair<TypicalTypes.raw_type<?>> tl;

                                                      {
                                                        Primitives.annotateList.apply(TypicalSupport.tail$244.apply(xs), "parent", new TypicalTypes.StringName(s));
                                                        tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, TypicalSupport.tail$244.apply(xs)));
                                                      }

                                                      public TypicalTypes.raw_type<?> apply() {
                                                        return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : new Let<TypicalTypes.raw_type<?>>() {
                                                          final TypicalTypes.raw_type<?> recT;

                                                          {
                                                            recT = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", s), getNameSpace)));
                                                          }

                                                          public TypicalTypes.raw_type<?> apply() {
                                                            return Analyzer.cast(unify.apply(recT, tx));
                                                          }
                                                        }.apply());
                                                      }
                                                    }.apply());
                                                  }
                                                  break;
                                                default:
                                                  break;
                                                };
                                              if (true) {
                                                return Analyzer.cast(null);
                                              }
                                              return null;
                                            }
                                          }.apply() : null);
                                        }
                                      }.apply());
                                    }
                                    break;
                                  default:
                                    break;
                                  };
                                if (true) {
                                  return Analyzer.cast(error(Primitives.concat.apply("expected record type, found ", getTypeName.apply(tx)), null));
                                }
                                return null;
                              }
                            }.apply());
                          }
                        }.apply());

                        checkExitScope(arg$652);
                        matching_nodes.remove(matching_nodes.size() - 1);
                        return Analyzer.cast(retValue$673);
                      }
                      if (true) {
                        matching_nodes.add(arg$652);
                        if ((null != arg$652 && processScopeNodes.contains(arg$652.getName()))) {
                          processScope(arg$652, getScope);
                        }
                        checkEnterScope(arg$652);

                        final Object retValue$676 = Analyzer.cast(null);

                        checkExitScope(arg$652);
                        matching_nodes.remove(matching_nodes.size() - 1);
                        return Analyzer.cast(retValue$676);
                      }
                      return null;
                    }
                  }.apply());
                }
                return null;
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$681);
            }
            return Analyzer.cast(retValue$681);
          }
          if (TypicalSupport.match$46(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);
            final Node p = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$690 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;

              {
                t = Analyzer.cast(Analyzer.cast(lookup4.apply(no, "error", Primitives.concat.apply(Primitives.concat.apply("field ", s), " is undefined"), getNameSpace)));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final TypicalTypes.raw_type<?> arg$683 = Analyzer.cast(t);

                    if ((null == arg$683)) {
                      return null;
                    }
                    if ((null != arg$683))
                                            switch (arg$683.tag()) {
                      case FieldT:
                        if (TypicalSupport.match$98(arg$683)) {
                          final String str = Analyzer.cast(arg$683.getTuple().get1());

                          return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                            final String ps;

                            {
                              ps = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "parent") ? null : Primitives.hasAnnotation.apply(no, "parent") ? new Let<String>() {
                                final String stri;

                                {
                                  stri = Analyzer.cast(getAnnotatedString.apply(no, "parent"));
                                }

                                public String apply() {
                                  return Analyzer.cast(stri);
                                }
                              }.apply() : str);
                            }

                            public TypicalTypes.raw_type<?> apply() {
                              return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                                public TypicalTypes.raw_type<?> apply() {
                                  final Boolean var$686 = Primitives.equal.apply(ps, str);

                                  if ((null != var$686 && !var$686)) {
                                    showMessage("error", Primitives.concat.apply(Primitives.concat.apply(ps, " does not contain the field "), s), null);
                                  }
                                  if ((null == var$686)) {
                                    return null;
                                  }
                                  if (var$686) {
                                    return new Let<TypicalTypes.raw_type<?>>() {
                                      final TypicalTypes.raw_type<?> tp;

                                      {
                                        tp = Analyzer.cast(analyze.apply(p));
                                        new Guard<TypicalTypes.raw_type<?>>() {
                                          public TypicalTypes.raw_type<?> apply() {
                                            if ((null == t)) {
                                              return null;
                                            }
                                            if ((null == tp)) {
                                              return null;
                                            }
                                            if ((null == unify)) {
                                              return null;
                                            }

                                            final TypicalTypes.raw_type<?> result$685 = unify.apply(t, tp);

                                            if ((null == result$685)) {
                                              return Analyzer.cast(error(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply("type of field ", s), " must be "), getTypeName.apply(t)), ", found "), getTypeName.apply(tp)), null));
                                            }
                                            return result$685;
                                          }
                                        }.apply();
                                      }

                                      public TypicalTypes.raw_type<?> apply() {
                                        return Analyzer.cast(t);
                                      }
                                    }.apply();
                                  }
                                  return null;
                                }
                              }.apply());
                            }
                          }.apply());
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(null);
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$690);
            }
            return Analyzer.cast(retValue$690);
          }
          if (TypicalSupport.match$691(arg$121)) {
            final Node e1 = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node e2 = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$695 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t1;
              final TypicalTypes.raw_type<?> t2;

              {
                t1 = Analyzer.cast(analyze.apply(e1));
                t2 = Analyzer.cast(analyze.apply(e2));
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == t1)) {
                      return null;
                    }
                    if ((null == boolt)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$692 = unify.apply(t1, boolt);

                    if ((null == result$692)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected boolean, found ", getTypeName.apply(t1)), null));
                    }
                    return result$692;
                  }
                }.apply();
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(t2);
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$695);
            }
            return Analyzer.cast(retValue$695);
          }
          if (TypicalSupport.match$696(arg$121)) {
            final Node e1 = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node e2 = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);
            final Node e3 = (arg$121.size() > 2 ? arg$121.getGeneric(2) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$701 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t1;
              final TypicalTypes.raw_type<?> t2;
              final TypicalTypes.raw_type<?> t3;

              {
                t1 = Analyzer.cast(analyze.apply(e1));
                t2 = Analyzer.cast(analyze.apply(e2));
                t3 = Analyzer.cast(analyze.apply(e3));
                new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == t1)) {
                      return null;
                    }
                    if ((null == boolt)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$698 = unify.apply(t1, boolt);

                    if ((null == result$698)) {
                      return Analyzer.cast(error(Primitives.concat.apply("expected boolean, found ", getTypeName.apply(t1)), null));
                    }
                    return result$698;
                  }
                }.apply();
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Guard<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    if ((null == t3)) {
                      return null;
                    }
                    if ((null == t2)) {
                      return null;
                    }
                    if ((null == unify)) {
                      return null;
                    }

                    final TypicalTypes.raw_type<?> result$697 = unify.apply(t2, t3);

                    if ((null == result$697)) {
                      return Analyzer.cast(error("types of if and else expressions do not match", null));
                    }
                    return result$697;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$701);
            }
            return Analyzer.cast(retValue$701);
          }
          if (TypicalSupport.match$702(arg$121)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$711 = Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
              public TypicalTypes.raw_type<?> apply() {
                final Pair<Node> arg$703 = Analyzer.cast(nl);

                if ((null == arg$703)) {
                  return null;
                }
                if (TypicalSupport.match$281(arg$703)) {
                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                    final TypicalTypes.raw_type<?> varT;

                    {
                      varT = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));
                    }

                    public TypicalTypes.raw_type<?> apply() {
                      return Analyzer.cast(new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(varT), "list"));
                    }
                  }.apply());
                }
                if (true) {
                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                    final Pair<TypicalTypes.raw_type<?>> tl;

                    {
                      tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, nl));
                    }

                    public TypicalTypes.raw_type<?> apply() {
                      return Analyzer.cast(null == Primitives.isNotBottom.apply(ancestor.apply(TypicalSupport.nodeMatch$706)) ? null : Primitives.isNotBottom.apply(ancestor.apply(TypicalSupport.nodeMatch$706)) ? new Let<TypicalTypes.raw_type<?>>() {
                        final TypicalTypes.raw_type<?> res;

                        {
                          res = Analyzer.cast(checkNodeList.apply(tl));
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(null == Primitives.isBottom.apply(res) ? null : Primitives.isBottom.apply(res) ? null : new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(nodet), "list"));
                        }
                      }.apply() : null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : new Let<TypicalTypes.raw_type<?>>() {
                        final TypicalTypes.raw_type<?> res;

                        {
                          res = Analyzer.cast(TypicalSupport.foldl$193.apply(unify, tl, wildt));
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              final Boolean var$707 = Primitives.isNotBottom.apply(res);

                              if ((null != var$707 && !var$707)) {
                                showMessage("error", "types do not match in list literal", null);
                              }
                              if ((null == var$707)) {
                                return null;
                              }
                              if (var$707) {
                                return new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(res), "list");
                              }
                              return null;
                            }
                          }.apply());
                        }
                      }.apply());
                    }
                  }.apply());
                }
                return null;
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$711);
            }
            return Analyzer.cast(retValue$711);
          }
          if (TypicalSupport.match$712(arg$121)) {
            final Node ops = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node lit = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);
            final Node pat = (arg$121.size() > 2 ? arg$121.getGeneric(2) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$718 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final Pair<String> opList;
              final TypicalTypes.raw_type<?> nodeL;
              final TypicalTypes.raw_type<?> tpat;

              {
                analyze.apply(ops);
                opList = Analyzer.cast(getStringList.apply(ops));
                analyze.apply(lit);
                Primitives.annotate.apply(pat, "is_reduce", wildt);
                Primitives.annotate.apply(pat, "non_exhaustive", wildt);
                nodeL = Analyzer.cast(new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(nodet), "list"));
                tpat = Analyzer.cast(analyze.apply(pat));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final TypicalTypes.raw_type<?> arg$713 = Analyzer.cast(tpat);

                    if ((null == arg$713)) {
                      return null;
                    }
                    if ((null != arg$713))
                                            switch (arg$713.tag()) {
                      case PairOfType:
                        if (TypicalSupport.match$112(arg$713)) {
                          final TypicalTypes.raw_type<?> right = Analyzer.cast(arg$713.getTuple().get2());

                          return Analyzer.cast(null == Primitives.contains.apply("list", opList) ? null : Primitives.contains.apply("list", opList) ? new Let<TypicalTypes.raw_type<?>>() {
                            final TypicalTypes.raw_type<?> rightL;

                            {
                              rightL = Analyzer.cast(new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(right), "list"));
                            }

                            public TypicalTypes.raw_type<?> apply() {
                              return Analyzer.cast(new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(nodeL), rightL));
                            }
                          }.apply() : new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(nodeL), right));
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(null);
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$718);
            }
            return Analyzer.cast(retValue$718);
          }
          if (TypicalSupport.match$719(arg$121)) {
            final Pair<String> sl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$722 = Analyzer.cast(null == Primitives.and.apply(Primitives.contains.apply("list", sl), Primitives.contains.apply("singleton", sl)) ? null : Primitives.and.apply(Primitives.contains.apply("list", sl), Primitives.contains.apply("singleton", sl)) ? error("'list' and 'singleton' are not compatible", null) : null == Primitives.and.apply(Primitives.contains.apply("list", sl), Primitives.contains.apply("set", sl)) ? null : Primitives.and.apply(Primitives.contains.apply("list", sl), Primitives.contains.apply("set", sl)) ? error("'list' and 'set' are not compatible", null) : null == Primitives.and.apply(Primitives.contains.apply("singleton", sl), Primitives.contains.apply("set", sl)) ? null : Primitives.and.apply(Primitives.contains.apply("singleton", sl), Primitives.contains.apply("set", sl)) ? error("'singleton' and 'set' are not compatible", null) : null == Primitives.and.apply(Primitives.contains.apply("required", sl), Primitives.contains.apply("optional", sl)) ? null : Primitives.and.apply(Primitives.contains.apply("required", sl), Primitives.contains.apply("optional", sl)) ? error("'required' and 'optional' are not compatible", null) : new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(strt), "list"));

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$722);
            }
            return Analyzer.cast(retValue$722);
          }
          if (TypicalSupport.match$62(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$726 = Analyzer.cast(Analyzer.cast(lookup4.apply(no, "error", Primitives.concat.apply(s, " is undefined"), getNameSpace)));

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$726);
            }
            return Analyzer.cast(retValue$726);
          }
          if (TypicalSupport.match$2(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$730 = Analyzer.cast(Analyzer.cast(lookup4.apply(no, "error", Primitives.concat.apply(s, " is undefined"), getNameSpace)));

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$730);
            }
            return Analyzer.cast(retValue$730);
          }
          if (TypicalSupport.match$30(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$735 = Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
              public TypicalTypes.raw_type<?> apply() {
                final Boolean var$732 = isDefined.apply(no, getNameSpace);

                if ((null != var$732 && !var$732)) {
                  showMessage("error", Primitives.concat.apply(Primitives.concat.apply("type ", s), " is undefined"), null);
                }
                if ((null == var$732)) {
                  return null;
                }
                if (var$732) {
                  return new TypicalTypes.TypeName(s);
                }
                return null;
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$735);
            }
            return Analyzer.cast(retValue$735);
          }
          if (TypicalSupport.match$736(arg$121)) {
            final String s = (arg$121.size() > 0 ? arg$121.getString(0) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$739 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final Pair<String> vars;

              {
                vars = Analyzer.cast(getAnnotatedStringList.apply(no, "type_variables"));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.or.apply(Primitives.isBottom.apply(vars), Primitives.not.apply(Primitives.contains.apply(s, vars))) ? null : Primitives.or.apply(Primitives.isBottom.apply(vars), Primitives.not.apply(Primitives.contains.apply(s, vars))) ? error(Primitives.concat.apply(Primitives.concat.apply("type variable ", s), " is undefined"), null) : new TypicalTypes.VariableT(s, Boolean.TRUE));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$739);
            }
            return Analyzer.cast(retValue$739);
          }
          if (TypicalSupport.match$740(arg$121)) {
            final Node n = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$743 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final String s;

              {
                s = Analyzer.cast(getString.apply(n));
                Analyzer.cast(Primitives.put.apply(s, nodet, hashTable));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(nodet);
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$743);
            }
            return Analyzer.cast(retValue$743);
          }
          if (TypicalSupport.match$744(arg$121)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$747 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final String str;

              {
                str = Analyzer.cast(getAnnotatedString.apply(no, "parent"));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == reachableFromNode.apply(str) ? null : reachableFromNode.apply(str) ? new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<TypicalTypes.raw_type<?>> tl;

                  {
                    tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, nl));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? new TypicalTypes.PolyVariantT(tl) : null);
                  }
                }.apply() : error("polymorphic variant is not allowed outside node closure", null));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$747);
            }
            return Analyzer.cast(retValue$747);
          }
          if (TypicalSupport.match$748(arg$121)) {
            final Pair<Node> l = Analyzer.cast(Primitives.getChildren(arg$121, 0, arg$121.size()));

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$751 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final String str;
              final Pair<String> vars;
              final Pair<TypicalTypes.raw_type<?>> tl;

              {
                str = Analyzer.cast(getAnnotatedString.apply(no, "parent"));
                vars = Analyzer.cast(getAnnotatedStringList.apply(no, "type_variables"));
                Analyzer.discard(null == Primitives.isNotBottom.apply(vars) || !Primitives.isNotBottom.apply(vars) ? null : Primitives.annotateList.apply(l, "type_variables", new TypicalTypes.StringList(vars)));
                Primitives.annotateList.apply(l, "parent", new TypicalTypes.StringName(str));
                tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, l));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : new TypicalTypes.TupleT(tl));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$751);
            }
            return Analyzer.cast(retValue$751);
          }
          if (TypicalSupport.match$26(arg$121)) {
            final Node n = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final String s = (arg$121.size() > 1 ? arg$121.getString(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$758 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final String str;
              final Pair<String> vars;
              final TypicalTypes.raw_type<?> t;

              {
                str = Analyzer.cast(getAnnotatedString.apply(no, "parent"));
                vars = Analyzer.cast(getAnnotatedStringList.apply(no, "type_variables"));
                Analyzer.discard(null == Primitives.isNotBottom.apply(vars) || !Primitives.isNotBottom.apply(vars) ? null : Primitives.annotate.apply(n, "type_variables", new TypicalTypes.StringList(vars)));
                Primitives.annotate.apply(n, "parent", new TypicalTypes.StringName(str));
                t = Analyzer.cast(analyze.apply(n));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final String arg$753 = Analyzer.cast(s);

                    if ((null == arg$753)) {
                      return null;
                    }
                    if ((null != "list" && "list".equals(arg$753))) {
                      return Analyzer.cast(null == Primitives.isNotBottom.apply(t) || !Primitives.isNotBottom.apply(t) ? null : new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(t), s));
                    }
                    if ((null != "var" && "var".equals(arg$753))) {
                      return Analyzer.cast(null == Primitives.isNotBottom.apply(t) || !Primitives.isNotBottom.apply(t) ? null : new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(t), s));
                    }
                    if ((null != "opt" && "opt".equals(arg$753))) {
                      return Analyzer.cast(t);
                    }
                    if (true) {
                      return Analyzer.cast(new Require<TypicalTypes.raw_type<?>>() {
                        public TypicalTypes.raw_type<?> apply() {
                          final Boolean var$754 = isDefined.apply(no, getNameSpace);

                          if ((null != var$754 && !var$754)) {
                            showMessage("error", Primitives.concat.apply(Primitives.concat.apply("type ", s), " is undefined"), null);
                          }
                          if ((null == var$754)) {
                            return null;
                          }
                          if (var$754) {
                            return new Let<TypicalTypes.raw_type<?>>() {
                              final Node nod;
                              final Pair<String> var_list;

                              {
                                nod = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("NameSpaceStructure", s, null, null), getNameSpace)));
                                var_list = Analyzer.cast(getAnnotatedStringList.apply(nod, "type_variables"));
                              }

                              public TypicalTypes.raw_type<?> apply() {
                                return Analyzer.cast(null == Primitives.isBottom.apply(var_list) ? null : Primitives.isBottom.apply(var_list) ? error(Primitives.concat.apply(s, " is not a constructed type"), null) : null == Primitives.not.apply(Primitives.equal.apply(Primitives.length.apply(var_list), BigInteger.valueOf(1))) ? null : Primitives.not.apply(Primitives.equal.apply(Primitives.length.apply(var_list), BigInteger.valueOf(1))) ? error(Primitives.concat.apply(Primitives.concat.apply("constructed type ", s), " does not have enough type parameters"), null) : null == Primitives.isNotBottom.apply(t) || !Primitives.isNotBottom.apply(t) ? null : new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(t), s));
                              }
                            }.apply();
                          }
                          return null;
                        }
                      }.apply());
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$758);
            }
            return Analyzer.cast(retValue$758);
          }
          if (TypicalSupport.match$759(arg$121)) {
            final Node n = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node tv = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$762 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final String s;

              {
                s = Analyzer.cast(getString.apply(tv));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == isDefined.apply(GNode.create("UserDefinedType", s), getNameSpace) ? null : isDefined.apply(GNode.create("UserDefinedType", s), getNameSpace) ? error(Primitives.concat.apply(s, " has been previously defined"), null) : new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<String> vars;
                  final TypicalTypes.raw_type<?> t;

                  {
                    vars = Analyzer.cast(getAnnotatedStringList.apply(no, "type_variables"));
                    Analyzer.discard(null == Primitives.isNotBottom.apply(vars) || !Primitives.isNotBottom.apply(vars) ? null : Primitives.annotate.apply(n, "type_variabls", new TypicalTypes.StringList(vars)));
                    t = Analyzer.cast(analyze.apply(n));
                    redefine.apply(GNode.create("UserDefinedType", s), t, getNameSpace);
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(t);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$762);
            }
            return Analyzer.cast(retValue$762);
          }
          if (TypicalSupport.match$763(arg$121)) {
            final Node n1 = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final Node n2 = (arg$121.size() > 1 ? arg$121.getGeneric(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$775 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final Pair<String> vars;
              final Pair<Node> nl;
              final Pair<TypicalTypes.raw_type<?>> tl;
              final TypicalTypes.raw_type<?> ret;

              {
                vars = Analyzer.cast(getAnnotatedStringList.apply(no, "type_variables"));
                nl = Analyzer.cast(new Match<Pair<Node>>() {
                  public Pair<Node> apply() {
                    final Node arg$764 = GNode.cast(n1);

                    if ((null == arg$764)) {
                      return null;
                    }
                    if (TypicalSupport.match$748(arg$764)) {
                      final Pair<Node> l = Analyzer.cast(Primitives.getChildren(arg$764, 0, arg$764.size()));

                      matching_nodes.add(arg$764);
                      if ((null != arg$764 && processScopeNodes.contains(arg$764.getName()))) {
                        processScope(arg$764, getScope);
                      }
                      checkEnterScope(arg$764);

                      final Object retValue$768 = Analyzer.cast(l);

                      checkExitScope(arg$764);
                      matching_nodes.remove(matching_nodes.size() - 1);
                      return Analyzer.cast(retValue$768);
                    }
                    if (true) {
                      matching_nodes.add(arg$764);
                      if ((null != arg$764 && processScopeNodes.contains(arg$764.getName()))) {
                        processScope(arg$764, getScope);
                      }
                      checkEnterScope(arg$764);

                      final Object retValue$771 = Analyzer.cast(new Pair<Node>(n1));

                      checkExitScope(arg$764);
                      matching_nodes.remove(matching_nodes.size() - 1);
                      return Analyzer.cast(retValue$771);
                    }
                    return null;
                  }
                }.apply());
                Analyzer.discard(null == Primitives.isNotBottom.apply(vars) || !Primitives.isNotBottom.apply(vars) ? null : Primitives.annotateList.apply(Primitives.wrapCons(n2, nl), "type_variables", new TypicalTypes.StringList(vars)));
                tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, nl));
                ret = Analyzer.cast(analyze.apply(n2));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.and.apply(Primitives.isNotBottom.apply(ret), Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl))) || !Primitives.and.apply(Primitives.isNotBottom.apply(ret), Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl))) ? null : new TypicalTypes.FunctionT(tl, ret));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$775);
            }
            return Analyzer.cast(retValue$775);
          }
          if (TypicalSupport.match$776(arg$121)) {
            final Node n = (arg$121.size() > 0 ? arg$121.getGeneric(0) : null);
            final String s = (arg$121.size() > 1 ? arg$121.getString(1) : null);

            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$779 = Analyzer.cast(null == Primitives.not.apply(isDefined.apply(GNode.create("UserDefinedType", s), getNameSpace)) ? null : Primitives.not.apply(isDefined.apply(GNode.create("UserDefinedType", s), getNameSpace)) ? error(Primitives.concat.apply(Primitives.concat.apply("type ", s), " is undefined"), null) : new Let<TypicalTypes.raw_type<?>>() {
              final Node nod;
              final Pair<Node> nl;

              {
                nod = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("NameSpaceStructure", s, null, null), getNameSpace)));
                nl = Analyzer.cast(getNodeList.apply(n));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.not.apply(Primitives.hasAnnotation.apply(nod, "type_variables")) ? null : Primitives.not.apply(Primitives.hasAnnotation.apply(nod, "type_variables")) ? error(Primitives.concat.apply(s, " is not a contructed type"), null) : new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<String> vars;
                  final Pair<TypicalTypes.raw_type<?>> tl;

                  {
                    vars = Analyzer.cast(getAnnotatedStringList.apply(nod, "type_variables"));
                    Analyzer.discard(null == Primitives.isNotBottom.apply(vars) || !Primitives.isNotBottom.apply(vars) ? null : Primitives.annotateList.apply(nl, "type_variables", new TypicalTypes.StringList(vars)));
                    tl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, nl));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(null == Primitives.lessInt.apply(Primitives.length.apply(nl), Primitives.length.apply(vars)) ? null : Primitives.lessInt.apply(Primitives.length.apply(nl), Primitives.length.apply(vars)) ? error(Primitives.concat.apply(Primitives.concat.apply("contructed type ", s), " does not have enough type parameters"), null) : null == Primitives.greaterInt.apply(Primitives.length.apply(nl), Primitives.length.apply(vars)) ? null : Primitives.greaterInt.apply(Primitives.length.apply(nl), Primitives.length.apply(vars)) ? error(Primitives.concat.apply(Primitives.concat.apply("contructed type ", s), " has too many type parameters"), null) : null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tl)) ? null : new TypicalTypes.ConstructedT(tl, s));
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$779);
            }
            return Analyzer.cast(retValue$779);
          }
          if (TypicalSupport.match$780(arg$121)) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$783 = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$783);
            }
            return Analyzer.cast(retValue$783);
          }
          if (TypicalSupport.match$784(arg$121)) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$787 = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$787);
            }
            return Analyzer.cast(retValue$787);
          }
          if (TypicalSupport.match$788(arg$121)) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$791 = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$791);
            }
            return Analyzer.cast(retValue$791);
          }
          if (TypicalSupport.match$792(arg$121)) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$795 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final String str;

              {
                str = Analyzer.cast(getAnnotatedString.apply(no, "parent"));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == reachableFromNode.apply(str) ? null : reachableFromNode.apply(str) ? new TypicalTypes.AnyT() : error("any is not allowed outside node closure", null));
              }
            }.apply());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$795);
            }
            return Analyzer.cast(retValue$795);
          }
          if (TypicalSupport.match$796(arg$121)) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$799 = Analyzer.cast(strt);

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$799);
            }
            return Analyzer.cast(retValue$799);
          }
          if (TypicalSupport.match$800(arg$121)) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$803 = Analyzer.cast(strt);

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$803);
            }
            return Analyzer.cast(retValue$803);
          }
          if (TypicalSupport.match$804(arg$121)) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$807 = Analyzer.cast(intt);

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$807);
            }
            return Analyzer.cast(retValue$807);
          }
          if (TypicalSupport.match$808(arg$121)) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$811 = Analyzer.cast(intt);

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$811);
            }
            return Analyzer.cast(retValue$811);
          }
          if (TypicalSupport.match$812(arg$121)) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$815 = Analyzer.cast(boolt);

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$815);
            }
            return Analyzer.cast(retValue$815);
          }
          if (TypicalSupport.match$816(arg$121)) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$819 = Analyzer.cast(boolt);

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$819);
            }
            return Analyzer.cast(retValue$819);
          }
          if (TypicalSupport.match$820(arg$121)) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$823 = Analyzer.cast(floatt);

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$823);
            }
            return Analyzer.cast(retValue$823);
          }
          if (TypicalSupport.match$824(arg$121)) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$827 = Analyzer.cast(floatt);

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$827);
            }
            return Analyzer.cast(retValue$827);
          }
          if (TypicalSupport.match$828(arg$121)) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$831 = Analyzer.cast(new TypicalTypes.Float32T());

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$831);
            }
            return Analyzer.cast(retValue$831);
          }
          if (true) {
            matching_nodes.add(arg$121);
            if ((null != arg$121 && processScopeNodes.contains(arg$121.getName()))) {
              processScope(arg$121, getScope);
            }
            checkEnterScope(arg$121);

            final Object retValue$834 = Analyzer.cast(null);

            checkExitScope(arg$121);
            matching_nodes.remove(matching_nodes.size() - 1);
            if ((null != arg$121)) {
              arg$121.setProperty("__type", retValue$834);
            }
            return Analyzer.cast(retValue$834);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> unify = new Function.F2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>() {
    public TypicalTypes.raw_type<?> apply(final TypicalTypes.raw_type<?> t1, final TypicalTypes.raw_type<?> t2) {
      return (null == Primitives.or.apply(Primitives.isBottom.apply(t1), Primitives.isBottom.apply(t2)) ? null : Primitives.or.apply(Primitives.isBottom.apply(t1), Primitives.isBottom.apply(t2)) ? null : new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> arg$836 = Analyzer.cast(new Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>(t1, t2));

          if ((null == arg$836)) {
            return null;
          }
          if (TypicalSupport.match$837(arg$836)) {
            return Analyzer.cast(t2);
          }
          if (TypicalSupport.match$838(arg$836)) {
            return Analyzer.cast(t1);
          }
          if (TypicalSupport.match$839(arg$836)) {
            return Analyzer.cast(t1);
          }
          if (TypicalSupport.match$840(arg$836)) {
            return Analyzer.cast(t1);
          }
          if (TypicalSupport.match$841(arg$836)) {
            return Analyzer.cast(t1);
          }
          if (TypicalSupport.match$842(arg$836)) {
            return Analyzer.cast(t1);
          }
          if (TypicalSupport.match$843(arg$836)) {
            return Analyzer.cast(t1);
          }
          if (TypicalSupport.match$844(arg$836)) {
            return Analyzer.cast(t1);
          }
          if (TypicalSupport.match$845(arg$836)) {
            return Analyzer.cast(new TypicalTypes.AnyT());
          }
          if (TypicalSupport.match$846(arg$836)) {
            return Analyzer.cast(new TypicalTypes.AnyT());
          }
          if (TypicalSupport.match$847(arg$836)) {
            return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> res;

              {
                res = Analyzer.cast(unify.apply(t2, strt));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.or.apply(Primitives.isNotBottom.apply(res), Primitives.isNotBottom.apply(ensureNodeType.apply(t2))) || !Primitives.or.apply(Primitives.isNotBottom.apply(res), Primitives.isNotBottom.apply(ensureNodeType.apply(t2))) ? null : t1);
              }
            }.apply());
          }
          if (TypicalSupport.match$848(arg$836)) {
            return Analyzer.cast(unify.apply(t2, t1));
          }
          if (TypicalSupport.match$849(arg$836)) {
            return Analyzer.cast(null == Primitives.isNotBottom.apply(ensureNodeType.apply(t2)) || !Primitives.isNotBottom.apply(ensureNodeType.apply(t2)) ? null : t1);
          }
          if (TypicalSupport.match$850(arg$836)) {
            return Analyzer.cast(null == Primitives.isNotBottom.apply(ensureNodeType.apply(t1)) || !Primitives.isNotBottom.apply(ensureNodeType.apply(t1)) ? null : t2);
          }
          if (TypicalSupport.match$851(arg$836)) {
            final String s1 = Analyzer.cast(arg$836.get1().getTuple().get1());
            final String s2 = Analyzer.cast(arg$836.get2().getTuple().get1());

            return Analyzer.cast(null == Primitives.equal.apply(s1, s2) || !Primitives.equal.apply(s1, s2) ? null : t1);
          }
          if (TypicalSupport.match$852(arg$836)) {
            final String s = Analyzer.cast(arg$836.get1().getTuple().get1());

            return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;
              final TypicalTypes.raw_type<?> res;

              {
                t = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", s), getNameSpace)));
                res = Analyzer.cast(unify.apply(t, t2));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isNotBottom.apply(res) || !Primitives.isNotBottom.apply(res) ? null : t1);
              }
            }.apply());
          }
          if (TypicalSupport.match$853(arg$836)) {
            return Analyzer.cast(unify.apply(t2, t1));
          }
          if (TypicalSupport.match$854(arg$836)) {
            final String str1 = Analyzer.cast(arg$836.get1().getTuple().get1());
            final String str2 = Analyzer.cast(arg$836.get2().getTuple().get1());

            return Analyzer.cast(null == Primitives.equal.apply(str1, str2) ? null : Primitives.equal.apply(str1, str2) ? t1 : new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;

              {
                t = Analyzer.cast(Analyzer.cast(Primitives.get.apply(str1, hashTable)));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isBottom.apply(t) ? null : Primitives.isBottom.apply(t) ? new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> ty;

                  {
                    ty = Analyzer.cast(Analyzer.cast(Primitives.get.apply(str2, hashTable)));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(null == Primitives.isBottom.apply(ty) ? null : Primitives.isBottom.apply(ty) ? new Let<TypicalTypes.raw_type<?>>() {
                      {
                        Analyzer.cast(Primitives.put.apply(str1, t2, hashTable));
                      }

                      public TypicalTypes.raw_type<?> apply() {
                        return Analyzer.cast(t2);
                      }
                    }.apply() : unify.apply(t1, ty));
                  }
                }.apply() : unify.apply(t, t2));
              }
            }.apply());
          }
          if (TypicalSupport.match$855(arg$836)) {
            final String str = Analyzer.cast(arg$836.get1().getTuple().get1());

            return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;

              {
                t = Analyzer.cast(Analyzer.cast(Primitives.get.apply(str, hashTable)));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isBottom.apply(t) ? null : Primitives.isBottom.apply(t) ? (null == containTypeVar.apply(t2, str) ? null : containTypeVar.apply(t2, str) ? null : new Let<TypicalTypes.raw_type<?>>() {
                  {
                    Analyzer.cast(Primitives.put.apply(str, t2, hashTable));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(t2);
                  }
                }.apply()) : unify.apply(t, t2));
              }
            }.apply());
          }
          if (TypicalSupport.match$856(arg$836)) {
            return Analyzer.cast(unify.apply(t2, t1));
          }
          if (TypicalSupport.match$857(arg$836)) {
            final TypicalTypes.raw_type<?> tl1 = Analyzer.cast(arg$836.get1().getTuple().get1());
            final TypicalTypes.raw_type<?> tr1 = Analyzer.cast(arg$836.get1().getTuple().get2());
            final TypicalTypes.raw_type<?> tl2 = Analyzer.cast(arg$836.get2().getTuple().get1());
            final TypicalTypes.raw_type<?> tr2 = Analyzer.cast(arg$836.get2().getTuple().get2());

            return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> tl;
              final TypicalTypes.raw_type<?> tr;

              {
                tl = Analyzer.cast(unify.apply(tl1, tl2));
                tr = Analyzer.cast(unify.apply(tr1, tr2));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.and.apply(Primitives.isNotBottom.apply(tl), Primitives.isNotBottom.apply(tr)) || !Primitives.and.apply(Primitives.isNotBottom.apply(tl), Primitives.isNotBottom.apply(tr)) ? null : new TypicalTypes.PairOfType(tl, tr));
              }
            }.apply());
          }
          if (TypicalSupport.match$858(arg$836)) {
            final String s1 = Analyzer.cast(arg$836.get1().getTuple().get1());
            final String s2 = Analyzer.cast(arg$836.get1().getTuple().get2());
            final TypicalTypes.raw_type<?> ty1 = Analyzer.cast(arg$836.get1().getTuple().get3());
            final String s3 = Analyzer.cast(arg$836.get2().getTuple().get1());
            final String s4 = Analyzer.cast(arg$836.get2().getTuple().get2());
            final TypicalTypes.raw_type<?> ty2 = Analyzer.cast(arg$836.get2().getTuple().get3());

            return Analyzer.cast(null == Primitives.and.apply(Primitives.equal.apply(s1, s3), Primitives.equal.apply(s2, s4)) ? null : Primitives.and.apply(Primitives.equal.apply(s1, s3), Primitives.equal.apply(s2, s4)) ? t1 : unify.apply(ty1, ty2));
          }
          if (TypicalSupport.match$859(arg$836)) {
            final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$836.get1().getTuple().get3());

            return Analyzer.cast(unify.apply(ty, t2));
          }
          if (TypicalSupport.match$860(arg$836)) {
            final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$836.get2().getTuple().get3());

            return Analyzer.cast(unify.apply(ty, t1));
          }
          if (TypicalSupport.match$861(arg$836)) {
            final Pair<TypicalTypes.raw_type<?>> tl1 = Analyzer.cast(arg$836.get1().getTuple().get1());
            final Pair<TypicalTypes.raw_type<?>> tl2 = Analyzer.cast(arg$836.get2().getTuple().get1());

            return Analyzer.cast(null == Primitives.equal.apply(Primitives.length.apply(tl1), Primitives.length.apply(tl2)) || !Primitives.equal.apply(Primitives.length.apply(tl1), Primitives.length.apply(tl2)) ? null : new Let<TypicalTypes.raw_type<?>>() {
              final Pair<TypicalTypes.raw_type<?>> tl;

              {
                tl = Analyzer.cast(unifyTwoList.apply(tl1, tl2));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isNotBottom.apply(tl) || !Primitives.isNotBottom.apply(tl) ? null : new TypicalTypes.RecordT(tl));
              }
            }.apply());
          }
          if (TypicalSupport.match$862(arg$836)) {
            final Pair<TypicalTypes.raw_type<?>> tl1 = Analyzer.cast(arg$836.get1().getTuple().get1());
            final Pair<TypicalTypes.raw_type<?>> tl2 = Analyzer.cast(arg$836.get2().getTuple().get1());

            return Analyzer.cast(null == Primitives.equal.apply(Primitives.length.apply(tl1), Primitives.length.apply(tl2)) || !Primitives.equal.apply(Primitives.length.apply(tl1), Primitives.length.apply(tl2)) ? null : new Let<TypicalTypes.raw_type<?>>() {
              final Pair<TypicalTypes.raw_type<?>> tl;

              {
                tl = Analyzer.cast(unifyTwoList.apply(tl1, tl2));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isNotBottom.apply(tl) || !Primitives.isNotBottom.apply(tl) ? null : new TypicalTypes.TupleT(tl));
              }
            }.apply());
          }
          if (TypicalSupport.match$863(arg$836)) {
            final Pair<TypicalTypes.raw_type<?>> tl1 = Analyzer.cast(arg$836.get1().getTuple().get1());
            final String s1 = Analyzer.cast(arg$836.get1().getTuple().get2());
            final Pair<TypicalTypes.raw_type<?>> tl2 = Analyzer.cast(arg$836.get2().getTuple().get1());
            final String s2 = Analyzer.cast(arg$836.get2().getTuple().get2());

            return Analyzer.cast(null == Primitives.and.apply(Primitives.equal.apply(Primitives.length.apply(tl1), Primitives.length.apply(tl2)), Primitives.equal.apply(s1, s2)) || !Primitives.and.apply(Primitives.equal.apply(Primitives.length.apply(tl1), Primitives.length.apply(tl2)), Primitives.equal.apply(s1, s2)) ? null : new Let<TypicalTypes.raw_type<?>>() {
              final Pair<TypicalTypes.raw_type<?>> tl;

              {
                tl = Analyzer.cast(unifyTwoList.apply(tl1, tl2));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isNotBottom.apply(tl) || !Primitives.isNotBottom.apply(tl) ? null : new TypicalTypes.ConstructedT(tl, s1));
              }
            }.apply());
          }
          if (TypicalSupport.match$864(arg$836)) {
            final Pair<TypicalTypes.raw_type<?>> tl1 = Analyzer.cast(arg$836.get1().getTuple().get1());

            return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> ty;

              {
                ty = Analyzer.cast(TypicalSupport.head$100.apply(tl1));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(unify.apply(ty, t2));
              }
            }.apply());
          }
          if (TypicalSupport.match$865(arg$836)) {
            final Pair<TypicalTypes.raw_type<?>> tl2 = Analyzer.cast(arg$836.get2().getTuple().get1());

            return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> ty;

              {
                ty = Analyzer.cast(TypicalSupport.head$100.apply(tl2));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(unify.apply(t1, ty));
              }
            }.apply());
          }
          if (TypicalSupport.match$866(arg$836)) {
            final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$836.get1().getTuple().get1());

            return Analyzer.cast(null == checkPolyUnify.apply(tl, t2) || !checkPolyUnify.apply(tl, t2) ? null : t1);
          }
          if (TypicalSupport.match$867(arg$836)) {
            final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$836.get2().getTuple().get1());

            return Analyzer.cast(null == checkPolyUnify.apply(tl, t1) || !checkPolyUnify.apply(tl, t1) ? null : t2);
          }
          if (TypicalSupport.match$868(arg$836)) {
            final Pair<TypicalTypes.raw_type<?>> tl1 = Analyzer.cast(arg$836.get1().getTuple().get1());
            final Pair<TypicalTypes.raw_type<?>> tl2 = Analyzer.cast(arg$836.get2().getTuple().get1());

            return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> h1;
              final TypicalTypes.raw_type<?> h2;

              {
                h1 = Analyzer.cast(TypicalSupport.head$100.apply(tl1));
                h2 = Analyzer.cast(TypicalSupport.head$100.apply(tl2));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> arg$869 = Analyzer.cast(new Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>(h1, h2));

                    if ((null == arg$869)) {
                      return null;
                    }
                    if (TypicalSupport.match$870(arg$869)) {
                      final String p1 = Analyzer.cast(arg$869.get1().getTuple().get1());
                      final String p2 = Analyzer.cast(arg$869.get2().getTuple().get1());

                      return Analyzer.cast(null == Primitives.equal.apply(p1, p2) || !Primitives.equal.apply(p1, p2) ? null : null == Primitives.not.apply(hasTypeVariables.apply(p1)) ? null : Primitives.not.apply(hasTypeVariables.apply(p1)) ? new TypicalTypes.TypeName(p1) : new Let<TypicalTypes.raw_type<?>>() {
                        final Pair<TypicalTypes.raw_type<?>> tl;

                        {
                          tl = Analyzer.cast(unifyTwoList.apply(tl1, tl2));
                        }

                        public TypicalTypes.raw_type<?> apply() {
                          return Analyzer.cast(null == Primitives.isNotBottom.apply(tl) || !Primitives.isNotBottom.apply(tl) ? null : new TypicalTypes.VariantT(tl));
                        }
                      }.apply());
                    }
                    if (true) {
                      return Analyzer.cast(null);
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());
          }
          if (TypicalSupport.match$872(arg$836)) {
            final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$836.get1().getTuple().get1());
            final String p2 = Analyzer.cast(arg$836.get2().getTuple().get1());
            final String s2 = Analyzer.cast(arg$836.get2().getTuple().get2());

            return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> h;

              {
                h = Analyzer.cast(TypicalSupport.head$100.apply(tl));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final TypicalTypes.raw_type<?> arg$873 = Analyzer.cast(h);

                    if ((null == arg$873)) {
                      return null;
                    }
                    if ((null != arg$873))
                                            switch (arg$873.tag()) {
                      case ConstructorT:
                        if (TypicalSupport.match$96(arg$873)) {
                          final String p1 = Analyzer.cast(arg$873.getTuple().get1());

                          return Analyzer.cast(null == Primitives.equal.apply(p1, p2) || !Primitives.equal.apply(p1, p2) ? null : null == Primitives.not.apply(hasTypeVariables.apply(p1)) ? null : Primitives.not.apply(hasTypeVariables.apply(p1)) ? new TypicalTypes.TypeName(p1) : new Let<TypicalTypes.raw_type<?>>() {
                            final TypicalTypes.raw_type<?> t;
                            final TypicalTypes.raw_type<?> res;

                            {
                              t = Analyzer.cast(getConstructorType.apply(s2, tl));
                              res = Analyzer.cast(unify.apply(t, t2));
                            }

                            public TypicalTypes.raw_type<?> apply() {
                              return Analyzer.cast(null == Primitives.isNotBottom.apply(res) || !Primitives.isNotBottom.apply(res) ? null : t1);
                            }
                          }.apply());
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(null);
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());
          }
          if (TypicalSupport.match$876(arg$836)) {
            return Analyzer.cast(unify.apply(t2, t1));
          }
          if (TypicalSupport.match$870(arg$836)) {
            final String s1 = Analyzer.cast(arg$836.get1().getTuple().get1());
            final String s2 = Analyzer.cast(arg$836.get1().getTuple().get2());
            final TypicalTypes.raw_type<?> ty1 = Analyzer.cast(arg$836.get1().getTuple().get3());
            final String s3 = Analyzer.cast(arg$836.get2().getTuple().get1());
            final String s4 = Analyzer.cast(arg$836.get2().getTuple().get2());
            final TypicalTypes.raw_type<?> ty2 = Analyzer.cast(arg$836.get2().getTuple().get3());

            return Analyzer.cast(null == Primitives.equal.apply(s1, s3) || !Primitives.equal.apply(s1, s3) ? null : null == Primitives.not.apply(hasTypeVariables.apply(s1)) ? null : Primitives.not.apply(hasTypeVariables.apply(s1)) ? (null == Primitives.equal.apply(s2, s4) ? null : Primitives.equal.apply(s2, s4) ? t1 : new TypicalTypes.TypeName(s1)) : null == Primitives.equal.apply(s2, s4) ? null : Primitives.equal.apply(s2, s4) ? new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> res;

              {
                res = Analyzer.cast(unify.apply(ty1, ty2));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.isNotBottom.apply(res) ? null : Primitives.isNotBottom.apply(res) ? new TypicalTypes.ConstructorT(s1, s2, res) : null == Primitives.isBottom.apply(ty1) ? null : Primitives.isBottom.apply(ty1) ? t1 : null);
              }
            }.apply() : new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> t;
              final TypicalTypes.raw_type<?> res1;
              final TypicalTypes.raw_type<?> res2;

              {
                t = Analyzer.cast(copy.apply(new TypicalTypes.TypeName(s1)));
                res1 = Analyzer.cast(unify.apply(t, t1));
                res2 = Analyzer.cast(unify.apply(res1, t2));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(res2);
              }
            }.apply());
          }
          if (TypicalSupport.match$878(arg$836)) {
            final Pair<TypicalTypes.raw_type<?>> tl1 = Analyzer.cast(arg$836.get1().getTuple().get1());
            final TypicalTypes.raw_type<?> ret1 = Analyzer.cast(arg$836.get1().getTuple().get2());
            final Pair<TypicalTypes.raw_type<?>> tl2 = Analyzer.cast(arg$836.get2().getTuple().get1());
            final TypicalTypes.raw_type<?> ret2 = Analyzer.cast(arg$836.get2().getTuple().get2());

            return Analyzer.cast(null == Primitives.equal.apply(Primitives.length.apply(tl1), Primitives.length.apply(tl2)) || !Primitives.equal.apply(Primitives.length.apply(tl1), Primitives.length.apply(tl2)) ? null : new Let<TypicalTypes.raw_type<?>>() {
              final Pair<TypicalTypes.raw_type<?>> tl;
              final TypicalTypes.raw_type<?> ret;

              {
                tl = Analyzer.cast(unifyTwoList.apply(tl1, tl2));
                ret = Analyzer.cast(unify.apply(ret1, ret2));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(null == Primitives.and.apply(Primitives.isNotBottom.apply(tl), Primitives.isNotBottom.apply(ret)) || !Primitives.and.apply(Primitives.isNotBottom.apply(tl), Primitives.isNotBottom.apply(ret)) ? null : new TypicalTypes.FunctionT(tl, ret));
              }
            }.apply());
          }
          if (true) {
            return Analyzer.cast(null);
          }
          return null;
        }
      }.apply());
    }
  };

  final Function.F2<Boolean, TypicalTypes.raw_type<?>, String> containTypeVar = new Function.F2<Boolean, TypicalTypes.raw_type<?>, String>() {
    public Boolean apply(final TypicalTypes.raw_type<?> t, final String s) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final TypicalTypes.raw_type<?> arg$880 = Analyzer.cast(t);

          if ((null == arg$880)) {
            return null;
          }
          if ((null != arg$880))
                        switch (arg$880.tag()) {
            case ConstructedT:
              if (TypicalSupport.match$111(arg$880)) {
                final Pair<TypicalTypes.raw_type<?>> l = Analyzer.cast(arg$880.getTuple().get1());

                return Analyzer.cast(containTypeVarList.apply(l, s));
              }
              break;
            case TupleT:
              if (TypicalSupport.match$110(arg$880)) {
                final Pair<TypicalTypes.raw_type<?>> l = Analyzer.cast(arg$880.getTuple().get1());

                return Analyzer.cast(containTypeVarList.apply(l, s));
              }
              break;
            case FunctionT:
              if (TypicalSupport.match$99(arg$880)) {
                final Pair<TypicalTypes.raw_type<?>> l = Analyzer.cast(arg$880.getTuple().get1());
                final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$880.getTuple().get2());

                return Analyzer.cast(Primitives.or.apply(containTypeVar.apply(ty, s), containTypeVarList.apply(l, s)));
              }
              break;
            case PairOfType:
              if (TypicalSupport.match$112(arg$880)) {
                final TypicalTypes.raw_type<?> t1 = Analyzer.cast(arg$880.getTuple().get1());
                final TypicalTypes.raw_type<?> t2 = Analyzer.cast(arg$880.getTuple().get2());

                return Analyzer.cast(Primitives.or.apply(containTypeVar.apply(t1, s), containTypeVar.apply(t2, s)));
              }
              break;
            case VariableT:
              if (TypicalSupport.match$113(arg$880)) {
                final String str = Analyzer.cast(arg$880.getTuple().get1());

                return Analyzer.cast(null == Primitives.equal.apply(s, str) ? null : Primitives.equal.apply(s, str) ? Boolean.TRUE : new Let<Boolean>() {
                  final TypicalTypes.raw_type<?> ty;

                  {
                    ty = Analyzer.cast(Analyzer.cast(Primitives.get.apply(str, hashTable)));
                  }

                  public Boolean apply() {
                    return Analyzer.cast(null == Primitives.isBottom.apply(ty) ? null : Primitives.isBottom.apply(ty) ? Boolean.FALSE : containTypeVar.apply(ty, s));
                  }
                }.apply());
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(Boolean.FALSE);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, Pair<TypicalTypes.raw_type<?>>, String> containTypeVarList = new Function.F2<Boolean, Pair<TypicalTypes.raw_type<?>>, String>() {
    public Boolean apply(final Pair<TypicalTypes.raw_type<?>> l, final String s) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.raw_type<?>> arg$887 = Analyzer.cast(l);

          if ((null == arg$887)) {
            return null;
          }
          if (TypicalSupport.match$118(arg$887)) {
            return Analyzer.cast(Boolean.FALSE);
          }
          if ((null != arg$887 && !((Pair)arg$887).isEmpty())) {
            final Pair<TypicalTypes.raw_type<?>> list$889 = Analyzer.cast(arg$887);
            final TypicalTypes.raw_type<?> x = Analyzer.cast(Primitives.wrapHead(list$889));
            final Pair<TypicalTypes.raw_type<?>> xs = Analyzer.cast(Primitives.wrapTail(list$889));

            return Analyzer.cast(Primitives.or.apply(containTypeVar.apply(x, s), containTypeVarList.apply(xs, s)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.raw_type<?>>> unifyTwoList = new Function.F2<Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.raw_type<?>>>() {
    public Pair<TypicalTypes.raw_type<?>> apply(final Pair<TypicalTypes.raw_type<?>> tl1, final Pair<TypicalTypes.raw_type<?>> tl2) {
      return new Match<Pair<TypicalTypes.raw_type<?>>>() {
        public Pair<TypicalTypes.raw_type<?>> apply() {
          final Pair<TypicalTypes.raw_type<?>> arg$891 = Analyzer.cast(tl1);

          if ((null == arg$891)) {
            return null;
          }
          if (TypicalSupport.match$118(arg$891)) {
            return Analyzer.cast(Pair.<TypicalTypes.raw_type<?>>empty());
          }
          if ((null != arg$891 && !((Pair)arg$891).isEmpty())) {
            final Pair<TypicalTypes.raw_type<?>> list$893 = Analyzer.cast(arg$891);
            final TypicalTypes.raw_type<?> x = Analyzer.cast(Primitives.wrapHead(list$893));
            final Pair<TypicalTypes.raw_type<?>> xs = Analyzer.cast(Primitives.wrapTail(list$893));

            return Analyzer.cast(new Match<Pair<TypicalTypes.raw_type<?>>>() {
              public Pair<TypicalTypes.raw_type<?>> apply() {
                final Pair<TypicalTypes.raw_type<?>> arg$894 = Analyzer.cast(tl2);

                if ((null == arg$894)) {
                  return null;
                }
                if ((null != arg$894 && !((Pair)arg$894).isEmpty())) {
                  final Pair<TypicalTypes.raw_type<?>> list$895 = Analyzer.cast(arg$894);
                  final TypicalTypes.raw_type<?> y = Analyzer.cast(Primitives.wrapHead(list$895));
                  final Pair<TypicalTypes.raw_type<?>> ys = Analyzer.cast(Primitives.wrapTail(list$895));

                  return Analyzer.cast(new Let<Pair<TypicalTypes.raw_type<?>>>() {
                    final TypicalTypes.raw_type<?> t;

                    {
                      t = Analyzer.cast(unify.apply(x, y));
                    }

                    public Pair<TypicalTypes.raw_type<?>> apply() {
                      return Analyzer.cast(null == Primitives.isNotBottom.apply(t) || !Primitives.isNotBottom.apply(t) ? null : Primitives.wrapCons(t, unifyTwoList.apply(xs, ys)));
                    }
                  }.apply());
                }
                if (true) {
                  return Analyzer.cast(null);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<TypicalTypes.raw_type<?>, String, Pair<TypicalTypes.raw_type<?>>> getConstructorType = new Function.F2<TypicalTypes.raw_type<?>, String, Pair<TypicalTypes.raw_type<?>>>() {
    public TypicalTypes.raw_type<?> apply(final String name, final Pair<TypicalTypes.raw_type<?>> tl) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final Pair<TypicalTypes.raw_type<?>> arg$898 = Analyzer.cast(tl);

          if ((null == arg$898)) {
            return null;
          }
          if (TypicalSupport.match$118(arg$898)) {
            return Analyzer.cast(null);
          }
          if ((null != arg$898 && !((Pair)arg$898).isEmpty())) {
            final Pair<TypicalTypes.raw_type<?>> list$900 = Analyzer.cast(arg$898);
            final TypicalTypes.raw_type<?> x = Analyzer.cast(Primitives.wrapHead(list$900));
            final Pair<TypicalTypes.raw_type<?>> xs = Analyzer.cast(Primitives.wrapTail(list$900));

            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
              public TypicalTypes.raw_type<?> apply() {
                final TypicalTypes.raw_type<?> arg$901 = Analyzer.cast(x);

                if ((null == arg$901)) {
                  return null;
                }
                if ((null != arg$901))
                                    switch (arg$901.tag()) {
                  case ConstructorT:
                    if (TypicalSupport.match$96(arg$901)) {
                      final String s = Analyzer.cast(arg$901.getTuple().get2());

                      return Analyzer.cast(null == Primitives.equal.apply(name, s) ? null : Primitives.equal.apply(name, s) ? x : getConstructorType.apply(name, xs));
                    }
                    break;
                  default:
                    break;
                  };
                if (true) {
                  return Analyzer.cast(null);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<TypicalTypes.raw_type<?>, String, Pair<TypicalTypes.raw_type<?>>> getFieldType = new Function.F2<TypicalTypes.raw_type<?>, String, Pair<TypicalTypes.raw_type<?>>>() {
    public TypicalTypes.raw_type<?> apply(final String name, final Pair<TypicalTypes.raw_type<?>> tl) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final Pair<TypicalTypes.raw_type<?>> arg$905 = Analyzer.cast(tl);

          if ((null == arg$905)) {
            return null;
          }
          if (TypicalSupport.match$118(arg$905)) {
            return Analyzer.cast(null);
          }
          if ((null != arg$905 && !((Pair)arg$905).isEmpty())) {
            final Pair<TypicalTypes.raw_type<?>> list$907 = Analyzer.cast(arg$905);
            final TypicalTypes.raw_type<?> x = Analyzer.cast(Primitives.wrapHead(list$907));
            final Pair<TypicalTypes.raw_type<?>> xs = Analyzer.cast(Primitives.wrapTail(list$907));

            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
              public TypicalTypes.raw_type<?> apply() {
                final TypicalTypes.raw_type<?> arg$908 = Analyzer.cast(x);

                if ((null == arg$908)) {
                  return null;
                }
                if ((null != arg$908))
                                    switch (arg$908.tag()) {
                  case FieldT:
                    if (TypicalSupport.match$98(arg$908)) {
                      final String s = Analyzer.cast(arg$908.getTuple().get2());

                      return Analyzer.cast(null == Primitives.equal.apply(name, s) ? null : Primitives.equal.apply(name, s) ? x : getFieldType.apply(name, xs));
                    }
                    break;
                  default:
                    break;
                  };
                if (true) {
                  return Analyzer.cast(null);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, Pair<TypicalTypes.raw_type<?>>, TypicalTypes.raw_type<?>> checkPolyUnify = new Function.F2<Boolean, Pair<TypicalTypes.raw_type<?>>, TypicalTypes.raw_type<?>>() {
    public Boolean apply(final Pair<TypicalTypes.raw_type<?>> tl, final TypicalTypes.raw_type<?> t) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.raw_type<?>> arg$912 = Analyzer.cast(tl);

          if ((null == arg$912)) {
            return null;
          }
          if (TypicalSupport.match$118(arg$912)) {
            return Analyzer.cast(Boolean.FALSE);
          }
          if ((null != arg$912 && !((Pair)arg$912).isEmpty())) {
            final Pair<TypicalTypes.raw_type<?>> list$914 = Analyzer.cast(arg$912);
            final TypicalTypes.raw_type<?> x = Analyzer.cast(Primitives.wrapHead(list$914));
            final Pair<TypicalTypes.raw_type<?>> xs = Analyzer.cast(Primitives.wrapTail(list$914));

            return Analyzer.cast(new Let<Boolean>() {
              final TypicalTypes.raw_type<?> res;

              {
                res = Analyzer.cast(unify.apply(x, t));
              }

              public Boolean apply() {
                return Analyzer.cast(null == Primitives.isNotBottom.apply(res) ? null : Primitives.isNotBottom.apply(res) ? Boolean.TRUE : checkPolyUnify.apply(xs, t));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Object, Node> scanNode = new Function.F1<Object, Node>() {
    public Object apply(final Node n) {
      return new Match<Object>() {
        public Object apply() {
          final Node arg$916 = GNode.cast(n);

          if ((null == arg$916)) {
            return null;
          }
          if (TypicalSupport.match$74(arg$916)) {
            final String s = (arg$916.size() > 0 ? arg$916.getString(0) : null);

            matching_nodes.add(arg$916);
            if ((null != arg$916 && processScopeNodes.contains(arg$916.getName()))) {
              processScope(arg$916, getScope);
            }
            checkEnterScope(arg$916);

            final Object retValue$921 = Analyzer.cast(new Require<Object>() {
              public Object apply() {
                final Boolean var$918 = Primitives.not.apply(isDefined.apply(n, getNameSpace));

                if ((null != var$918 && !var$918)) {
                  showMessage("error", Primitives.concat.apply(s, " has been previously defined"), n);
                }
                if ((null == var$918)) {
                  return null;
                }
                if (var$918) {
                  return new Let<Object>() {
                    {
                      redefine.apply(n, wildt, getNameSpace);
                      define3.apply(GNode.create("NameSpaceStructure", s, null, null), n, getNameSpace);
                    }

                    public Object apply() {
                      return Analyzer.cast(null);
                    }
                  }.apply();
                }
                return null;
              }
            }.apply());

            checkExitScope(arg$916);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$921);
          }
          if (TypicalSupport.match$22(arg$916)) {
            final String s = (arg$916.size() > 1 ? arg$916.getString(1) : null);

            matching_nodes.add(arg$916);
            if ((null != arg$916 && processScopeNodes.contains(arg$916.getName()))) {
              processScope(arg$916, getScope);
            }
            checkEnterScope(arg$916);

            final Object retValue$926 = Analyzer.cast(new Require<Object>() {
              public Object apply() {
                final Boolean var$923 = Primitives.not.apply(isDefined.apply(n, getNameSpace));

                if ((null != var$923 && !var$923)) {
                  showMessage("error", Primitives.concat.apply(Primitives.concat.apply("type ", s), " has been previously defined"), n);
                }
                if ((null == var$923)) {
                  return null;
                }
                if (var$923) {
                  return new Let<Object>() {
                    {
                      redefine.apply(GNode.create("NameSpaceStructure", s, null, null), n, getNameSpace);
                      redefine.apply(n, wildt, getNameSpace);
                    }

                    public Object apply() {
                      return Analyzer.cast(null);
                    }
                  }.apply();
                }
                return null;
              }
            }.apply());

            checkExitScope(arg$916);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$926);
          }
          if (true) {
            matching_nodes.add(arg$916);
            if ((null != arg$916 && processScopeNodes.contains(arg$916.getName()))) {
              processScope(arg$916, getScope);
            }
            checkEnterScope(arg$916);

            final Object retValue$929 = Analyzer.cast(null);

            checkExitScope(arg$916);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$929);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.raw_type<?>, Node> analyzeTypeDefinition = new Function.F1<TypicalTypes.raw_type<?>, Node>() {
    public TypicalTypes.raw_type<?> apply(final Node n) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final Node arg$931 = GNode.cast(n);

          if ((null == arg$931)) {
            return null;
          }
          if (TypicalSupport.match$932(arg$931)) {
            matching_nodes.add(arg$931);
            if ((null != arg$931 && processScopeNodes.contains(arg$931.getName()))) {
              processScope(arg$931, getScope);
            }
            checkEnterScope(arg$931);

            final Object retValue$935 = Analyzer.cast(analyze.apply(n));

            checkExitScope(arg$931);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$935);
          }
          if (true) {
            matching_nodes.add(arg$931);
            if ((null != arg$931 && processScopeNodes.contains(arg$931.getName()))) {
              processScope(arg$931, getScope);
            }
            checkEnterScope(arg$931);

            final Object retValue$938 = Analyzer.cast(null);

            checkExitScope(arg$931);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$938);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<TypicalTypes.raw_type<?>>, Pair<Node>> processAttributes = new Function.F1<Pair<TypicalTypes.raw_type<?>>, Pair<Node>>() {
    public Pair<TypicalTypes.raw_type<?>> apply(final Pair<Node> nl) {
      return new Match<Pair<TypicalTypes.raw_type<?>>>() {
        public Pair<TypicalTypes.raw_type<?>> apply() {
          final Pair<Node> arg$940 = Analyzer.cast(nl);

          if ((null == arg$940)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$940)) {
            return Analyzer.cast(Pair.<TypicalTypes.raw_type<?>>empty());
          }
          if ((null != arg$940 && !((Pair)arg$940).isEmpty())) {
            final Pair<Node> list$942 = Analyzer.cast(arg$940);
            final Node x = GNode.cast(Primitives.wrapHead(list$942));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$942));

            return Analyzer.cast(new Match<Pair<TypicalTypes.raw_type<?>>>() {
              public Pair<TypicalTypes.raw_type<?>> apply() {
                final Node arg$943 = GNode.cast(x);

                if ((null == arg$943)) {
                  return null;
                }
                if (TypicalSupport.match$944(arg$943)) {
                  matching_nodes.add(arg$943);
                  if ((null != arg$943 && processScopeNodes.contains(arg$943.getName()))) {
                    processScope(arg$943, getScope);
                  }
                  checkEnterScope(arg$943);

                  final Object retValue$947 = Analyzer.cast(Primitives.wrapCons(analyze.apply(x), processAttributes.apply(xs)));

                  checkExitScope(arg$943);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$947);
                }
                if (TypicalSupport.match$948(arg$943)) {
                  matching_nodes.add(arg$943);
                  if ((null != arg$943 && processScopeNodes.contains(arg$943.getName()))) {
                    processScope(arg$943, getScope);
                  }
                  checkEnterScope(arg$943);

                  final Object retValue$951 = Analyzer.cast(Primitives.wrapCons(analyze.apply(x), processAttributes.apply(xs)));

                  checkExitScope(arg$943);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$951);
                }
                if (true) {
                  matching_nodes.add(arg$943);
                  if ((null != arg$943 && processScopeNodes.contains(arg$943.getName()))) {
                    processScope(arg$943, getScope);
                  }
                  checkEnterScope(arg$943);

                  final Object retValue$954 = Analyzer.cast(processAttributes.apply(xs));

                  checkExitScope(arg$943);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$954);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Object, Pair<Node>> processScopeSpace = new Function.F1<Object, Pair<Node>>() {
    public Object apply(final Pair<Node> nl) {
      return new Let<Object>() {
        final Pair<Node> noList;
        final Node n1;
        final Node n2;
        final Pair<TypicalTypes.call> calls1;
        final Pair<TypicalTypes.call> calls2;
        final Pair<String> callees1;
        final Pair<String> callees2;

        {
          noList = Analyzer.cast(getScopeSpace.apply(nl, Pair.<Node>empty()));
          n1 = Analyzer.cast(TypicalSupport.head$245.apply(noList));
          n2 = Analyzer.cast(TypicalSupport.head$245.apply(TypicalSupport.tail$244.apply(noList)));
          calls1 = Analyzer.cast(getCall.apply(n1, "", Pair.<TypicalTypes.call>empty()));
          calls2 = Analyzer.cast(getCall.apply(n2, "", Pair.<TypicalTypes.call>empty()));
          callees1 = Analyzer.cast(getCallees.apply(calls1, Pair.<String>empty()));
          callees2 = Analyzer.cast(getCallees.apply(calls2, Pair.<String>empty()));
        }

        public Object apply() {
          return Analyzer.cast(visitFunctions.apply(TypicalSupport.union$273.apply(callees1, callees2), nl));
        }
      }.apply();
    }
  };

  final Function.F2<Pair<Node>, Pair<Node>, Pair<Node>> getScopeSpace = new Function.F2<Pair<Node>, Pair<Node>, Pair<Node>>() {
    public Pair<Node> apply(final Pair<Node> nl, final Pair<Node> res) {
      return new Match<Pair<Node>>() {
        public Pair<Node> apply() {
          final Pair<Node> arg$957 = Analyzer.cast(nl);

          if ((null == arg$957)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$957)) {
            return Analyzer.cast(res);
          }
          if ((null != arg$957 && !((Pair)arg$957).isEmpty())) {
            final Pair<Node> list$959 = Analyzer.cast(arg$957);
            final Node x = GNode.cast(Primitives.wrapHead(list$959));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$959));

            return Analyzer.cast(new Match<Pair<Node>>() {
              public Pair<Node> apply() {
                final Node arg$960 = GNode.cast(x);

                if ((null == arg$960)) {
                  return null;
                }
                if (TypicalSupport.match$961(arg$960)) {
                  matching_nodes.add(arg$960);
                  if ((null != arg$960 && processScopeNodes.contains(arg$960.getName()))) {
                    processScope(arg$960, getScope);
                  }
                  checkEnterScope(arg$960);

                  final Object retValue$964 = Analyzer.cast(getScopeSpace.apply(xs, Primitives.wrapCons(x, res)));

                  checkExitScope(arg$960);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$964);
                }
                if (TypicalSupport.match$965(arg$960)) {
                  matching_nodes.add(arg$960);
                  if ((null != arg$960 && processScopeNodes.contains(arg$960.getName()))) {
                    processScope(arg$960, getScope);
                  }
                  checkEnterScope(arg$960);

                  final Object retValue$968 = Analyzer.cast(getScopeSpace.apply(xs, Primitives.wrapCons(x, res)));

                  checkExitScope(arg$960);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$968);
                }
                if (true) {
                  matching_nodes.add(arg$960);
                  if ((null != arg$960 && processScopeNodes.contains(arg$960.getName()))) {
                    processScope(arg$960, getScope);
                  }
                  checkEnterScope(arg$960);

                  final Object retValue$971 = Analyzer.cast(getScopeSpace.apply(xs, res));

                  checkExitScope(arg$960);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$971);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Object, Pair<String>, Pair<Node>> visitFunctions = new Function.F2<Object, Pair<String>, Pair<Node>>() {
    public Object apply(final Pair<String> strL, final Pair<Node> nl) {
      return new Match<Object>() {
        public Object apply() {
          final Pair<Node> arg$974 = Analyzer.cast(nl);

          if ((null == arg$974)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$974)) {
            return Analyzer.cast(null);
          }
          if ((null != arg$974 && !((Pair)arg$974).isEmpty())) {
            final Pair<Node> list$976 = Analyzer.cast(arg$974);
            final Node x = GNode.cast(Primitives.wrapHead(list$976));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$976));

            return Analyzer.cast(new Match<Object>() {
              public Object apply() {
                final Node arg$977 = GNode.cast(x);

                if ((null == arg$977)) {
                  return null;
                }
                if (TypicalSupport.match$74(arg$977)) {
                  final String s = (arg$977.size() > 0 ? arg$977.getString(0) : null);

                  matching_nodes.add(arg$977);
                  if ((null != arg$977 && processScopeNodes.contains(arg$977.getName()))) {
                    processScope(arg$977, getScope);
                  }
                  checkEnterScope(arg$977);

                  final Object retValue$981 = Analyzer.cast(null == Primitives.contains.apply(s, strL) ? null : Primitives.contains.apply(s, strL) ? new Let<Object>() {
                    {
                      analyze.apply(x);
                    }

                    public Object apply() {
                      return Analyzer.cast(visitFunctions.apply(strL, xs));
                    }
                  }.apply() : visitFunctions.apply(strL, xs));

                  checkExitScope(arg$977);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$981);
                }
                if (true) {
                  matching_nodes.add(arg$977);
                  if ((null != arg$977 && processScopeNodes.contains(arg$977.getName()))) {
                    processScope(arg$977, getScope);
                  }
                  checkEnterScope(arg$977);

                  final Object retValue$984 = Analyzer.cast(visitFunctions.apply(strL, xs));

                  checkExitScope(arg$977);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$984);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<String>, Pair<TypicalTypes.call>, Pair<String>> getCallees = new Function.F2<Pair<String>, Pair<TypicalTypes.call>, Pair<String>>() {
    public Pair<String> apply(final Pair<TypicalTypes.call> cl, final Pair<String> res) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<TypicalTypes.call> arg$987 = Analyzer.cast(cl);

          if ((null == arg$987)) {
            return null;
          }
          if (TypicalSupport.match$988(arg$987)) {
            return Analyzer.cast(res);
          }
          if ((null != arg$987 && !((Pair)arg$987).isEmpty())) {
            final Pair<TypicalTypes.call> list$989 = Analyzer.cast(arg$987);
            final TypicalTypes.call x = Analyzer.cast(Primitives.wrapHead(list$989));
            final Pair<TypicalTypes.call> xs = Analyzer.cast(Primitives.wrapTail(list$989));

            return Analyzer.cast(new Let<Pair<String>>() {
              final String name;

              {
                name = Analyzer.cast(null == x ? null : x.callee);
              }

              public Pair<String> apply() {
                return Analyzer.cast(getCallees.apply(xs, Primitives.wrapCons(name, res)));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<String>, String, Node> getTypeNames = new Function.F2<Pair<String>, String, Node>() {
    public Pair<String> apply(final String s, final Node n) {
      return (null == Primitives.isBottom.apply(n) ? null : Primitives.isBottom.apply(n) ? Pair.<String>empty() : new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Node arg$991 = GNode.cast(n);

          if ((null == arg$991)) {
            return null;
          }
          if (TypicalSupport.match$167(arg$991)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$991, 0, arg$991.size()));

            matching_nodes.add(arg$991);
            if ((null != arg$991 && processScopeNodes.contains(arg$991.getName()))) {
              processScope(arg$991, getScope);
            }
            checkEnterScope(arg$991);

            final Object retValue$995 = Analyzer.cast(getTypeNameList.apply(s, nl));

            checkExitScope(arg$991);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$995);
          }
          if (TypicalSupport.match$175(arg$991)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$991, 0, arg$991.size()));

            matching_nodes.add(arg$991);
            if ((null != arg$991 && processScopeNodes.contains(arg$991.getName()))) {
              processScope(arg$991, getScope);
            }
            checkEnterScope(arg$991);

            final Object retValue$999 = Analyzer.cast(getTypeNameList.apply(s, nl));

            checkExitScope(arg$991);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$999);
          }
          if (TypicalSupport.match$748(arg$991)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$991, 0, arg$991.size()));

            matching_nodes.add(arg$991);
            if ((null != arg$991 && processScopeNodes.contains(arg$991.getName()))) {
              processScope(arg$991, getScope);
            }
            checkEnterScope(arg$991);

            final Object retValue$1003 = Analyzer.cast(getTypeNameList.apply(s, nl));

            checkExitScope(arg$991);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1003);
          }
          if (TypicalSupport.match$744(arg$991)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$991, 0, arg$991.size()));

            matching_nodes.add(arg$991);
            if ((null != arg$991 && processScopeNodes.contains(arg$991.getName()))) {
              processScope(arg$991, getScope);
            }
            checkEnterScope(arg$991);

            final Object retValue$1007 = Analyzer.cast(getTypeNameList.apply(s, nl));

            checkExitScope(arg$991);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1007);
          }
          if (TypicalSupport.match$14(arg$991)) {
            final Node no = (arg$991.size() > 1 ? arg$991.getGeneric(1) : null);

            matching_nodes.add(arg$991);
            if ((null != arg$991 && processScopeNodes.contains(arg$991.getName()))) {
              processScope(arg$991, getScope);
            }
            checkEnterScope(arg$991);

            final Object retValue$1011 = Analyzer.cast(getTypeNames.apply(s, no));

            checkExitScope(arg$991);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1011);
          }
          if (TypicalSupport.match$30(arg$991)) {
            final String str = (arg$991.size() > 0 ? arg$991.getString(0) : null);

            matching_nodes.add(arg$991);
            if ((null != arg$991 && processScopeNodes.contains(arg$991.getName()))) {
              processScope(arg$991, getScope);
            }
            checkEnterScope(arg$991);

            final Object retValue$1015 = Analyzer.cast(null == Primitives.or.apply(Primitives.equal.apply(s, str), Primitives.not.apply(isDefined.apply(GNode.create("UserDefinedType", str), getNameSpace))) ? null : Primitives.or.apply(Primitives.equal.apply(s, str), Primitives.not.apply(isDefined.apply(GNode.create("UserDefinedType", str), getNameSpace))) ? Pair.<String>empty() : new Pair<String>(str));

            checkExitScope(arg$991);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1015);
          }
          if (TypicalSupport.match$18(arg$991)) {
            final String str = (arg$991.size() > 1 ? arg$991.getString(1) : null);

            matching_nodes.add(arg$991);
            if ((null != arg$991 && processScopeNodes.contains(arg$991.getName()))) {
              processScope(arg$991, getScope);
            }
            checkEnterScope(arg$991);

            final Object retValue$1019 = Analyzer.cast(null == isDefined.apply(GNode.create("UserDefinedType", str), getNameSpace) ? null : isDefined.apply(GNode.create("UserDefinedType", str), getNameSpace) ? new Let<Pair<String>>() {
              final Node no;

              {
                no = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("NameSpaceStructure", str, null, null), getNameSpace)));
                Primitives.annotate.apply(no, "monomorphic", wildt);
              }

              public Pair<String> apply() {
                return Analyzer.cast(null == Primitives.equal.apply(s, str) ? null : Primitives.equal.apply(s, str) ? Pair.<String>empty() : new Pair<String>(str));
              }
            }.apply() : Pair.<String>empty());

            checkExitScope(arg$991);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1019);
          }
          if (TypicalSupport.match$26(arg$991)) {
            final Node tn = (arg$991.size() > 0 ? arg$991.getGeneric(0) : null);

            matching_nodes.add(arg$991);
            if ((null != arg$991 && processScopeNodes.contains(arg$991.getName()))) {
              processScope(arg$991, getScope);
            }
            checkEnterScope(arg$991);

            final Object retValue$1023 = Analyzer.cast(getTypeNames.apply(s, tn));

            checkExitScope(arg$991);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1023);
          }
          if (true) {
            matching_nodes.add(arg$991);
            if ((null != arg$991 && processScopeNodes.contains(arg$991.getName()))) {
              processScope(arg$991, getScope);
            }
            checkEnterScope(arg$991);

            final Object retValue$1026 = Analyzer.cast(Pair.<String>empty());

            checkExitScope(arg$991);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1026);
          }
          return null;
        }
      }.apply());
    }
  };

  final Function.F2<Pair<String>, String, Pair<Node>> getTypeNameList = new Function.F2<Pair<String>, String, Pair<Node>>() {
    public Pair<String> apply(final String s, final Pair<Node> nl) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<Node> arg$1028 = Analyzer.cast(nl);

          if ((null == arg$1028)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1028)) {
            return Analyzer.cast(Pair.<String>empty());
          }
          if ((null != arg$1028 && !((Pair)arg$1028).isEmpty())) {
            final Pair<Node> list$1030 = Analyzer.cast(arg$1028);
            final Node x = GNode.cast(Primitives.wrapHead(list$1030));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1030));

            return Analyzer.cast(TypicalSupport.union$273.apply(getTypeNames.apply(s, x), getTypeNameList.apply(s, xs)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<String>, String, Pair<Node>> getReachableTypes = new Function.F2<Pair<String>, String, Pair<Node>>() {
    public Pair<String> apply(final String s, final Pair<Node> nl) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<Node> arg$1032 = Analyzer.cast(nl);

          if ((null == arg$1032)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1032)) {
            return Analyzer.cast(null);
          }
          if ((null != arg$1032 && !((Pair)arg$1032).isEmpty())) {
            final Pair<Node> list$1034 = Analyzer.cast(arg$1032);
            final Node x = GNode.cast(Primitives.wrapHead(list$1034));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1034));

            return Analyzer.cast(new Match<Pair<String>>() {
              public Pair<String> apply() {
                final Node arg$1035 = GNode.cast(x);

                if ((null == arg$1035)) {
                  return null;
                }
                if (TypicalSupport.match$22(arg$1035)) {
                  final String str = (arg$1035.size() > 1 ? arg$1035.getString(1) : null);
                  final Node n = (arg$1035.size() > 2 ? arg$1035.getGeneric(2) : null);

                  matching_nodes.add(arg$1035);
                  if ((null != arg$1035 && processScopeNodes.contains(arg$1035.getName()))) {
                    processScope(arg$1035, getScope);
                  }
                  checkEnterScope(arg$1035);

                  final Object retValue$1039 = Analyzer.cast(null == Primitives.equal.apply(str, s) ? null : Primitives.equal.apply(str, s) ? new Let<Pair<String>>() {
                    {
                      Primitives.annotate.apply(x, "__node", wildt);
                    }

                    public Pair<String> apply() {
                      return Analyzer.cast(getTypeNames.apply(s, n));
                    }
                  }.apply() : getReachableTypes.apply(s, xs));

                  checkExitScope(arg$1035);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$1039);
                }
                if (true) {
                  matching_nodes.add(arg$1035);
                  if ((null != arg$1035 && processScopeNodes.contains(arg$1035.getName()))) {
                    processScope(arg$1035, getScope);
                  }
                  checkEnterScope(arg$1035);

                  final Object retValue$1042 = Analyzer.cast(getReachableTypes.apply(s, xs));

                  checkExitScope(arg$1035);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$1042);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<String>, Pair<Node>> getNodeTypes = new Function.F1<Pair<String>, Pair<Node>>() {
    public Pair<String> apply(final Pair<Node> nl) {
      return new Let<Pair<String>>() {
        final Pair<String> strL;

        {
          strL = Analyzer.cast(getReachableTypes.apply(nodeType, nl));
        }

        public Pair<String> apply() {
          return Analyzer.cast(null == Primitives.isBottom.apply(strL) ? null : Primitives.isBottom.apply(strL) ? error("Can not find the root node definition", null) : processNodeType.apply(strL, nl, new Pair<String>(nodeType)));
        }
      }.apply();
    }
  };

  final Function.F3<Pair<String>, Pair<String>, Pair<Node>, Pair<String>> processNodeType = new Function.F3<Pair<String>, Pair<String>, Pair<Node>, Pair<String>>() {
    public Pair<String> apply(final Pair<String> strL, final Pair<Node> nl, final Pair<String> resL) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<String> arg$1045 = Analyzer.cast(strL);

          if ((null == arg$1045)) {
            return null;
          }
          if (TypicalSupport.match$1046(arg$1045)) {
            return Analyzer.cast(resL);
          }
          if ((null != arg$1045 && !((Pair)arg$1045).isEmpty())) {
            final Pair<String> list$1047 = Analyzer.cast(arg$1045);
            final String x = Analyzer.cast(Primitives.wrapHead(list$1047));
            final Pair<String> xs = Analyzer.cast(Primitives.wrapTail(list$1047));

            return Analyzer.cast(null == Primitives.contains.apply(x, resL) ? null : Primitives.contains.apply(x, resL) ? processNodeType.apply(xs, nl, resL) : new Let<Pair<String>>() {
              final Pair<String> l;
              final Pair<String> newStrL;

              {
                l = Analyzer.cast(getReachableTypes.apply(x, nl));
                newStrL = Analyzer.cast(unionAppend.apply(xs, l));
              }

              public Pair<String> apply() {
                return Analyzer.cast(processNodeType.apply(newStrL, nl, Primitives.wrapCons(x, resL)));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<String>, Pair<String>, Pair<String>> unionAppend = new Function.F2<Pair<String>, Pair<String>, Pair<String>>() {
    public Pair<String> apply(final Pair<String> l1, final Pair<String> l2) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<String> arg$1049 = Analyzer.cast(l2);

          if ((null == arg$1049)) {
            return null;
          }
          if (TypicalSupport.match$1046(arg$1049)) {
            return Analyzer.cast(l1);
          }
          if ((null != arg$1049 && !((Pair)arg$1049).isEmpty())) {
            final Pair<String> list$1051 = Analyzer.cast(arg$1049);
            final String x = Analyzer.cast(Primitives.wrapHead(list$1051));
            final Pair<String> xs = Analyzer.cast(Primitives.wrapTail(list$1051));

            return Analyzer.cast(null == Primitives.contains.apply(x, l1) ? null : Primitives.contains.apply(x, l1) ? unionAppend.apply(l1, xs) : new Let<Pair<String>>() {
              final Pair<String> l;

              {
                l = Analyzer.cast(TypicalSupport.append$262.apply(l1, new Pair<String>(x)));
              }

              public Pair<String> apply() {
                return Analyzer.cast(unionAppend.apply(l, xs));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Boolean, String> reachableFromNode = new Function.F1<Boolean, String>() {
    public Boolean apply(final String s) {
      return (null == Primitives.equal.apply(nodeType, s) ? null : Primitives.equal.apply(nodeType, s) ? Boolean.TRUE : null == isDefined.apply(GNode.create("NameSpaceStructure", s, null, null), getNameSpace) ? null : isDefined.apply(GNode.create("NameSpaceStructure", s, null, null), getNameSpace) ? new Let<Boolean>() {
        final Node nod;

        {
          nod = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("NameSpaceStructure", s, null, null), getNameSpace)));
        }

        public Boolean apply() {
          return Analyzer.cast(Primitives.hasAnnotation.apply(nod, "__node"));
        }
      }.apply() : Boolean.FALSE);
    }
  };

  final Function.F2<Boolean, Node, Node> checkMonomorphic = new Function.F2<Boolean, Node, Node>() {
    public Boolean apply(final Node n, final Node dec) {
      return (null == Primitives.not.apply(Primitives.hasAnnotation.apply(n, "monomorphic")) ? null : Primitives.not.apply(Primitives.hasAnnotation.apply(n, "monomorphic")) ? Boolean.TRUE : new Match<Boolean>() {
        public Boolean apply() {
          final Node arg$1053 = GNode.cast(dec);

          if ((null == arg$1053)) {
            return null;
          }
          if (TypicalSupport.match$1054(arg$1053)) {
            matching_nodes.add(arg$1053);
            if ((null != arg$1053 && processScopeNodes.contains(arg$1053.getName()))) {
              processScope(arg$1053, getScope);
            }
            checkEnterScope(arg$1053);

            final Object retValue$1057 = Analyzer.cast(Boolean.FALSE);

            checkExitScope(arg$1053);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1057);
          }
          if (true) {
            matching_nodes.add(arg$1053);
            if ((null != arg$1053 && processScopeNodes.contains(arg$1053.getName()))) {
              processScope(arg$1053, getScope);
            }
            checkEnterScope(arg$1053);

            final Object retValue$1060 = Analyzer.cast(Boolean.TRUE);

            checkExitScope(arg$1053);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1060);
          }
          return null;
        }
      }.apply());
    }
  };

  final Function.F2<Pair<TypicalTypes.entry>, Pair<Node>, Pair<TypicalTypes.entry>> analyzeBindings = new Function.F2<Pair<TypicalTypes.entry>, Pair<Node>, Pair<TypicalTypes.entry>>() {
    public Pair<TypicalTypes.entry> apply(final Pair<Node> nl, final Pair<TypicalTypes.entry> enList) {
      return new Match<Pair<TypicalTypes.entry>>() {
        public Pair<TypicalTypes.entry> apply() {
          final Pair<Node> arg$1062 = Analyzer.cast(nl);

          if ((null == arg$1062)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1062)) {
            return Analyzer.cast(enList);
          }
          if ((null != arg$1062 && !((Pair)arg$1062).isEmpty())) {
            final Pair<Node> list$1064 = Analyzer.cast(arg$1062);
            final Node x = GNode.cast(Primitives.wrapHead(list$1064));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1064));

            return Analyzer.cast(new Let<Pair<TypicalTypes.entry>>() {
              final TypicalTypes.entry en;

              {
                en = Analyzer.cast(analyzeBinding.apply(x));
              }

              public Pair<TypicalTypes.entry> apply() {
                return Analyzer.cast(null == Primitives.isNotBottom.apply(en) ? null : Primitives.isNotBottom.apply(en) ? (null == Primitives.isBottom.apply(null == en ? null : en.entryName) ? null : Primitives.isBottom.apply(null == en ? null : en.entryName) ? analyzeBindings.apply(xs, enList) : null == Primitives.not.apply(checkDefined.apply(null == en ? null : en.entryName, enList)) ? null : Primitives.not.apply(checkDefined.apply(null == en ? null : en.entryName, enList)) ? analyzeBindings.apply(xs, TypicalSupport.append$1065.apply(enList, new Pair<TypicalTypes.entry>(en))) : new Let<Pair<TypicalTypes.entry>>() {
                  {
                    error(Primitives.concat.apply(null == en ? null : en.entryName, " has been previously defined"), x);
                  }

                  public Pair<TypicalTypes.entry> apply() {
                    return Analyzer.cast(analyzeBindings.apply(xs, TypicalSupport.append$1065.apply(enList, null)));
                  }
                }.apply()) : analyzeBindings.apply(xs, TypicalSupport.append$1065.apply(enList, new Pair<TypicalTypes.entry>(en))));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, String, Pair<TypicalTypes.entry>> checkDefined = new Function.F2<Boolean, String, Pair<TypicalTypes.entry>>() {
    public Boolean apply(final String name, final Pair<TypicalTypes.entry> enList) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.entry> arg$1067 = Analyzer.cast(enList);

          if ((null == arg$1067)) {
            return null;
          }
          if (TypicalSupport.match$1068(arg$1067)) {
            return Analyzer.cast(Boolean.FALSE);
          }
          if ((null != arg$1067 && !((Pair)arg$1067).isEmpty())) {
            final Pair<TypicalTypes.entry> list$1069 = Analyzer.cast(arg$1067);
            final TypicalTypes.entry x = Analyzer.cast(Primitives.wrapHead(list$1069));
            final Pair<TypicalTypes.entry> xs = Analyzer.cast(Primitives.wrapTail(list$1069));

            return Analyzer.cast(null == Primitives.equal.apply(name, null == x ? null : x.entryName) ? null : Primitives.equal.apply(name, null == x ? null : x.entryName) ? Boolean.TRUE : checkDefined.apply(name, xs));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.entry, Node> analyzeBinding = new Function.F1<TypicalTypes.entry, Node>() {
    public TypicalTypes.entry apply(final Node n) {
      return new Match<TypicalTypes.entry>() {
        public TypicalTypes.entry apply() {
          final Node arg$1071 = GNode.cast(n);

          if ((null == arg$1071)) {
            return null;
          }
          if (TypicalSupport.match$1072(arg$1071)) {
            final Node l = (arg$1071.size() > 0 ? arg$1071.getGeneric(0) : null);
            final Node r = (arg$1071.size() > 1 ? arg$1071.getGeneric(1) : null);

            matching_nodes.add(arg$1071);
            if ((null != arg$1071 && processScopeNodes.contains(arg$1071.getName()))) {
              processScope(arg$1071, getScope);
            }
            checkEnterScope(arg$1071);

            final Object retValue$1089 = Analyzer.cast(new Let<TypicalTypes.entry>() {
              final TypicalTypes.raw_type<?> tr;

              {
                tr = Analyzer.cast(analyze.apply(r));
              }

              public TypicalTypes.entry apply() {
                return Analyzer.cast(null == Primitives.isNotBottom.apply(tr) || !Primitives.isNotBottom.apply(tr) ? null : new Match<TypicalTypes.entry>() {
                  public TypicalTypes.entry apply() {
                    final Node arg$1073 = GNode.cast(l);

                    if ((null == arg$1073)) {
                      return null;
                    }
                    if (TypicalSupport.match$1074(arg$1073)) {
                      final Node var = Analyzer.cast(arg$1073.getGeneric(0));
                      final Node typ = (arg$1073.size() > 1 ? arg$1073.getGeneric(1) : null);

                      matching_nodes.add(arg$1073);
                      if ((null != arg$1073 && processScopeNodes.contains(arg$1073.getName()))) {
                        processScope(arg$1073, getScope);
                      }
                      checkEnterScope(arg$1073);

                      final Object retValue$1078 = Analyzer.cast(new Let<TypicalTypes.entry>() {
                        final TypicalTypes.raw_type<?> ty;
                        final String s;

                        {
                          ty = Analyzer.cast(analyze.apply(typ));
                          s = Analyzer.cast(getString.apply(var));
                          new Guard<TypicalTypes.raw_type<?>>() {
                            public TypicalTypes.raw_type<?> apply() {
                              if ((null == ty)) {
                                return null;
                              }
                              if ((null == tr)) {
                                return null;
                              }
                              if ((null == unify)) {
                                return null;
                              }

                              final TypicalTypes.raw_type<?> result$1075 = unify.apply(tr, ty);

                              if ((null == result$1075)) {
                                return Analyzer.cast(error("types of left and right expressions do not match", null));
                              }
                              return result$1075;
                            }
                          }.apply();
                          Primitives.annotate.apply(var, "__type", ty);
                          Primitives.annotate.apply(l, "__type", ty);
                          Primitives.annotate.apply(n, "__type", ty);
                        }

                        public TypicalTypes.entry apply() {
                          return Analyzer.cast(new TypicalTypes.entry(s, ty));
                        }
                      }.apply());

                      checkExitScope(arg$1073);
                      matching_nodes.remove(matching_nodes.size() - 1);
                      return Analyzer.cast(retValue$1078);
                    }
                    if (TypicalSupport.match$66(arg$1073)) {
                      final String s = (arg$1073.size() > 0 ? arg$1073.getString(0) : null);

                      matching_nodes.add(arg$1073);
                      if ((null != arg$1073 && processScopeNodes.contains(arg$1073.getName()))) {
                        processScope(arg$1073, getScope);
                      }
                      checkEnterScope(arg$1073);

                      final Object retValue$1082 = Analyzer.cast(new Let<TypicalTypes.entry>() {
                        {
                          Primitives.annotate.apply(l, "__type", tr);
                          Primitives.annotate.apply(n, "__type", tr);
                        }

                        public TypicalTypes.entry apply() {
                          return Analyzer.cast(new TypicalTypes.entry(s, tr));
                        }
                      }.apply());

                      checkExitScope(arg$1073);
                      matching_nodes.remove(matching_nodes.size() - 1);
                      return Analyzer.cast(retValue$1082);
                    }
                    if (true) {
                      matching_nodes.add(arg$1073);
                      if ((null != arg$1073 && processScopeNodes.contains(arg$1073.getName()))) {
                        processScope(arg$1073, getScope);
                      }
                      checkEnterScope(arg$1073);

                      final Object retValue$1085 = Analyzer.cast(new Let<TypicalTypes.entry>() {
                        {
                          Primitives.annotate.apply(l, "__type", tr);
                          Primitives.annotate.apply(n, "__type", tr);
                        }

                        public TypicalTypes.entry apply() {
                          return Analyzer.cast(new TypicalTypes.entry(null, tr));
                        }
                      }.apply());

                      checkExitScope(arg$1073);
                      matching_nodes.remove(matching_nodes.size() - 1);
                      return Analyzer.cast(retValue$1085);
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$1071);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1089);
          }
          if (true) {
            matching_nodes.add(arg$1071);
            if ((null != arg$1071 && processScopeNodes.contains(arg$1071.getName()))) {
              processScope(arg$1071, getScope);
            }
            checkEnterScope(arg$1071);

            final Object retValue$1092 = Analyzer.cast(null);

            checkExitScope(arg$1071);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1092);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<TypicalTypes.raw_type<?>, Node, Pair<TypicalTypes.entry>> analyzeExpression = new Function.F2<TypicalTypes.raw_type<?>, Node, Pair<TypicalTypes.entry>>() {
    public TypicalTypes.raw_type<?> apply(final Node n, final Pair<TypicalTypes.entry> enList) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final Node arg$1094 = GNode.cast(n);

          if ((null == arg$1094)) {
            return null;
          }
          if (true) {
            matching_nodes.add(arg$1094);
            if ((null != arg$1094 && processScopeNodes.contains(arg$1094.getName()))) {
              processScope(arg$1094, getScope);
            }
            checkEnterScope(arg$1094);

            final Object retValue$1098 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              {
                TypicalSupport.map$1095.apply(defineEntry, enList);
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(analyze.apply(n));
              }
            }.apply());

            checkExitScope(arg$1094);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1098);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Object, TypicalTypes.entry> defineEntry = new Function.F1<Object, TypicalTypes.entry>() {
    public Object apply(final TypicalTypes.entry en) {
      return new Let<Object>() {
        {
          redefine.apply(GNode.create("LowerID", null == en ? null : en.entryName), null == en ? null : en.entryType, getNameSpace);
        }

        public Object apply() {
          return Analyzer.cast(null);
        }
      }.apply();
    }
  };

  final Function.F1<Boolean, TypicalTypes.raw_type<?>> isNodeType = new Function.F1<Boolean, TypicalTypes.raw_type<?>>() {
    public Boolean apply(final TypicalTypes.raw_type<?> t) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final TypicalTypes.raw_type<?> arg$1100 = Analyzer.cast(t);

          if ((null == arg$1100)) {
            return null;
          }
          if ((null != arg$1100))
                        switch (arg$1100.tag()) {
            case ConstructedT:
              if (TypicalSupport.match$1111(arg$1100)) {
                return Analyzer.cast(Boolean.TRUE);
              }
              break;
            case FieldT:
              if (TypicalSupport.match$98(arg$1100)) {
                final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$1100.getTuple().get3());

                return Analyzer.cast(isNodeType.apply(ty));
              }
              break;
            case ConstructorT:
              if (TypicalSupport.match$96(arg$1100)) {
                final String s = Analyzer.cast(arg$1100.getTuple().get1());

                return Analyzer.cast(reachableFromNode.apply(s));
              }
              break;
            case VariantT:
              if (TypicalSupport.match$102(arg$1100)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1100.getTuple().get1());

                return Analyzer.cast(new Let<Boolean>() {
                  final TypicalTypes.raw_type<?> ty;

                  {
                    ty = Analyzer.cast(TypicalSupport.head$100.apply(tl));
                  }

                  public Boolean apply() {
                    return Analyzer.cast(new Match<Boolean>() {
                      public Boolean apply() {
                        final TypicalTypes.raw_type<?> arg$1105 = Analyzer.cast(ty);

                        if ((null == arg$1105)) {
                          return null;
                        }
                        if ((null != arg$1105))
                                                    switch (arg$1105.tag()) {
                          case ConstructorT:
                            if (TypicalSupport.match$96(arg$1105)) {
                              final String s = Analyzer.cast(arg$1105.getTuple().get1());

                              return Analyzer.cast(reachableFromNode.apply(s));
                            }
                            break;
                          default:
                            break;
                          };
                        if (true) {
                          return Analyzer.cast(null);
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply());
              }
              break;
            case NodeTypeT:
              if (TypicalSupport.match$115(arg$1100)) {
                return Analyzer.cast(Boolean.TRUE);
              }
              break;
            case TypeName:
              if (TypicalSupport.match$97(arg$1100)) {
                final String s = Analyzer.cast(arg$1100.getTuple().get1());

                return Analyzer.cast(reachableFromNode.apply(s));
              }
              break;
            case PolyVariantT:
              if (TypicalSupport.match$114(arg$1100)) {
                return Analyzer.cast(Boolean.TRUE);
              }
              break;
            case VariableT:
              if (TypicalSupport.match$113(arg$1100)) {
                final String str = Analyzer.cast(arg$1100.getTuple().get1());

                return Analyzer.cast(new Let<Boolean>() {
                  final TypicalTypes.raw_type<?> t1;

                  {
                    t1 = Analyzer.cast(Analyzer.cast(Primitives.get.apply(str, hashTable)));
                  }

                  public Boolean apply() {
                    return Analyzer.cast(null == Primitives.isBottom.apply(t1) ? null : Primitives.isBottom.apply(t1) ? Boolean.FALSE : isNodeType.apply(t1));
                  }
                }.apply());
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(Boolean.FALSE);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> ensureNodeType = new Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>() {
    public TypicalTypes.raw_type<?> apply(final TypicalTypes.raw_type<?> t) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final TypicalTypes.raw_type<?> arg$1113 = Analyzer.cast(t);

          if ((null == arg$1113)) {
            return null;
          }
          if ((null != arg$1113))
                        switch (arg$1113.tag()) {
            case ConstructedT:
              if (TypicalSupport.match$1111(arg$1113)) {
                return Analyzer.cast(nodet);
              }
              break;
            case VariableT:
              if (TypicalSupport.match$113(arg$1113)) {
                final String str = Analyzer.cast(arg$1113.getTuple().get1());

                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> t1;

                  {
                    t1 = Analyzer.cast(Analyzer.cast(Primitives.get.apply(str, hashTable)));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(null == Primitives.isBottom.apply(t1) ? null : Primitives.isBottom.apply(t1) ? new Let<TypicalTypes.raw_type<?>>() {
                      {
                        Analyzer.cast(Primitives.put.apply(str, nodet, hashTable));
                      }

                      public TypicalTypes.raw_type<?> apply() {
                        return Analyzer.cast(nodet);
                      }
                    }.apply() : ensureNodeType.apply(t1));
                  }
                }.apply());
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(null == isNodeType.apply(t) || !isNodeType.apply(t) ? null : nodet);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> ensureNodeList = new Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>() {
    public TypicalTypes.raw_type<?> apply(final TypicalTypes.raw_type<?> t) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final TypicalTypes.raw_type<?> arg$1117 = Analyzer.cast(t);

          if ((null == arg$1117)) {
            return null;
          }
          if ((null != arg$1117))
                        switch (arg$1117.tag()) {
            case ConstructedT:
              if (TypicalSupport.match$1119(arg$1117)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1117.getTuple().get1());

                return Analyzer.cast(ensureNodeType.apply(TypicalSupport.head$100.apply(tl)));
              }
              break;
            case VariableT:
              if (TypicalSupport.match$113(arg$1117)) {
                final String str = Analyzer.cast(arg$1117.getTuple().get1());

                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> t1;

                  {
                    t1 = Analyzer.cast(Analyzer.cast(Primitives.get.apply(str, hashTable)));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(null == Primitives.isBottom.apply(t1) ? null : Primitives.isBottom.apply(t1) ? new Let<TypicalTypes.raw_type<?>>() {
                      {
                        Analyzer.cast(Primitives.put.apply(str, new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(nodet), "list"), hashTable));
                      }

                      public TypicalTypes.raw_type<?> apply() {
                        return Analyzer.cast(nodet);
                      }
                    }.apply() : ensureNodeList.apply(t1));
                  }
                }.apply());
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(null);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.raw_type<?>, Pair<TypicalTypes.raw_type<?>>> checkNodeList = new Function.F1<TypicalTypes.raw_type<?>, Pair<TypicalTypes.raw_type<?>>>() {
    public TypicalTypes.raw_type<?> apply(final Pair<TypicalTypes.raw_type<?>> tl) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final Pair<TypicalTypes.raw_type<?>> arg$1121 = Analyzer.cast(tl);

          if ((null == arg$1121)) {
            return null;
          }
          if (TypicalSupport.match$118(arg$1121)) {
            return Analyzer.cast(nodet);
          }
          if ((null != arg$1121 && !((Pair)arg$1121).isEmpty())) {
            final Pair<TypicalTypes.raw_type<?>> list$1123 = Analyzer.cast(arg$1121);
            final TypicalTypes.raw_type<?> x = Analyzer.cast(Primitives.wrapHead(list$1123));
            final Pair<TypicalTypes.raw_type<?>> xs = Analyzer.cast(Primitives.wrapTail(list$1123));

            return Analyzer.cast(null == isNodeType.apply(x) ? null : isNodeType.apply(x) ? checkNodeList.apply(xs) : error(Primitives.concat.apply("expected node, found ", getTypeName.apply(x)), null));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Boolean, TypicalTypes.raw_type<?>> isNodeList = new Function.F1<Boolean, TypicalTypes.raw_type<?>>() {
    public Boolean apply(final TypicalTypes.raw_type<?> t) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final TypicalTypes.raw_type<?> arg$1125 = Analyzer.cast(t);

          if ((null == arg$1125)) {
            return null;
          }
          if ((null != arg$1125))
                        switch (arg$1125.tag()) {
            case ConstructedT:
              if (TypicalSupport.match$1119(arg$1125)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1125.getTuple().get1());

                return Analyzer.cast(isNodeType.apply(TypicalSupport.head$100.apply(tl)));
              }
              break;
            case VariableT:
              if (TypicalSupport.match$113(arg$1125)) {
                final String str = Analyzer.cast(arg$1125.getTuple().get1());

                return Analyzer.cast(new Let<Boolean>() {
                  final TypicalTypes.raw_type<?> t1;

                  {
                    t1 = Analyzer.cast(Analyzer.cast(Primitives.get.apply(str, hashTable)));
                  }

                  public Boolean apply() {
                    return Analyzer.cast(null == Primitives.isBottom.apply(t1) ? null : Primitives.isBottom.apply(t1) ? Boolean.FALSE : isNodeList.apply(t1));
                  }
                }.apply());
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(Boolean.FALSE);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Boolean, TypicalTypes.raw_type<?>> isListType = new Function.F1<Boolean, TypicalTypes.raw_type<?>>() {
    public Boolean apply(final TypicalTypes.raw_type<?> t) {
      return new Let<Boolean>() {
        final TypicalTypes.raw_type<?> lt;

        {
          lt = Analyzer.cast(new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(wildt), "list"));
        }

        public Boolean apply() {
          return Analyzer.cast(new Match<Boolean>() {
            public Boolean apply() {
              final TypicalTypes.raw_type<?> arg$1129 = Analyzer.cast(t);

              if ((null == arg$1129)) {
                return null;
              }
              if ((null != arg$1129))
                                switch (arg$1129.tag()) {
                case ConstructedT:
                  if (TypicalSupport.match$1119(arg$1129)) {
                    return Analyzer.cast(Boolean.TRUE);
                  }
                  break;
                case FieldT:
                  if (TypicalSupport.match$98(arg$1129)) {
                    final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$1129.getTuple().get3());

                    return Analyzer.cast(Primitives.isNotBottom.apply(unify.apply(ty, lt)));
                  }
                  break;
                case WildcardT:
                  if (TypicalSupport.match$94(arg$1129)) {
                    return Analyzer.cast(Boolean.TRUE);
                  }
                  break;
                case TypeName:
                  if (TypicalSupport.match$97(arg$1129)) {
                    return Analyzer.cast(Primitives.isNotBottom.apply(unify.apply(t, lt)));
                  }
                  break;
                case VariableT:
                  if (TypicalSupport.match$113(arg$1129)) {
                    return Analyzer.cast(Boolean.TRUE);
                  }
                  break;
                default:
                  break;
                };
              if (true) {
                return Analyzer.cast(Boolean.FALSE);
              }
              return null;
            }
          }.apply());
        }
      }.apply();
    }
  };

  final Function.F3<Boolean, Pair<Node>, BigInteger, BigInteger> checkBindings = new Function.F3<Boolean, Pair<Node>, BigInteger, BigInteger>() {
    public Boolean apply(final Pair<Node> nl, final BigInteger index, final BigInteger var) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<Node> arg$1136 = Analyzer.cast(nl);

          if ((null == arg$1136)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1136)) {
            return Analyzer.cast(Primitives.lessEqualInt.apply(index, BigInteger.valueOf(1)));
          }
          if ((null != arg$1136 && !((Pair)arg$1136).isEmpty())) {
            final Pair<Node> list$1138 = Analyzer.cast(arg$1136);
            final Node x = GNode.cast(Primitives.wrapHead(list$1138));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1138));

            return Analyzer.cast(null == Primitives.hasAnnotation.apply(x, "has_bindings") ? null : Primitives.hasAnnotation.apply(x, "has_bindings") ? (null == Primitives.and.apply(Primitives.equal.apply(index, BigInteger.valueOf(0)), Primitives.equal.apply(var, BigInteger.valueOf(0))) ? null : Primitives.and.apply(Primitives.equal.apply(index, BigInteger.valueOf(0)), Primitives.equal.apply(var, BigInteger.valueOf(0))) ? checkBindings.apply(xs, BigInteger.valueOf(1), BigInteger.valueOf(0)) : Boolean.FALSE) : null == Primitives.hasAnnotation.apply(x, "variables") ? null : Primitives.hasAnnotation.apply(x, "variables") ? (null == Primitives.equal.apply(index, BigInteger.valueOf(0)) ? null : Primitives.equal.apply(index, BigInteger.valueOf(0)) ? checkBindings.apply(xs, BigInteger.valueOf(0), Primitives.addInt.apply(var, BigInteger.valueOf(1))) : Boolean.FALSE) : checkBindings.apply(xs, index, var));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<String>, Pair<Node>> combineVariables = new Function.F1<Pair<String>, Pair<Node>>() {
    public Pair<String> apply(final Pair<Node> nl) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<Node> arg$1140 = Analyzer.cast(nl);

          if ((null == arg$1140)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1140)) {
            return Analyzer.cast(Pair.<String>empty());
          }
          if ((null != arg$1140 && !((Pair)arg$1140).isEmpty())) {
            final Pair<Node> list$1142 = Analyzer.cast(arg$1140);
            final Node x = GNode.cast(Primitives.wrapHead(list$1142));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1142));

            return Analyzer.cast(TypicalSupport.union$273.apply(retrieveVariables.apply(x), combineVariables.apply(xs)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, Pair<String>, Pair<Node>> haveSameVariables = new Function.F2<Boolean, Pair<String>, Pair<Node>>() {
    public Boolean apply(final Pair<String> strList, final Pair<Node> nl) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<Node> arg$1144 = Analyzer.cast(nl);

          if ((null == arg$1144)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1144)) {
            return Analyzer.cast(Boolean.TRUE);
          }
          if ((null != arg$1144 && !((Pair)arg$1144).isEmpty())) {
            final Pair<Node> list$1146 = Analyzer.cast(arg$1144);
            final Node x = GNode.cast(Primitives.wrapHead(list$1146));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1146));

            return Analyzer.cast(new Let<Boolean>() {
              final Pair<String> xList;

              {
                xList = Analyzer.cast(retrieveVariables.apply(x));
              }

              public Boolean apply() {
                return Analyzer.cast(null == Primitives.and.apply(listContains.apply(strList, xList), listContains.apply(xList, strList)) ? null : Primitives.and.apply(listContains.apply(strList, xList), listContains.apply(xList, strList)) ? haveSameVariables.apply(strList, xs) : Boolean.FALSE);
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<String>, Node> retrieveVariables = new Function.F1<Pair<String>, Node>() {
    public Pair<String> apply(final Node n) {
      return (null == Primitives.hasAnnotation.apply(n, "variables") ? null : Primitives.hasAnnotation.apply(n, "variables") ? new Let<Pair<String>>() {
        final TypicalTypes.raw_type<?> ty;

        {
          ty = Analyzer.cast(Primitives.getAnnotation.apply(n, "variables"));
        }

        public Pair<String> apply() {
          return Analyzer.cast(new Match<Pair<String>>() {
            public Pair<String> apply() {
              final TypicalTypes.raw_type<?> arg$1148 = Analyzer.cast(ty);

              if ((null == arg$1148)) {
                return null;
              }
              if ((null != arg$1148))
                                switch (arg$1148.tag()) {
                case StringList:
                  if (TypicalSupport.match$1149(arg$1148)) {
                    final Pair<String> res = Analyzer.cast(arg$1148.getTuple().get1());

                    return Analyzer.cast(res);
                  }
                  break;
                default:
                  break;
                };
              if (true) {
                return Analyzer.cast(null);
              }
              return null;
            }
          }.apply());
        }
      }.apply() : Pair.<String>empty());
    }
  };

  final Function.F2<Boolean, Pair<String>, Pair<String>> listContains = new Function.F2<Boolean, Pair<String>, Pair<String>>() {
    public Boolean apply(final Pair<String> l1, final Pair<String> l2) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<String> arg$1151 = Analyzer.cast(l2);

          if ((null == arg$1151)) {
            return null;
          }
          if (TypicalSupport.match$1046(arg$1151)) {
            return Analyzer.cast(Boolean.TRUE);
          }
          if ((null != arg$1151 && !((Pair)arg$1151).isEmpty())) {
            final Pair<String> list$1153 = Analyzer.cast(arg$1151);
            final String x = Analyzer.cast(Primitives.wrapHead(list$1153));
            final Pair<String> xs = Analyzer.cast(Primitives.wrapTail(list$1153));

            return Analyzer.cast(Primitives.and.apply(Primitives.contains.apply(x, l1), listContains.apply(l1, xs)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<String, Node> getString = new Function.F1<String, Node>() {
    public String apply(final Node n) {
      return new Match<String>() {
        public String apply() {
          final Node arg$1155 = GNode.cast(n);

          if ((null == arg$1155)) {
            return null;
          }
          if (TypicalSupport.match$62(arg$1155)) {
            final String str = (arg$1155.size() > 0 ? arg$1155.getString(0) : null);

            matching_nodes.add(arg$1155);
            if ((null != arg$1155 && processScopeNodes.contains(arg$1155.getName()))) {
              processScope(arg$1155, getScope);
            }
            checkEnterScope(arg$1155);

            final Object retValue$1159 = Analyzer.cast(str);

            checkExitScope(arg$1155);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1159);
          }
          if (TypicalSupport.match$2(arg$1155)) {
            final String str = (arg$1155.size() > 0 ? arg$1155.getString(0) : null);

            matching_nodes.add(arg$1155);
            if ((null != arg$1155 && processScopeNodes.contains(arg$1155.getName()))) {
              processScope(arg$1155, getScope);
            }
            checkEnterScope(arg$1155);

            final Object retValue$1163 = Analyzer.cast(str);

            checkExitScope(arg$1155);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1163);
          }
          if (TypicalSupport.match$736(arg$1155)) {
            final String str = (arg$1155.size() > 0 ? arg$1155.getString(0) : null);

            matching_nodes.add(arg$1155);
            if ((null != arg$1155 && processScopeNodes.contains(arg$1155.getName()))) {
              processScope(arg$1155, getScope);
            }
            checkEnterScope(arg$1155);

            final Object retValue$1167 = Analyzer.cast(str);

            checkExitScope(arg$1155);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1167);
          }
          if (TypicalSupport.match$66(arg$1155)) {
            final String str = (arg$1155.size() > 0 ? arg$1155.getString(0) : null);

            matching_nodes.add(arg$1155);
            if ((null != arg$1155 && processScopeNodes.contains(arg$1155.getName()))) {
              processScope(arg$1155, getScope);
            }
            checkEnterScope(arg$1155);

            final Object retValue$1171 = Analyzer.cast(str);

            checkExitScope(arg$1155);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1171);
          }
          if (TypicalSupport.match$70(arg$1155)) {
            final String str = (arg$1155.size() > 0 ? arg$1155.getString(0) : null);

            matching_nodes.add(arg$1155);
            if ((null != arg$1155 && processScopeNodes.contains(arg$1155.getName()))) {
              processScope(arg$1155, getScope);
            }
            checkEnterScope(arg$1155);

            final Object retValue$1175 = Analyzer.cast(str);

            checkExitScope(arg$1155);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1175);
          }
          if (true) {
            matching_nodes.add(arg$1155);
            if ((null != arg$1155 && processScopeNodes.contains(arg$1155.getName()))) {
              processScope(arg$1155, getScope);
            }
            checkEnterScope(arg$1155);

            final Object retValue$1178 = Analyzer.cast(null);

            checkExitScope(arg$1155);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1178);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<String>, Node> getStringList = new Function.F1<Pair<String>, Node>() {
    public Pair<String> apply(final Node n) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Node arg$1180 = GNode.cast(n);

          if ((null == arg$1180)) {
            return null;
          }
          if (TypicalSupport.match$719(arg$1180)) {
            final Pair<String> strL = Analyzer.cast(Primitives.getChildren(arg$1180, 0, arg$1180.size()));

            matching_nodes.add(arg$1180);
            if ((null != arg$1180 && processScopeNodes.contains(arg$1180.getName()))) {
              processScope(arg$1180, getScope);
            }
            checkEnterScope(arg$1180);

            final Object retValue$1184 = Analyzer.cast(strL);

            checkExitScope(arg$1180);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1184);
          }
          if (true) {
            matching_nodes.add(arg$1180);
            if ((null != arg$1180 && processScopeNodes.contains(arg$1180.getName()))) {
              processScope(arg$1180, getScope);
            }
            checkEnterScope(arg$1180);

            final Object retValue$1187 = Analyzer.cast(null);

            checkExitScope(arg$1180);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1187);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<String, TypicalTypes.raw_type<?>> getParent = new Function.F1<String, TypicalTypes.raw_type<?>>() {
    public String apply(final TypicalTypes.raw_type<?> t) {
      return new Match<String>() {
        public String apply() {
          final TypicalTypes.raw_type<?> arg$1189 = Analyzer.cast(t);

          if ((null == arg$1189)) {
            return null;
          }
          if ((null != arg$1189))
                        switch (arg$1189.tag()) {
            case FieldT:
              if (TypicalSupport.match$98(arg$1189)) {
                final String s = Analyzer.cast(arg$1189.getTuple().get1());

                return Analyzer.cast(s);
              }
              break;
            case ConstructorT:
              if (TypicalSupport.match$96(arg$1189)) {
                final String s = Analyzer.cast(arg$1189.getTuple().get1());

                return Analyzer.cast(s);
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(null);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<Node>, Node> getNodeList = new Function.F1<Pair<Node>, Node>() {
    public Pair<Node> apply(final Node n) {
      return new Match<Pair<Node>>() {
        public Pair<Node> apply() {
          final Node arg$1193 = GNode.cast(n);

          if ((null == arg$1193)) {
            return null;
          }
          if (TypicalSupport.match$1194(arg$1193)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1193, 0, arg$1193.size()));

            matching_nodes.add(arg$1193);
            if ((null != arg$1193 && processScopeNodes.contains(arg$1193.getName()))) {
              processScope(arg$1193, getScope);
            }
            checkEnterScope(arg$1193);

            final Object retValue$1197 = Analyzer.cast(nl);

            checkExitScope(arg$1193);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1197);
          }
          if (TypicalSupport.match$1198(arg$1193)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1193, 0, arg$1193.size()));

            matching_nodes.add(arg$1193);
            if ((null != arg$1193 && processScopeNodes.contains(arg$1193.getName()))) {
              processScope(arg$1193, getScope);
            }
            checkEnterScope(arg$1193);

            final Object retValue$1201 = Analyzer.cast(nl);

            checkExitScope(arg$1193);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1201);
          }
          if (TypicalSupport.match$1202(arg$1193)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1193, 0, arg$1193.size()));

            matching_nodes.add(arg$1193);
            if ((null != arg$1193 && processScopeNodes.contains(arg$1193.getName()))) {
              processScope(arg$1193, getScope);
            }
            checkEnterScope(arg$1193);

            final Object retValue$1205 = Analyzer.cast(nl);

            checkExitScope(arg$1193);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1205);
          }
          if (TypicalSupport.match$218(arg$1193)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1193, 0, arg$1193.size()));

            matching_nodes.add(arg$1193);
            if ((null != arg$1193 && processScopeNodes.contains(arg$1193.getName()))) {
              processScope(arg$1193, getScope);
            }
            checkEnterScope(arg$1193);

            final Object retValue$1209 = Analyzer.cast(nl);

            checkExitScope(arg$1193);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1209);
          }
          if (TypicalSupport.match$1210(arg$1193)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1193, 0, arg$1193.size()));

            matching_nodes.add(arg$1193);
            if ((null != arg$1193 && processScopeNodes.contains(arg$1193.getName()))) {
              processScope(arg$1193, getScope);
            }
            checkEnterScope(arg$1193);

            final Object retValue$1213 = Analyzer.cast(nl);

            checkExitScope(arg$1193);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1213);
          }
          if (TypicalSupport.match$1214(arg$1193)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1193.getGeneric(0), 0, arg$1193.getGeneric(0).size()));

            matching_nodes.add(arg$1193);
            if ((null != arg$1193 && processScopeNodes.contains(arg$1193.getName()))) {
              processScope(arg$1193, getScope);
            }
            checkEnterScope(arg$1193);

            List<Node> listName$1216 = new ArrayList<Node>();
            Node nodeName$1215 = arg$1193;

            nodeName$1215 = nodeName$1215.getGeneric(0);
            if ((null != nodeName$1215 && processScopeNodes.contains(nodeName$1215.getName()))) {
              processScope(nodeName$1215, getScope);
            }
            checkEnterScope(nodeName$1215);
            listName$1216.add(0, nodeName$1215);

            final Object retValue$1217 = Analyzer.cast(nl);

            for (Node no : listName$1216) {
              checkExitScope(no);
            }
            checkExitScope(arg$1193);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1217);
          }
          if (true) {
            matching_nodes.add(arg$1193);
            if ((null != arg$1193 && processScopeNodes.contains(arg$1193.getName()))) {
              processScope(arg$1193, getScope);
            }
            checkEnterScope(arg$1193);

            final Object retValue$1220 = Analyzer.cast(null);

            checkExitScope(arg$1193);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1220);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<String>, Pair<Node>, Pair<String>> getTypeVariables = new Function.F2<Pair<String>, Pair<Node>, Pair<String>>() {
    public Pair<String> apply(final Pair<Node> nl, final Pair<String> resList) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<Node> arg$1222 = Analyzer.cast(nl);

          if ((null == arg$1222)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1222)) {
            return Analyzer.cast(resList);
          }
          if ((null != arg$1222 && !((Pair)arg$1222).isEmpty())) {
            final Pair<Node> list$1224 = Analyzer.cast(arg$1222);
            final Node x = GNode.cast(Primitives.wrapHead(list$1224));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1224));

            return Analyzer.cast(new Let<Pair<String>>() {
              final String s;

              {
                s = Analyzer.cast(getString.apply(x));
              }

              public Pair<String> apply() {
                return Analyzer.cast(null == Primitives.not.apply(Primitives.contains.apply(s, resList)) ? null : Primitives.not.apply(Primitives.contains.apply(s, resList)) ? getTypeVariables.apply(xs, TypicalSupport.append$262.apply(resList, new Pair<String>(s))) : error(Primitives.concat.apply(Primitives.concat.apply("type variable ", s), " has been previously defined"), null));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<String>, Pair<Node>, Pair<String>> get_params = new Function.F2<Pair<String>, Pair<Node>, Pair<String>>() {
    public Pair<String> apply(final Pair<Node> nl, final Pair<String> res) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<Node> arg$1226 = Analyzer.cast(nl);

          if ((null == arg$1226)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1226)) {
            return Analyzer.cast(res);
          }
          if ((null != arg$1226 && !((Pair)arg$1226).isEmpty())) {
            final Pair<Node> list$1228 = Analyzer.cast(arg$1226);
            final Node x = GNode.cast(Primitives.wrapHead(list$1228));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1228));

            return Analyzer.cast(new Match<Pair<String>>() {
              public Pair<String> apply() {
                final Node arg$1229 = GNode.cast(x);

                if ((null == arg$1229)) {
                  return null;
                }
                if (TypicalSupport.match$70(arg$1229)) {
                  final String s = (arg$1229.size() > 0 ? arg$1229.getString(0) : null);

                  matching_nodes.add(arg$1229);
                  if ((null != arg$1229 && processScopeNodes.contains(arg$1229.getName()))) {
                    processScope(arg$1229, getScope);
                  }
                  checkEnterScope(arg$1229);

                  final Object retValue$1233 = Analyzer.cast(get_params.apply(xs, TypicalSupport.append$262.apply(res, new Pair<String>(s))));

                  checkExitScope(arg$1229);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$1233);
                }
                if (true) {
                  matching_nodes.add(arg$1229);
                  if ((null != arg$1229 && processScopeNodes.contains(arg$1229.getName()))) {
                    processScope(arg$1229, getScope);
                  }
                  checkEnterScope(arg$1229);

                  final Object retValue$1236 = Analyzer.cast(null);

                  checkExitScope(arg$1229);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$1236);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, String, Pair<Node>> isUsedInList = new Function.F2<Boolean, String, Pair<Node>>() {
    public Boolean apply(final String s, final Pair<Node> nl) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<Node> arg$1239 = Analyzer.cast(nl);

          if ((null == arg$1239)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1239)) {
            return Analyzer.cast(Boolean.FALSE);
          }
          if ((null != arg$1239 && !((Pair)arg$1239).isEmpty())) {
            final Pair<Node> list$1241 = Analyzer.cast(arg$1239);
            final Node x = GNode.cast(Primitives.wrapHead(list$1241));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1241));

            return Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, x), isUsedInList.apply(s, xs)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, String, Node> isUsedVariable = new Function.F2<Boolean, String, Node>() {
    public Boolean apply(final String s, final Node no) {
      return (null == Primitives.isBottom.apply(no) ? null : Primitives.isBottom.apply(no) ? Boolean.FALSE : new Match<Boolean>() {
        public Boolean apply() {
          final Node arg$1243 = GNode.cast(no);

          if ((null == arg$1243)) {
            return null;
          }
          if (TypicalSupport.match$332(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1247 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1247);
          }
          if (TypicalSupport.match$416(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1251 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1251);
          }
          if (TypicalSupport.match$1202(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1255 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1255);
          }
          if (TypicalSupport.match$596(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1259 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1259);
          }
          if (TypicalSupport.match$10(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 1, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1263 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1263);
          }
          if (TypicalSupport.match$641(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1267 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1267);
          }
          if (TypicalSupport.match$702(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1271 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1271);
          }
          if (TypicalSupport.match$235(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1275 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1275);
          }
          if (TypicalSupport.match$243(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1279 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1279);
          }
          if (TypicalSupport.match$249(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1283 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1283);
          }
          if (TypicalSupport.match$1284(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1287 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1287);
          }
          if (TypicalSupport.match$279(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1291 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1291);
          }
          if (TypicalSupport.match$288(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1295 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1295);
          }
          if (TypicalSupport.match$1210(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1299 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1299);
          }
          if (TypicalSupport.match$6(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 1, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1303 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1303);
          }
          if (TypicalSupport.match$167(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1307 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1307);
          }
          if (TypicalSupport.match$158(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1311 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1311);
          }
          if (TypicalSupport.match$748(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1315 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1315);
          }
          if (TypicalSupport.match$1198(arg$1243)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1243, 0, arg$1243.size()));

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1319 = Analyzer.cast(isUsedInList.apply(s, nl));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1319);
          }
          if (TypicalSupport.match$551(arg$1243)) {
            final Node n = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1323 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1323);
          }
          if (TypicalSupport.match$50(arg$1243)) {
            final Node n = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1327 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1327);
          }
          if (TypicalSupport.match$579(arg$1243)) {
            final Node n = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1331 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1331);
          }
          if (TypicalSupport.match$589(arg$1243)) {
            final Node n = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1335 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1335);
          }
          if (TypicalSupport.match$46(arg$1243)) {
            final Node n = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1339 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1339);
          }
          if (TypicalSupport.match$1072(arg$1243)) {
            final Node n = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1343 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1343);
          }
          if (TypicalSupport.match$14(arg$1243)) {
            final Node n = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1347 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1347);
          }
          if (TypicalSupport.match$42(arg$1243)) {
            final Node n = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1351 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1351);
          }
          if (TypicalSupport.match$759(arg$1243)) {
            final Node n = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1355 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1355);
          }
          if (TypicalSupport.match$26(arg$1243)) {
            final Node n = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1359 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1359);
          }
          if (TypicalSupport.match$776(arg$1243)) {
            final Node n = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1363 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1363);
          }
          if (TypicalSupport.match$740(arg$1243)) {
            final Node n = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1367 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1367);
          }
          if (TypicalSupport.match$660(arg$1243)) {
            final Node n = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1371 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1371);
          }
          if (TypicalSupport.match$58(arg$1243)) {
            final Node n = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1375 = Analyzer.cast(isUsedVariable.apply(s, n));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1375);
          }
          if (TypicalSupport.match$86(arg$1243)) {
            final Node n = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1379 = Analyzer.cast(new Let<Boolean>() {
              final Pair<String> strList;

              {
                strList = Analyzer.cast(retrieveVariables.apply(no));
              }

              public Boolean apply() {
                return Analyzer.cast(null == Primitives.contains.apply(s, strList) ? null : Primitives.contains.apply(s, strList) ? Boolean.FALSE : isUsedVariable.apply(s, n));
              }
            }.apply());

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1379);
          }
          if (TypicalSupport.match$84(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1383 = Analyzer.cast(new Let<Boolean>() {
              final Pair<String> strList;

              {
                strList = Analyzer.cast(retrieveVariables.apply(no));
              }

              public Boolean apply() {
                return Analyzer.cast(null == Primitives.contains.apply(s, strList) ? null : Primitives.contains.apply(s, strList) ? Boolean.FALSE : Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));
              }
            }.apply());

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1383);
          }
          if (TypicalSupport.match$85(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1396 = Analyzer.cast(new Match<Boolean>() {
              public Boolean apply() {
                final Node arg$1385 = GNode.cast(n1);

                if ((null == arg$1385)) {
                  return null;
                }
                if (TypicalSupport.match$218(arg$1385)) {
                  final Pair<Node> pl = Analyzer.cast(Primitives.getChildren(arg$1385, 0, arg$1385.size()));

                  matching_nodes.add(arg$1385);
                  if ((null != arg$1385 && processScopeNodes.contains(arg$1385.getName()))) {
                    processScope(arg$1385, getScope);
                  }
                  checkEnterScope(arg$1385);

                  final Object retValue$1389 = Analyzer.cast(new Let<Boolean>() {
                    final Pair<String> strList;

                    {
                      strList = Analyzer.cast(get_params.apply(pl, Pair.<String>empty()));
                    }

                    public Boolean apply() {
                      return Analyzer.cast(null == Primitives.contains.apply(s, strList) ? null : Primitives.contains.apply(s, strList) ? Boolean.FALSE : isUsedVariable.apply(s, n2));
                    }
                  }.apply());

                  checkExitScope(arg$1385);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$1389);
                }
                if (true) {
                  matching_nodes.add(arg$1385);
                  if ((null != arg$1385 && processScopeNodes.contains(arg$1385.getName()))) {
                    processScope(arg$1385, getScope);
                  }
                  checkEnterScope(arg$1385);

                  final Object retValue$1392 = Analyzer.cast(Boolean.FALSE);

                  checkExitScope(arg$1385);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$1392);
                }
                return null;
              }
            }.apply());

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1396);
          }
          if (TypicalSupport.match$336(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1400 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1400);
          }
          if (TypicalSupport.match$342(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1404 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1404);
          }
          if (TypicalSupport.match$348(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 2 ? arg$1243.getGeneric(2) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1408 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1408);
          }
          if (TypicalSupport.match$353(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 2 ? arg$1243.getGeneric(2) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1412 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1412);
          }
          if (TypicalSupport.match$369(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 2 ? arg$1243.getGeneric(2) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1416 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1416);
          }
          if (TypicalSupport.match$387(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 2 ? arg$1243.getGeneric(2) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1420 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1420);
          }
          if (TypicalSupport.match$411(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1424 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1424);
          }
          if (TypicalSupport.match$546(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1428 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1428);
          }
          if (TypicalSupport.match$227(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1432 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1432);
          }
          if (TypicalSupport.match$405(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 2 ? arg$1243.getGeneric(2) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1436 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1436);
          }
          if (TypicalSupport.match$691(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1440 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1440);
          }
          if (TypicalSupport.match$253(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1444 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1444);
          }
          if (TypicalSupport.match$267(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1448 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1448);
          }
          if (TypicalSupport.match$272(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1452 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1452);
          }
          if (TypicalSupport.match$299(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1456 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1456);
          }
          if (TypicalSupport.match$608(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1460 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1460);
          }
          if (TypicalSupport.match$618(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1464 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1464);
          }
          if (TypicalSupport.match$763(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1468 = Analyzer.cast(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1468);
          }
          if (TypicalSupport.match$66(arg$1243)) {
            final String str = (arg$1243.size() > 0 ? arg$1243.getString(0) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1472 = Analyzer.cast(Primitives.equal.apply(s, str));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1472);
          }
          if (TypicalSupport.match$62(arg$1243)) {
            final String str = (arg$1243.size() > 0 ? arg$1243.getString(0) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1476 = Analyzer.cast(Primitives.equal.apply(s, str));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1476);
          }
          if (TypicalSupport.match$736(arg$1243)) {
            final String str = (arg$1243.size() > 0 ? arg$1243.getString(0) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1480 = Analyzer.cast(Primitives.equal.apply(s, str));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1480);
          }
          if (TypicalSupport.match$427(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);
            final Node n3 = (arg$1243.size() > 2 ? arg$1243.getGeneric(2) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1484 = Analyzer.cast(Primitives.or.apply(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)), isUsedVariable.apply(s, n3)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1484);
          }
          if (TypicalSupport.match$712(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);
            final Node n3 = (arg$1243.size() > 2 ? arg$1243.getGeneric(2) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1488 = Analyzer.cast(Primitives.or.apply(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)), isUsedVariable.apply(s, n3)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1488);
          }
          if (TypicalSupport.match$696(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);
            final Node n3 = (arg$1243.size() > 2 ? arg$1243.getGeneric(2) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1492 = Analyzer.cast(Primitives.or.apply(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)), isUsedVariable.apply(s, n3)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1492);
          }
          if (TypicalSupport.match$601(arg$1243)) {
            final Node n1 = (arg$1243.size() > 0 ? arg$1243.getGeneric(0) : null);
            final Node n2 = (arg$1243.size() > 1 ? arg$1243.getGeneric(1) : null);
            final Node n3 = (arg$1243.size() > 2 ? arg$1243.getGeneric(2) : null);
            final Node n4 = (arg$1243.size() > 3 ? arg$1243.getGeneric(3) : null);

            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1496 = Analyzer.cast(Primitives.or.apply(Primitives.or.apply(Primitives.or.apply(isUsedVariable.apply(s, n1), isUsedVariable.apply(s, n2)), isUsedVariable.apply(s, n3)), isUsedVariable.apply(s, n4)));

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1496);
          }
          if (true) {
            matching_nodes.add(arg$1243);
            if ((null != arg$1243 && processScopeNodes.contains(arg$1243.getName()))) {
              processScope(arg$1243, getScope);
            }
            checkEnterScope(arg$1243);

            final Object retValue$1499 = Analyzer.cast(Boolean.FALSE);

            checkExitScope(arg$1243);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1499);
          }
          return null;
        }
      }.apply());
    }
  };

  final Function.F2<Object, Pair<String>, Node> checkUnusedVariables = new Function.F2<Object, Pair<String>, Node>() {
    public Object apply(final Pair<String> strList, final Node no) {
      return new Match<Object>() {
        public Object apply() {
          final Pair<String> arg$1501 = Analyzer.cast(strList);

          if ((null == arg$1501)) {
            return null;
          }
          if (TypicalSupport.match$1046(arg$1501)) {
            return Analyzer.cast(null);
          }
          if ((null != arg$1501 && !((Pair)arg$1501).isEmpty())) {
            final Pair<String> list$1503 = Analyzer.cast(arg$1501);
            final String x = Analyzer.cast(Primitives.wrapHead(list$1503));
            final Pair<String> xs = Analyzer.cast(Primitives.wrapTail(list$1503));

            return Analyzer.cast(null == Primitives.not.apply(isUsedVariable.apply(x, no)) ? null : Primitives.not.apply(isUsedVariable.apply(x, no)) ? new Let<Object>() {
              {
                warning(Primitives.concat.apply(x, " is an unused variable"), null);
              }

              public Object apply() {
                return Analyzer.cast(checkUnusedVariables.apply(xs, no));
              }
            }.apply() : checkUnusedVariables.apply(xs, no));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<String>, Pair<TypicalTypes.entry>> getNames = new Function.F1<Pair<String>, Pair<TypicalTypes.entry>>() {
    public Pair<String> apply(final Pair<TypicalTypes.entry> enList) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<TypicalTypes.entry> arg$1505 = Analyzer.cast(enList);

          if ((null == arg$1505)) {
            return null;
          }
          if (TypicalSupport.match$1068(arg$1505)) {
            return Analyzer.cast(Pair.<String>empty());
          }
          if ((null != arg$1505 && !((Pair)arg$1505).isEmpty())) {
            final Pair<TypicalTypes.entry> list$1507 = Analyzer.cast(arg$1505);
            final TypicalTypes.entry x = Analyzer.cast(Primitives.wrapHead(list$1507));
            final Pair<TypicalTypes.entry> xs = Analyzer.cast(Primitives.wrapTail(list$1507));

            return Analyzer.cast(TypicalSupport.append$262.apply(new Pair<String>(null == x ? null : x.entryName), getNames.apply(xs)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<BigInteger, String, Pair<Node>> countInList = new Function.F2<BigInteger, String, Pair<Node>>() {
    public BigInteger apply(final String s, final Pair<Node> nl) {
      return new Match<BigInteger>() {
        public BigInteger apply() {
          final Pair<Node> arg$1509 = Analyzer.cast(nl);

          if ((null == arg$1509)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1509)) {
            return Analyzer.cast(BigInteger.valueOf(0));
          }
          if ((null != arg$1509 && !((Pair)arg$1509).isEmpty())) {
            final Pair<Node> list$1511 = Analyzer.cast(arg$1509);
            final Node x = GNode.cast(Primitives.wrapHead(list$1511));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1511));

            return Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, x), countInList.apply(s, xs)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<BigInteger, String, Node> countAppearance = new Function.F2<BigInteger, String, Node>() {
    public BigInteger apply(final String s, final Node no) {
      return (null == Primitives.isBottom.apply(no) ? null : Primitives.isBottom.apply(no) ? BigInteger.valueOf(0) : new Match<BigInteger>() {
        public BigInteger apply() {
          final Node arg$1513 = GNode.cast(no);

          if ((null == arg$1513)) {
            return null;
          }
          if (TypicalSupport.match$332(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 0, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1517 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1517);
          }
          if (TypicalSupport.match$416(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 0, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1521 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1521);
          }
          if (TypicalSupport.match$1202(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 0, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1525 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1525);
          }
          if (TypicalSupport.match$596(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 0, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1529 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1529);
          }
          if (TypicalSupport.match$10(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 1, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1533 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1533);
          }
          if (TypicalSupport.match$641(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 0, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1537 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1537);
          }
          if (TypicalSupport.match$702(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 0, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1541 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1541);
          }
          if (TypicalSupport.match$235(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 0, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1545 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1545);
          }
          if (TypicalSupport.match$243(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 0, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1549 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1549);
          }
          if (TypicalSupport.match$249(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 0, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1553 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1553);
          }
          if (TypicalSupport.match$1284(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 0, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1557 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1557);
          }
          if (TypicalSupport.match$279(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 0, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1561 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1561);
          }
          if (TypicalSupport.match$288(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 0, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1565 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1565);
          }
          if (TypicalSupport.match$1210(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 0, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1569 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1569);
          }
          if (TypicalSupport.match$6(arg$1513)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1513, 1, arg$1513.size()));

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1573 = Analyzer.cast(countInList.apply(s, nl));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1573);
          }
          if (TypicalSupport.match$551(arg$1513)) {
            final Node n = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1577 = Analyzer.cast(countAppearance.apply(s, n));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1577);
          }
          if (TypicalSupport.match$50(arg$1513)) {
            final Node n = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1581 = Analyzer.cast(countAppearance.apply(s, n));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1581);
          }
          if (TypicalSupport.match$579(arg$1513)) {
            final Node n = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1585 = Analyzer.cast(countAppearance.apply(s, n));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1585);
          }
          if (TypicalSupport.match$589(arg$1513)) {
            final Node n = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1589 = Analyzer.cast(countAppearance.apply(s, n));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1589);
          }
          if (TypicalSupport.match$46(arg$1513)) {
            final Node n = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1593 = Analyzer.cast(countAppearance.apply(s, n));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1593);
          }
          if (TypicalSupport.match$1072(arg$1513)) {
            final Node n = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1597 = Analyzer.cast(countAppearance.apply(s, n));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1597);
          }
          if (TypicalSupport.match$58(arg$1513)) {
            final Node n = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1601 = Analyzer.cast(countAppearance.apply(s, n));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1601);
          }
          if (TypicalSupport.match$86(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1605 = Analyzer.cast(new Let<BigInteger>() {
              final Pair<String> strList;

              {
                strList = Analyzer.cast(retrieveVariables.apply(no));
              }

              public BigInteger apply() {
                return Analyzer.cast(null == Primitives.contains.apply(s, strList) ? null : Primitives.contains.apply(s, strList) ? BigInteger.valueOf(0) : Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));
              }
            }.apply());

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1605);
          }
          if (TypicalSupport.match$84(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1609 = Analyzer.cast(new Let<BigInteger>() {
              final Pair<String> strList;

              {
                strList = Analyzer.cast(retrieveVariables.apply(no));
              }

              public BigInteger apply() {
                return Analyzer.cast(null == Primitives.contains.apply(s, strList) ? null : Primitives.contains.apply(s, strList) ? BigInteger.valueOf(0) : Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));
              }
            }.apply());

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1609);
          }
          if (TypicalSupport.match$336(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1613 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1613);
          }
          if (TypicalSupport.match$342(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1617 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1617);
          }
          if (TypicalSupport.match$348(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 2 ? arg$1513.getGeneric(2) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1621 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1621);
          }
          if (TypicalSupport.match$353(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 2 ? arg$1513.getGeneric(2) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1625 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1625);
          }
          if (TypicalSupport.match$369(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 2 ? arg$1513.getGeneric(2) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1629 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1629);
          }
          if (TypicalSupport.match$387(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 2 ? arg$1513.getGeneric(2) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1633 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1633);
          }
          if (TypicalSupport.match$411(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1637 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1637);
          }
          if (TypicalSupport.match$546(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1641 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1641);
          }
          if (TypicalSupport.match$227(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1645 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1645);
          }
          if (TypicalSupport.match$405(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 2 ? arg$1513.getGeneric(2) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1649 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1649);
          }
          if (TypicalSupport.match$691(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1653 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1653);
          }
          if (TypicalSupport.match$253(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1657 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1657);
          }
          if (TypicalSupport.match$267(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1661 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1661);
          }
          if (TypicalSupport.match$272(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1665 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1665);
          }
          if (TypicalSupport.match$299(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1669 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1669);
          }
          if (TypicalSupport.match$608(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1673 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1673);
          }
          if (TypicalSupport.match$618(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1677 = Analyzer.cast(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1677);
          }
          if (TypicalSupport.match$66(arg$1513)) {
            final String str = (arg$1513.size() > 0 ? arg$1513.getString(0) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1681 = Analyzer.cast(null == Primitives.equal.apply(s, str) ? null : Primitives.equal.apply(s, str) ? BigInteger.valueOf(1) : BigInteger.valueOf(0));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1681);
          }
          if (TypicalSupport.match$62(arg$1513)) {
            final String str = (arg$1513.size() > 0 ? arg$1513.getString(0) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1685 = Analyzer.cast(null == Primitives.equal.apply(s, str) ? null : Primitives.equal.apply(s, str) ? BigInteger.valueOf(1) : BigInteger.valueOf(0));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1685);
          }
          if (TypicalSupport.match$427(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);
            final Node n3 = (arg$1513.size() > 2 ? arg$1513.getGeneric(2) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1689 = Analyzer.cast(Primitives.addInt.apply(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)), countAppearance.apply(s, n3)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1689);
          }
          if (TypicalSupport.match$712(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);
            final Node n3 = (arg$1513.size() > 2 ? arg$1513.getGeneric(2) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1693 = Analyzer.cast(Primitives.addInt.apply(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)), countAppearance.apply(s, n3)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1693);
          }
          if (TypicalSupport.match$696(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);
            final Node n3 = (arg$1513.size() > 2 ? arg$1513.getGeneric(2) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1697 = Analyzer.cast(Primitives.addInt.apply(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)), countAppearance.apply(s, n3)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1697);
          }
          if (TypicalSupport.match$601(arg$1513)) {
            final Node n1 = (arg$1513.size() > 0 ? arg$1513.getGeneric(0) : null);
            final Node n2 = (arg$1513.size() > 1 ? arg$1513.getGeneric(1) : null);
            final Node n3 = (arg$1513.size() > 2 ? arg$1513.getGeneric(2) : null);
            final Node n4 = (arg$1513.size() > 3 ? arg$1513.getGeneric(3) : null);

            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1701 = Analyzer.cast(Primitives.addInt.apply(Primitives.addInt.apply(Primitives.addInt.apply(countAppearance.apply(s, n1), countAppearance.apply(s, n2)), countAppearance.apply(s, n3)), countAppearance.apply(s, n4)));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1701);
          }
          if (true) {
            matching_nodes.add(arg$1513);
            if ((null != arg$1513 && processScopeNodes.contains(arg$1513.getName()))) {
              processScope(arg$1513, getScope);
            }
            checkEnterScope(arg$1513);

            final Object retValue$1704 = Analyzer.cast(BigInteger.valueOf(0));

            checkExitScope(arg$1513);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1704);
          }
          return null;
        }
      }.apply());
    }
  };

  final Function.F2<Pair<String>, Pair<String>, Node> removeUsedVariables = new Function.F2<Pair<String>, Pair<String>, Node>() {
    public Pair<String> apply(final Pair<String> strList, final Node no) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<String> arg$1706 = Analyzer.cast(strList);

          if ((null == arg$1706)) {
            return null;
          }
          if (TypicalSupport.match$1046(arg$1706)) {
            return Analyzer.cast(Pair.<String>empty());
          }
          if ((null != arg$1706 && !((Pair)arg$1706).isEmpty())) {
            final Pair<String> list$1708 = Analyzer.cast(arg$1706);
            final String x = Analyzer.cast(Primitives.wrapHead(list$1708));
            final Pair<String> xs = Analyzer.cast(Primitives.wrapTail(list$1708));

            return Analyzer.cast(null == Primitives.greaterInt.apply(countAppearance.apply(x, no), BigInteger.valueOf(1)) ? null : Primitives.greaterInt.apply(countAppearance.apply(x, no), BigInteger.valueOf(1)) ? removeUsedVariables.apply(xs, no) : TypicalSupport.append$262.apply(new Pair<String>(x), removeUsedVariables.apply(xs, no)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Object, Pair<Node>> checkUnusedParameters = new Function.F1<Object, Pair<Node>>() {
    public Object apply(final Pair<Node> nl) {
      return new Match<Object>() {
        public Object apply() {
          final Pair<Node> arg$1710 = Analyzer.cast(nl);

          if ((null == arg$1710)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1710)) {
            return Analyzer.cast(null);
          }
          if ((null != arg$1710 && !((Pair)arg$1710).isEmpty())) {
            final Pair<Node> list$1712 = Analyzer.cast(arg$1710);
            final Node x = GNode.cast(Primitives.wrapHead(list$1712));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1712));

            return Analyzer.cast(new Match<Object>() {
              public Object apply() {
                final Node arg$1713 = GNode.cast(x);

                if ((null == arg$1713)) {
                  return null;
                }
                if (TypicalSupport.match$74(arg$1713)) {
                  final Node p = (arg$1713.size() > 1 ? arg$1713.getGeneric(1) : null);
                  final Node v = (arg$1713.size() > 2 ? arg$1713.getGeneric(2) : null);

                  matching_nodes.add(arg$1713);
                  if ((null != arg$1713 && processScopeNodes.contains(arg$1713.getName()))) {
                    processScope(arg$1713, getScope);
                  }
                  checkEnterScope(arg$1713);

                  final Object retValue$1718 = Analyzer.cast(new Let<Object>() {
                    final TypicalTypes.raw_type<?> t;

                    {
                      t = Analyzer.cast(Analyzer.cast(lookup2.apply(x, getNameSpace)));
                    }

                    public Object apply() {
                      return Analyzer.cast(null == Primitives.isBottom.apply(t) ? null : Primitives.isBottom.apply(t) ? checkUnusedParameters.apply(xs) : null == Primitives.isNotBottom.apply(p) || !Primitives.isNotBottom.apply(p) ? null : new Let<Object>() {
                        final Pair<Node> nl;
                        final Pair<String> vars;

                        {
                          nl = Analyzer.cast(getNodeList.apply(p));
                          vars = Analyzer.cast(TypicalSupport.map$1715.apply(getString, nl));
                          checkUnusedVariables.apply(vars, v);
                        }

                        public Object apply() {
                          return Analyzer.cast(checkUnusedParameters.apply(xs));
                        }
                      }.apply());
                    }
                  }.apply());

                  checkExitScope(arg$1713);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$1718);
                }
                if (true) {
                  matching_nodes.add(arg$1713);
                  if ((null != arg$1713 && processScopeNodes.contains(arg$1713.getName()))) {
                    processScope(arg$1713, getScope);
                  }
                  checkEnterScope(arg$1713);

                  final Object retValue$1721 = Analyzer.cast(checkUnusedParameters.apply(xs));

                  checkExitScope(arg$1713);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$1721);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<String, Node, String> getAnnotatedString = new Function.F2<String, Node, String>() {
    public String apply(final Node n, final String s) {
      return new Let<String>() {
        final TypicalTypes.raw_type<?> t;

        {
          t = Analyzer.cast(Primitives.getAnnotation.apply(n, s));
        }

        public String apply() {
          return Analyzer.cast(new Match<String>() {
            public String apply() {
              final TypicalTypes.raw_type<?> arg$1724 = Analyzer.cast(t);

              if ((null == arg$1724)) {
                return null;
              }
              if ((null != arg$1724))
                                switch (arg$1724.tag()) {
                case StringName:
                  if (TypicalSupport.match$1725(arg$1724)) {
                    final String res = Analyzer.cast(arg$1724.getTuple().get1());

                    return Analyzer.cast(res);
                  }
                  break;
                default:
                  break;
                };
              if (true) {
                return Analyzer.cast(null);
              }
              return null;
            }
          }.apply());
        }
      }.apply();
    }
  };

  final Function.F2<Pair<String>, Node, String> getAnnotatedStringList = new Function.F2<Pair<String>, Node, String>() {
    public Pair<String> apply(final Node n, final String s) {
      return new Let<Pair<String>>() {
        final TypicalTypes.raw_type<?> t;

        {
          t = Analyzer.cast(Primitives.getAnnotation.apply(n, s));
        }

        public Pair<String> apply() {
          return Analyzer.cast(new Match<Pair<String>>() {
            public Pair<String> apply() {
              final TypicalTypes.raw_type<?> arg$1727 = Analyzer.cast(t);

              if ((null == arg$1727)) {
                return null;
              }
              if ((null != arg$1727))
                                switch (arg$1727.tag()) {
                case StringList:
                  if (TypicalSupport.match$1149(arg$1727)) {
                    final Pair<String> res = Analyzer.cast(arg$1727.getTuple().get1());

                    return Analyzer.cast(res);
                  }
                  break;
                default:
                  break;
                };
              if (true) {
                return Analyzer.cast(null);
              }
              return null;
            }
          }.apply());
        }
      }.apply();
    }
  };

  final Function.F1<Boolean, String> hasTypeVariables = new Function.F1<Boolean, String>() {
    public Boolean apply(final String s) {
      return (null == isDefined.apply(GNode.create("NameSpaceStructure", s, null, null), getNameSpace) ? null : isDefined.apply(GNode.create("NameSpaceStructure", s, null, null), getNameSpace) ? new Let<Boolean>() {
        final Node nod;

        {
          nod = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("NameSpaceStructure", s, null, null), getNameSpace)));
        }

        public Boolean apply() {
          return Analyzer.cast(Primitives.hasAnnotation.apply(nod, "type_variables"));
        }
      }.apply() : Boolean.FALSE);
    }
  };

  protected class removeLast {
    public <T0> Pair<T0> apply(final Pair<T0> nl) {
      return new Match<Pair<T0>>() {
        public Pair<T0> apply() {
          final Pair<T0> arg$1730 = nl;

          if ((null == arg$1730)) {
            return null;
          }
          if (TypicalSupport.match$1731(arg$1730)) {
            return Pair.<T0>empty();
          }
          if (TypicalSupport.match$1732(arg$1730)) {
            return Pair.<T0>empty();
          }
          if ((null != arg$1730 && !((Pair)arg$1730).isEmpty())) {
            final Pair<T0> list$1733 = arg$1730;
            final T0 x = Primitives.wrapHead(list$1733);
            final Pair<T0> xs = Primitives.wrapTail(list$1733);

            return new Primitives.Append<T0>().apply(new Pair<T0>(x), removeLast.apply(xs));
          }
          return null;
        }
      }.apply();
    }
  }

  final removeLast removeLast = new removeLast();

  final Function.F2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>, Pair<Node>> processFunctionApplication = new Function.F2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>, Pair<Node>>() {
    public TypicalTypes.raw_type<?> apply(final TypicalTypes.raw_type<?> t, final Pair<Node> nl) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final TypicalTypes.raw_type<?> arg$1735 = Analyzer.cast(t);

          if ((null == arg$1735)) {
            return null;
          }
          if ((null != arg$1735))
                        switch (arg$1735.tag()) {
            case FunctionT:
              if (TypicalSupport.match$99(arg$1735)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1735.getTuple().get1());
                final TypicalTypes.raw_type<?> ret = Analyzer.cast(arg$1735.getTuple().get2());

                return Analyzer.cast(null == Primitives.greaterInt.apply(Primitives.length.apply(nl), Primitives.length.apply(tl)) ? null : Primitives.greaterInt.apply(Primitives.length.apply(nl), Primitives.length.apply(tl)) ? error("too many arguments in function application", null) : processArguments.apply(nl, tl, ret));
              }
              break;
            case VariableT:
              if (TypicalSupport.match$113(arg$1735)) {
                final String str = Analyzer.cast(arg$1735.getTuple().get1());

                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> ty;

                  {
                    ty = Analyzer.cast(Analyzer.cast(Primitives.get.apply(str, hashTable)));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(null == Primitives.isNotBottom.apply(ty) ? null : Primitives.isNotBottom.apply(ty) ? processFunctionApplication.apply(ty, nl) : new Let<TypicalTypes.raw_type<?>>() {
                      final Pair<TypicalTypes.raw_type<?>> tnl;

                      {
                        tnl = Analyzer.cast(TypicalSupport.map$125.apply(analyze, nl));
                      }

                      public TypicalTypes.raw_type<?> apply() {
                        return Analyzer.cast(null == Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tnl)) || !Primitives.not.apply(TypicalSupport.exists$159.apply(Primitives.isBottom, tnl)) ? null : new Let<TypicalTypes.raw_type<?>>() {
                          final TypicalTypes.raw_type<?> ret;

                          {
                            ret = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));
                            Analyzer.cast(Primitives.put.apply(str, new TypicalTypes.FunctionT(tnl, ret), hashTable));
                          }

                          public TypicalTypes.raw_type<?> apply() {
                            return Analyzer.cast(ret);
                          }
                        }.apply());
                      }
                    }.apply());
                  }
                }.apply());
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(error(Primitives.concat.apply("expected function, found ", getTypeName.apply(t)), null));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> copy = new Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>() {
    public TypicalTypes.raw_type<?> apply(final TypicalTypes.raw_type<?> t) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final TypicalTypes.raw_type<?> arg$1739 = Analyzer.cast(t);

          if ((null == arg$1739)) {
            return null;
          }
          if ((null != arg$1739))
                        switch (arg$1739.tag()) {
            case RecordT:
              if (TypicalSupport.match$106(arg$1739)) {
                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<String> vars;

                  {
                    vars = Analyzer.cast(collectTypeVariables.apply(t));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(replaceTypeVariables.apply(vars, t));
                  }
                }.apply());
              }
              break;
            case FieldT:
              if (TypicalSupport.match$98(arg$1739)) {
                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<String> vars;

                  {
                    vars = Analyzer.cast(collectTypeVariables.apply(t));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(replaceTypeVariables.apply(vars, t));
                  }
                }.apply());
              }
              break;
            case ConstructorT:
              if (TypicalSupport.match$96(arg$1739)) {
                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<String> vars;

                  {
                    vars = Analyzer.cast(collectTypeVariables.apply(t));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(replaceTypeVariables.apply(vars, t));
                  }
                }.apply());
              }
              break;
            case FunctionT:
              if (TypicalSupport.match$99(arg$1739)) {
                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<String> vars;

                  {
                    vars = Analyzer.cast(collectTypeVariables.apply(t));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(replaceTypeVariables.apply(vars, t));
                  }
                }.apply());
              }
              break;
            case VariantT:
              if (TypicalSupport.match$102(arg$1739)) {
                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<String> vars;

                  {
                    vars = Analyzer.cast(collectTypeVariables.apply(t));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(replaceTypeVariables.apply(vars, t));
                  }
                }.apply());
              }
              break;
            case TypeName:
              if (TypicalSupport.match$97(arg$1739)) {
                final String s = Analyzer.cast(arg$1739.getTuple().get1());

                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> t;

                  {
                    t = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", s), getNameSpace)));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(copy.apply(t));
                  }
                }.apply());
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(t);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<TypicalTypes.raw_type<?>, Pair<String>, TypicalTypes.raw_type<?>> replaceTypeVariables = new Function.F2<TypicalTypes.raw_type<?>, Pair<String>, TypicalTypes.raw_type<?>>() {
    public TypicalTypes.raw_type<?> apply(final Pair<String> vars, final TypicalTypes.raw_type<?> t) {
      return (null == Primitives.isBottom.apply(vars) ? null : Primitives.isBottom.apply(vars) ? t : new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final Pair<String> arg$1747 = Analyzer.cast(vars);

          if ((null == arg$1747)) {
            return null;
          }
          if (TypicalSupport.match$1046(arg$1747)) {
            return Analyzer.cast(t);
          }
          if ((null != arg$1747 && !((Pair)arg$1747).isEmpty())) {
            final Pair<String> list$1749 = Analyzer.cast(arg$1747);
            final String x = Analyzer.cast(Primitives.wrapHead(list$1749));
            final Pair<String> xs = Analyzer.cast(Primitives.wrapTail(list$1749));

            return Analyzer.cast(replaceTypeVariables.apply(xs, replace.apply(t, x, freshName.apply("type"))));
          }
          return null;
        }
      }.apply());
    }
  };

  final Function.F1<Pair<String>, TypicalTypes.raw_type<?>> collectTypeVariables = new Function.F1<Pair<String>, TypicalTypes.raw_type<?>>() {
    public Pair<String> apply(final TypicalTypes.raw_type<?> t) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final TypicalTypes.raw_type<?> arg$1751 = Analyzer.cast(t);

          if ((null == arg$1751)) {
            return null;
          }
          if ((null != arg$1751))
                        switch (arg$1751.tag()) {
            case ConstructedT:
              if (TypicalSupport.match$111(arg$1751)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1751.getTuple().get1());

                return Analyzer.cast(makeUnion.apply(tl));
              }
              break;
            case RecordT:
              if (TypicalSupport.match$106(arg$1751)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1751.getTuple().get1());

                return Analyzer.cast(makeUnion.apply(tl));
              }
              break;
            case FieldT:
              if (TypicalSupport.match$98(arg$1751)) {
                final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$1751.getTuple().get3());

                return Analyzer.cast(collectTypeVariables.apply(ty));
              }
              break;
            case TupleT:
              if (TypicalSupport.match$110(arg$1751)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1751.getTuple().get1());

                return Analyzer.cast(makeUnion.apply(tl));
              }
              break;
            case ConstructorT:
              if (TypicalSupport.match$96(arg$1751)) {
                final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$1751.getTuple().get3());

                return Analyzer.cast(collectTypeVariables.apply(ty));
              }
              break;
            case FunctionT:
              if (TypicalSupport.match$99(arg$1751)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1751.getTuple().get1());
                final TypicalTypes.raw_type<?> ret = Analyzer.cast(arg$1751.getTuple().get2());

                return Analyzer.cast(new Let<Pair<String>>() {
                  final Pair<String> vars1;
                  final Pair<String> vars2;

                  {
                    vars1 = Analyzer.cast(collectTypeVariables.apply(ret));
                    vars2 = Analyzer.cast(makeUnion.apply(tl));
                  }

                  public Pair<String> apply() {
                    return Analyzer.cast(TypicalSupport.union$273.apply(vars1, vars2));
                  }
                }.apply());
              }
              break;
            case PairOfType:
              if (TypicalSupport.match$112(arg$1751)) {
                final TypicalTypes.raw_type<?> t1 = Analyzer.cast(arg$1751.getTuple().get1());
                final TypicalTypes.raw_type<?> t2 = Analyzer.cast(arg$1751.getTuple().get2());

                return Analyzer.cast(new Let<Pair<String>>() {
                  final Pair<String> vars1;
                  final Pair<String> vars2;

                  {
                    vars1 = Analyzer.cast(collectTypeVariables.apply(t1));
                    vars2 = Analyzer.cast(collectTypeVariables.apply(t2));
                  }

                  public Pair<String> apply() {
                    return Analyzer.cast(TypicalSupport.union$273.apply(vars1, vars2));
                  }
                }.apply());
              }
              break;
            case VariantT:
              if (TypicalSupport.match$102(arg$1751)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1751.getTuple().get1());

                return Analyzer.cast(makeUnion.apply(tl));
              }
              break;
            case VariableT:
              if (TypicalSupport.match$1752(arg$1751)) {
                final String str = Analyzer.cast(arg$1751.getTuple().get1());

                return Analyzer.cast(new Pair<String>(str));
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(Pair.<String>empty());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<String>, Pair<TypicalTypes.raw_type<?>>> makeUnion = new Function.F1<Pair<String>, Pair<TypicalTypes.raw_type<?>>>() {
    public Pair<String> apply(final Pair<TypicalTypes.raw_type<?>> tl) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<TypicalTypes.raw_type<?>> arg$1762 = Analyzer.cast(tl);

          if ((null == arg$1762)) {
            return null;
          }
          if (TypicalSupport.match$118(arg$1762)) {
            return Analyzer.cast(Pair.<String>empty());
          }
          if ((null != arg$1762 && !((Pair)arg$1762).isEmpty())) {
            final Pair<TypicalTypes.raw_type<?>> list$1764 = Analyzer.cast(arg$1762);
            final TypicalTypes.raw_type<?> x = Analyzer.cast(Primitives.wrapHead(list$1764));
            final Pair<TypicalTypes.raw_type<?>> xs = Analyzer.cast(Primitives.wrapTail(list$1764));

            return Analyzer.cast(TypicalSupport.union$273.apply(collectTypeVariables.apply(x), makeUnion.apply(xs)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F3<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>, String, String> replace = new Function.F3<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>, String, String>() {
    public TypicalTypes.raw_type<?> apply(final TypicalTypes.raw_type<?> t, final String str, final String newVar) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final TypicalTypes.raw_type<?> arg$1766 = Analyzer.cast(t);

          if ((null == arg$1766)) {
            return null;
          }
          if ((null != arg$1766))
                        switch (arg$1766.tag()) {
            case ConstructedT:
              if (TypicalSupport.match$111(arg$1766)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1766.getTuple().get1());
                final String s = Analyzer.cast(arg$1766.getTuple().get2());

                return Analyzer.cast(new TypicalTypes.ConstructedT(replaceList.apply(tl, str, newVar), s));
              }
              break;
            case RecordT:
              if (TypicalSupport.match$106(arg$1766)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1766.getTuple().get1());

                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> ty;

                  {
                    ty = Analyzer.cast(TypicalSupport.head$100.apply(tl));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                      public TypicalTypes.raw_type<?> apply() {
                        final TypicalTypes.raw_type<?> arg$1776 = Analyzer.cast(ty);

                        if ((null == arg$1776)) {
                          return null;
                        }
                        if ((null != arg$1776))
                                                    switch (arg$1776.tag()) {
                          case FieldT:
                            if (TypicalSupport.match$98(arg$1776)) {
                              final String s = Analyzer.cast(arg$1776.getTuple().get1());

                              return Analyzer.cast(null == hasTypeVariables.apply(s) ? null : hasTypeVariables.apply(s) ? new TypicalTypes.RecordT(replaceList.apply(tl, str, newVar)) : t);
                            }
                            break;
                          default:
                            break;
                          };
                        if (true) {
                          return Analyzer.cast(null);
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply());
              }
              break;
            case FieldT:
              if (TypicalSupport.match$98(arg$1766)) {
                final String s1 = Analyzer.cast(arg$1766.getTuple().get1());
                final String s2 = Analyzer.cast(arg$1766.getTuple().get2());
                final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$1766.getTuple().get3());

                return Analyzer.cast(new TypicalTypes.FieldT(s1, s2, replace.apply(ty, str, newVar)));
              }
              break;
            case TupleT:
              if (TypicalSupport.match$110(arg$1766)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1766.getTuple().get1());

                return Analyzer.cast(new TypicalTypes.TupleT(replaceList.apply(tl, str, newVar)));
              }
              break;
            case ConstructorT:
              if (TypicalSupport.match$96(arg$1766)) {
                final String s1 = Analyzer.cast(arg$1766.getTuple().get1());
                final String s2 = Analyzer.cast(arg$1766.getTuple().get2());
                final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$1766.getTuple().get3());

                return Analyzer.cast(new TypicalTypes.ConstructorT(s1, s2, replace.apply(ty, str, newVar)));
              }
              break;
            case FunctionT:
              if (TypicalSupport.match$99(arg$1766)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1766.getTuple().get1());
                final TypicalTypes.raw_type<?> ret = Analyzer.cast(arg$1766.getTuple().get2());

                return Analyzer.cast(new TypicalTypes.FunctionT(replaceList.apply(tl, str, newVar), replace.apply(ret, str, newVar)));
              }
              break;
            case PairOfType:
              if (TypicalSupport.match$112(arg$1766)) {
                final TypicalTypes.raw_type<?> t1 = Analyzer.cast(arg$1766.getTuple().get1());
                final TypicalTypes.raw_type<?> t2 = Analyzer.cast(arg$1766.getTuple().get2());

                return Analyzer.cast(new TypicalTypes.PairOfType(replace.apply(t1, str, newVar), replace.apply(t2, str, newVar)));
              }
              break;
            case VariantT:
              if (TypicalSupport.match$102(arg$1766)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1766.getTuple().get1());

                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> ty;

                  {
                    ty = Analyzer.cast(TypicalSupport.head$100.apply(tl));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                      public TypicalTypes.raw_type<?> apply() {
                        final TypicalTypes.raw_type<?> arg$1772 = Analyzer.cast(ty);

                        if ((null == arg$1772)) {
                          return null;
                        }
                        if ((null != arg$1772))
                                                    switch (arg$1772.tag()) {
                          case ConstructorT:
                            if (TypicalSupport.match$96(arg$1772)) {
                              final String s = Analyzer.cast(arg$1772.getTuple().get1());

                              return Analyzer.cast(null == hasTypeVariables.apply(s) ? null : hasTypeVariables.apply(s) ? new TypicalTypes.VariantT(replaceList.apply(tl, str, newVar)) : t);
                            }
                            break;
                          default:
                            break;
                          };
                        if (true) {
                          return Analyzer.cast(null);
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply());
              }
              break;
            case VariableT:
              if (TypicalSupport.match$113(arg$1766)) {
                final String s = Analyzer.cast(arg$1766.getTuple().get1());

                return Analyzer.cast(null == Primitives.equal.apply(s, str) ? null : Primitives.equal.apply(s, str) ? new TypicalTypes.VariableT(newVar, Boolean.FALSE) : t);
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(t);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F3<Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.raw_type<?>>, String, String> replaceList = new Function.F3<Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.raw_type<?>>, String, String>() {
    public Pair<TypicalTypes.raw_type<?>> apply(final Pair<TypicalTypes.raw_type<?>> tl, final String str, final String newStr) {
      return new Match<Pair<TypicalTypes.raw_type<?>>>() {
        public Pair<TypicalTypes.raw_type<?>> apply() {
          final Pair<TypicalTypes.raw_type<?>> arg$1783 = Analyzer.cast(tl);

          if ((null == arg$1783)) {
            return null;
          }
          if (TypicalSupport.match$118(arg$1783)) {
            return Analyzer.cast(Pair.<TypicalTypes.raw_type<?>>empty());
          }
          if ((null != arg$1783 && !((Pair)arg$1783).isEmpty())) {
            final Pair<TypicalTypes.raw_type<?>> list$1785 = Analyzer.cast(arg$1783);
            final TypicalTypes.raw_type<?> x = Analyzer.cast(Primitives.wrapHead(list$1785));
            final Pair<TypicalTypes.raw_type<?>> xs = Analyzer.cast(Primitives.wrapTail(list$1785));

            return Analyzer.cast(Primitives.wrapCons(replace.apply(x, str, newStr), replaceList.apply(xs, str, newStr)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> resolveType = new Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>() {
    public TypicalTypes.raw_type<?> apply(final TypicalTypes.raw_type<?> t) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final TypicalTypes.raw_type<?> arg$1787 = Analyzer.cast(t);

          if ((null == arg$1787)) {
            return null;
          }
          if ((null != arg$1787))
                        switch (arg$1787.tag()) {
            case RecordT:
              if (TypicalSupport.match$106(arg$1787)) {
                final Pair<TypicalTypes.raw_type<?>> tyList = Analyzer.cast(arg$1787.getTuple().get1());

                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<TypicalTypes.raw_type<?>> tl;

                  {
                    tl = Analyzer.cast(TypicalSupport.map$1790.apply(resolveType, tyList));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new TypicalTypes.RecordT(tl));
                  }
                }.apply());
              }
              break;
            case ConstructedT:
              if (TypicalSupport.match$111(arg$1787)) {
                final Pair<TypicalTypes.raw_type<?>> tyList = Analyzer.cast(arg$1787.getTuple().get1());
                final String s = Analyzer.cast(arg$1787.getTuple().get2());

                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<TypicalTypes.raw_type<?>> tl;

                  {
                    tl = Analyzer.cast(TypicalSupport.map$1790.apply(resolveType, tyList));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new TypicalTypes.ConstructedT(tl, s));
                  }
                }.apply());
              }
              break;
            case FieldT:
              if (TypicalSupport.match$98(arg$1787)) {
                final String s1 = Analyzer.cast(arg$1787.getTuple().get1());
                final String s2 = Analyzer.cast(arg$1787.getTuple().get2());
                final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$1787.getTuple().get3());

                return Analyzer.cast(new TypicalTypes.FieldT(s1, s2, resolveType.apply(ty)));
              }
              break;
            case TupleT:
              if (TypicalSupport.match$110(arg$1787)) {
                final Pair<TypicalTypes.raw_type<?>> tyList = Analyzer.cast(arg$1787.getTuple().get1());

                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<TypicalTypes.raw_type<?>> tl;

                  {
                    tl = Analyzer.cast(TypicalSupport.map$1790.apply(resolveType, tyList));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new TypicalTypes.TupleT(tl));
                  }
                }.apply());
              }
              break;
            case ConstructorT:
              if (TypicalSupport.match$96(arg$1787)) {
                final String s1 = Analyzer.cast(arg$1787.getTuple().get1());
                final String s2 = Analyzer.cast(arg$1787.getTuple().get2());
                final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$1787.getTuple().get3());

                return Analyzer.cast(new TypicalTypes.ConstructorT(s1, s2, resolveType.apply(ty)));
              }
              break;
            case FunctionT:
              if (TypicalSupport.match$99(arg$1787)) {
                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$1787.getTuple().get1());
                final TypicalTypes.raw_type<?> ret = Analyzer.cast(arg$1787.getTuple().get2());

                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final Pair<TypicalTypes.raw_type<?>> left;

                  {
                    left = Analyzer.cast(TypicalSupport.map$1790.apply(resolveType, tl));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new TypicalTypes.FunctionT(left, resolveType.apply(ret)));
                  }
                }.apply());
              }
              break;
            case PairOfType:
              if (TypicalSupport.match$112(arg$1787)) {
                final TypicalTypes.raw_type<?> t1 = Analyzer.cast(arg$1787.getTuple().get1());
                final TypicalTypes.raw_type<?> t2 = Analyzer.cast(arg$1787.getTuple().get2());

                return Analyzer.cast(new TypicalTypes.PairOfType(resolveType.apply(t1), resolveType.apply(t2)));
              }
              break;
            case VariantT:
              if (TypicalSupport.match$102(arg$1787)) {
                final Pair<TypicalTypes.raw_type<?>> tyList = Analyzer.cast(arg$1787.getTuple().get1());

                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> con;

                  {
                    con = Analyzer.cast(TypicalSupport.head$100.apply(tyList));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                      public TypicalTypes.raw_type<?> apply() {
                        final TypicalTypes.raw_type<?> arg$1794 = Analyzer.cast(con);

                        if ((null == arg$1794)) {
                          return null;
                        }
                        if ((null != arg$1794))
                                                    switch (arg$1794.tag()) {
                          case ConstructorT:
                            if (TypicalSupport.match$96(arg$1794)) {
                              final String s = Analyzer.cast(arg$1794.getTuple().get1());

                              return Analyzer.cast(null == Primitives.not.apply(hasTypeVariables.apply(s)) ? null : Primitives.not.apply(hasTypeVariables.apply(s)) ? t : new Let<TypicalTypes.raw_type<?>>() {
                                final Pair<TypicalTypes.raw_type<?>> tl;

                                {
                                  tl = Analyzer.cast(TypicalSupport.map$1790.apply(resolveType, tyList));
                                }

                                public TypicalTypes.raw_type<?> apply() {
                                  return Analyzer.cast(new TypicalTypes.VariantT(tl));
                                }
                              }.apply());
                            }
                            break;
                          default:
                            break;
                          };
                        if (true) {
                          return Analyzer.cast(null);
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply());
              }
              break;
            case VariableT:
              if (TypicalSupport.match$113(arg$1787)) {
                final String str = Analyzer.cast(arg$1787.getTuple().get1());

                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> newT;

                  {
                    newT = Analyzer.cast(Analyzer.cast(Primitives.get.apply(str, hashTable)));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(null == Primitives.isBottom.apply(newT) ? null : Primitives.isBottom.apply(newT) ? new TypicalTypes.VariableT(str, Boolean.TRUE) : resolveType.apply(newT));
                  }
                }.apply());
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(t);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F3<TypicalTypes.raw_type<?>, Pair<Node>, Pair<TypicalTypes.raw_type<?>>, TypicalTypes.raw_type<?>> processArguments = new Function.F3<TypicalTypes.raw_type<?>, Pair<Node>, Pair<TypicalTypes.raw_type<?>>, TypicalTypes.raw_type<?>>() {
    public TypicalTypes.raw_type<?> apply(final Pair<Node> nl, final Pair<TypicalTypes.raw_type<?>> tl, final TypicalTypes.raw_type<?> retType) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final Pair<Node> arg$1802 = Analyzer.cast(nl);

          if ((null == arg$1802)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1802)) {
            return Analyzer.cast(null == Primitives.isEmpty.apply(tl) ? null : Primitives.isEmpty.apply(tl) ? retType : new TypicalTypes.FunctionT(tl, retType));
          }
          if ((null != arg$1802 && !((Pair)arg$1802).isEmpty())) {
            final Pair<Node> list$1804 = Analyzer.cast(arg$1802);
            final Node x = GNode.cast(Primitives.wrapHead(list$1804));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1804));

            return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
              public TypicalTypes.raw_type<?> apply() {
                final Pair<TypicalTypes.raw_type<?>> arg$1805 = Analyzer.cast(tl);

                if ((null == arg$1805)) {
                  return null;
                }
                if ((null != arg$1805 && !((Pair)arg$1805).isEmpty())) {
                  final Pair<TypicalTypes.raw_type<?>> list$1806 = Analyzer.cast(arg$1805);
                  final TypicalTypes.raw_type<?> y = Analyzer.cast(Primitives.wrapHead(list$1806));
                  final Pair<TypicalTypes.raw_type<?>> ys = Analyzer.cast(Primitives.wrapTail(list$1806));

                  return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                    final TypicalTypes.raw_type<?> tx;
                    final Pair<String> muts;
                    final String preStr;

                    {
                      tx = Analyzer.cast(analyze.apply(x));
                      muts = Analyzer.cast(getAnnotatedStringList.apply(x, "mutual"));
                      preStr = Analyzer.cast(null == Primitives.isNotBottom.apply(muts) ? null : Primitives.isNotBottom.apply(muts) ? Primitives.concat.apply(Primitives.concat.apply("in mutual functions: ", joinStringList.apply(muts, "")), "; ") : "");
                      new Guard<TypicalTypes.raw_type<?>>() {
                        public TypicalTypes.raw_type<?> apply() {
                          if ((null == tx)) {
                            return null;
                          }
                          if ((null == unify)) {
                            return null;
                          }
                          if ((null == y)) {
                            return null;
                          }

                          final TypicalTypes.raw_type<?> result$1807 = unify.apply(tx, y);

                          if ((null == result$1807)) {
                            return Analyzer.cast(error(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(preStr, " expected "), getTypeName.apply(y)), ", found "), getTypeName.apply(tx)), x));
                          }
                          return result$1807;
                        }
                      }.apply();
                    }

                    public TypicalTypes.raw_type<?> apply() {
                      return Analyzer.cast(processArguments.apply(xs, ys, retType));
                    }
                  }.apply());
                }
                if (true) {
                  return Analyzer.cast(null);
                }
                return null;
              }
            }.apply());
          }
          if (true) {
            return Analyzer.cast(null);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> resolveRecordType = new Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>() {
    public TypicalTypes.raw_type<?> apply(final TypicalTypes.raw_type<?> t) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final TypicalTypes.raw_type<?> arg$1810 = Analyzer.cast(t);

          if ((null == arg$1810)) {
            return null;
          }
          if ((null != arg$1810))
                        switch (arg$1810.tag()) {
            case FieldT:
              if (TypicalSupport.match$98(arg$1810)) {
                final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$1810.getTuple().get3());

                return Analyzer.cast(resolveRecordType.apply(ty));
              }
              break;
            case VariableT:
              if (TypicalSupport.match$113(arg$1810)) {
                final String str = Analyzer.cast(arg$1810.getTuple().get1());

                return Analyzer.cast(null == isDefined.apply(GNode.create("UserDefinedType", str), getNameSpace) ? null : isDefined.apply(GNode.create("UserDefinedType", str), getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> ty;

                  {
                    ty = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", str), getNameSpace)));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(resolveRecordType.apply(ty));
                  }
                }.apply() : t);
              }
              break;
            case TypeName:
              if (TypicalSupport.match$97(arg$1810)) {
                final String s = Analyzer.cast(arg$1810.getTuple().get1());

                return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                  final TypicalTypes.raw_type<?> ty;

                  {
                    ty = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", s), getNameSpace)));
                  }

                  public TypicalTypes.raw_type<?> apply() {
                    return Analyzer.cast(resolveRecordType.apply(ty));
                  }
                }.apply());
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(t);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<Object>, Pair<Node>> processFunctionCalls = new Function.F1<Pair<Object>, Pair<Node>>() {
    public Pair<Object> apply(final Pair<Node> nl) {
      return new Let<Pair<Object>>() {
        final TypicalTypes.graph tl;
        final Pair<TypicalTypes.call> edges;
        final Pair<Pair<String>> circles;
        final Pair<Pair<String>> g;
        final Pair<TypicalTypes.nodeRec> res;

        {
          tl = Analyzer.cast(buildGraph.apply(nl));
          edges = Analyzer.cast(removeWrongEdges.apply(null == tl ? null : tl.edges, null == tl ? null : tl.functionList));
          circles = Analyzer.cast(findCircles.apply(edges));
          g = Analyzer.cast(groupCircles.apply(circles, null == tl ? null : tl.functionList));
          res = Analyzer.cast(getResult.apply(null == tl ? null : tl.functionList, edges, g));
        }

        public Pair<Object> apply() {
          return Analyzer.cast(TypicalSupport.map$1815.apply(rememberOnNode, res));
        }
      }.apply();
    }
  };

  final Function.F1<Object, TypicalTypes.nodeRec> rememberOnNode = new Function.F1<Object, TypicalTypes.nodeRec>() {
    public Object apply(final TypicalTypes.nodeRec n) {
      return new Let<Object>() {
        final Node nod;

        {
          nod = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("NameSpaceStructure", null == n ? null : n.name, null, null), getNameSpace)));
          Primitives.annotate.apply(nod, "mutual", new TypicalTypes.StringList(null == n ? null : n.mutualList));
          Primitives.annotate.apply(nod, "depend", new TypicalTypes.StringList(null == n ? null : n.dependList));
        }

        public Object apply() {
          return Analyzer.cast(null);
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.graph, Pair<Node>> buildGraph = new Function.F1<TypicalTypes.graph, Pair<Node>>() {
    public TypicalTypes.graph apply(final Pair<Node> l) {
      return new Match<TypicalTypes.graph>() {
        public TypicalTypes.graph apply() {
          final Pair<Node> arg$1816 = Analyzer.cast(l);

          if ((null == arg$1816)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1816)) {
            return Analyzer.cast(new TypicalTypes.graph(Pair.<String>empty(), Pair.<TypicalTypes.call>empty()));
          }
          if ((null != arg$1816 && !((Pair)arg$1816).isEmpty())) {
            final Pair<Node> list$1818 = Analyzer.cast(arg$1816);
            final Node x = GNode.cast(Primitives.wrapHead(list$1818));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1818));

            return Analyzer.cast(new Match<TypicalTypes.graph>() {
              public TypicalTypes.graph apply() {
                final Node arg$1819 = GNode.cast(x);

                if ((null == arg$1819)) {
                  return null;
                }
                if (TypicalSupport.match$74(arg$1819)) {
                  final String s = (arg$1819.size() > 0 ? arg$1819.getString(0) : null);
                  final Node n = (arg$1819.size() > 2 ? arg$1819.getGeneric(2) : null);

                  matching_nodes.add(arg$1819);
                  if ((null != arg$1819 && processScopeNodes.contains(arg$1819.getName()))) {
                    processScope(arg$1819, getScope);
                  }
                  checkEnterScope(arg$1819);

                  final Object retValue$1824 = Analyzer.cast(new Let<TypicalTypes.graph>() {
                    final Pair<TypicalTypes.call> cal;
                    final TypicalTypes.graph grap;

                    {
                      cal = Analyzer.cast(getCall.apply(n, s, Pair.<TypicalTypes.call>empty()));
                      grap = Analyzer.cast(buildGraph.apply(xs));
                    }

                    public TypicalTypes.graph apply() {
                      return Analyzer.cast(new TypicalTypes.graph(Primitives.wrapCons(s, null == grap ? null : grap.functionList), TypicalSupport.union$1821.apply(cal, null == grap ? null : grap.edges)));
                    }
                  }.apply());

                  checkExitScope(arg$1819);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$1824);
                }
                if (true) {
                  matching_nodes.add(arg$1819);
                  if ((null != arg$1819 && processScopeNodes.contains(arg$1819.getName()))) {
                    processScope(arg$1819, getScope);
                  }
                  checkEnterScope(arg$1819);

                  final Object retValue$1827 = Analyzer.cast(buildGraph.apply(xs));

                  checkExitScope(arg$1819);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$1827);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<TypicalTypes.call>, Pair<TypicalTypes.call>, Pair<String>> removeWrongEdges = new Function.F2<Pair<TypicalTypes.call>, Pair<TypicalTypes.call>, Pair<String>>() {
    public Pair<TypicalTypes.call> apply(final Pair<TypicalTypes.call> edList, final Pair<String> strList) {
      return new Match<Pair<TypicalTypes.call>>() {
        public Pair<TypicalTypes.call> apply() {
          final Pair<TypicalTypes.call> arg$1830 = Analyzer.cast(edList);

          if ((null == arg$1830)) {
            return null;
          }
          if (TypicalSupport.match$988(arg$1830)) {
            return Analyzer.cast(Pair.<TypicalTypes.call>empty());
          }
          if ((null != arg$1830 && !((Pair)arg$1830).isEmpty())) {
            final Pair<TypicalTypes.call> list$1832 = Analyzer.cast(arg$1830);
            final TypicalTypes.call x = Analyzer.cast(Primitives.wrapHead(list$1832));
            final Pair<TypicalTypes.call> xs = Analyzer.cast(Primitives.wrapTail(list$1832));

            return Analyzer.cast(null == Primitives.contains.apply(null == x ? null : x.callee, strList) ? null : Primitives.contains.apply(null == x ? null : x.callee, strList) ? Primitives.wrapCons(x, removeWrongEdges.apply(xs, strList)) : removeWrongEdges.apply(xs, strList));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F3<Pair<TypicalTypes.call>, Pair<Node>, String, Pair<TypicalTypes.call>> getCallList = new Function.F3<Pair<TypicalTypes.call>, Pair<Node>, String, Pair<TypicalTypes.call>>() {
    public Pair<TypicalTypes.call> apply(final Pair<Node> nl, final String s, final Pair<TypicalTypes.call> li) {
      return new Match<Pair<TypicalTypes.call>>() {
        public Pair<TypicalTypes.call> apply() {
          final Pair<Node> arg$1834 = Analyzer.cast(nl);

          if ((null == arg$1834)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$1834)) {
            return Analyzer.cast(Pair.<TypicalTypes.call>empty());
          }
          if ((null != arg$1834 && !((Pair)arg$1834).isEmpty())) {
            final Pair<Node> list$1836 = Analyzer.cast(arg$1834);
            final Node x = GNode.cast(Primitives.wrapHead(list$1836));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$1836));

            return Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> li1;
              final Pair<TypicalTypes.call> li2;

              {
                li1 = Analyzer.cast(getCall.apply(x, s, li));
                li2 = Analyzer.cast(getCallList.apply(xs, s, li));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li1, li2));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F3<Pair<TypicalTypes.call>, Node, String, Pair<TypicalTypes.call>> getCall = new Function.F3<Pair<TypicalTypes.call>, Node, String, Pair<TypicalTypes.call>>() {
    public Pair<TypicalTypes.call> apply(final Node no, final String s, final Pair<TypicalTypes.call> li) {
      return (null == Primitives.isBottom.apply(no) ? null : Primitives.isBottom.apply(no) ? li : new Match<Pair<TypicalTypes.call>>() {
        public Pair<TypicalTypes.call> apply() {
          final Node arg$1838 = GNode.cast(no);

          if ((null == arg$1838)) {
            return null;
          }
          if (TypicalSupport.match$332(arg$1838)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1838, 0, arg$1838.size()));

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1842 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caList;

              {
                caList = Analyzer.cast(getCallList.apply(nl, s, li));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, caList));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1842);
          }
          if (TypicalSupport.match$1210(arg$1838)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1838, 0, arg$1838.size()));

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1846 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caList;

              {
                caList = Analyzer.cast(getCallList.apply(nl, s, li));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, caList));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1846);
          }
          if (TypicalSupport.match$235(arg$1838)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1838, 0, arg$1838.size()));

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1850 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caList;

              {
                caList = Analyzer.cast(getCallList.apply(nl, s, li));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, caList));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1850);
          }
          if (TypicalSupport.match$596(arg$1838)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1838, 0, arg$1838.size()));

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1854 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caList;

              {
                caList = Analyzer.cast(getCallList.apply(nl, s, li));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, caList));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1854);
          }
          if (TypicalSupport.match$10(arg$1838)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1838, 1, arg$1838.size()));

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1858 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caList;

              {
                caList = Analyzer.cast(getCallList.apply(nl, s, li));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, caList));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1858);
          }
          if (TypicalSupport.match$641(arg$1838)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1838, 0, arg$1838.size()));

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1862 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caList;

              {
                caList = Analyzer.cast(getCallList.apply(nl, s, li));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, caList));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1862);
          }
          if (TypicalSupport.match$702(arg$1838)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1838, 0, arg$1838.size()));

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1866 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caList;

              {
                caList = Analyzer.cast(getCallList.apply(nl, s, li));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, caList));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1866);
          }
          if (TypicalSupport.match$191(arg$1838)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1838, 0, arg$1838.size()));

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1870 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caList;

              {
                caList = Analyzer.cast(getCallList.apply(nl, s, li));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, caList));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1870);
          }
          if (TypicalSupport.match$336(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1874 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1874);
          }
          if (TypicalSupport.match$342(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1878 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1878);
          }
          if (TypicalSupport.match$348(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 2 ? arg$1838.getGeneric(2) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1882 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1882);
          }
          if (TypicalSupport.match$353(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 2 ? arg$1838.getGeneric(2) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1886 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1886);
          }
          if (TypicalSupport.match$369(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 2 ? arg$1838.getGeneric(2) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1890 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1890);
          }
          if (TypicalSupport.match$387(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 2 ? arg$1838.getGeneric(2) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1894 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1894);
          }
          if (TypicalSupport.match$411(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1898 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1898);
          }
          if (TypicalSupport.match$84(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1902 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1902);
          }
          if (TypicalSupport.match$227(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1906 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1906);
          }
          if (TypicalSupport.match$601(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 2 ? arg$1838.getGeneric(2) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1910 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1910);
          }
          if (TypicalSupport.match$691(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1914 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1914);
          }
          if (TypicalSupport.match$608(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1918 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1918);
          }
          if (TypicalSupport.match$618(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1922 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1922);
          }
          if (TypicalSupport.match$405(arg$1838)) {
            final Node left = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node right = (arg$1838.size() > 2 ? arg$1838.getGeneric(2) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1926 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> caLeft;
              final Pair<TypicalTypes.call> caRight;
              final Pair<TypicalTypes.call> res;

              {
                caLeft = Analyzer.cast(getCall.apply(left, s, li));
                caRight = Analyzer.cast(getCall.apply(right, s, li));
                res = Analyzer.cast(TypicalSupport.union$1821.apply(caLeft, caRight));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, res));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1926);
          }
          if (TypicalSupport.match$696(arg$1838)) {
            final Node e1 = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);
            final Node e2 = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);
            final Node e3 = (arg$1838.size() > 2 ? arg$1838.getGeneric(2) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1930 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final Pair<TypicalTypes.call> ca1;
              final Pair<TypicalTypes.call> ca2;
              final Pair<TypicalTypes.call> ca3;
              final Pair<TypicalTypes.call> ca4;

              {
                ca1 = Analyzer.cast(getCall.apply(e1, s, li));
                ca2 = Analyzer.cast(getCall.apply(e2, s, li));
                ca3 = Analyzer.cast(getCall.apply(e3, s, li));
                ca4 = Analyzer.cast(TypicalSupport.union$1821.apply(TypicalSupport.union$1821.apply(ca1, ca2), ca3));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, ca4));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1930);
          }
          if (TypicalSupport.match$416(arg$1838)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$1838, 0, arg$1838.size()));

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1938 = Analyzer.cast(new Match<Pair<TypicalTypes.call>>() {
              public Pair<TypicalTypes.call> apply() {
                final Pair<Node> arg$1932 = Analyzer.cast(nl);

                if ((null == arg$1932)) {
                  return null;
                }
                if (TypicalSupport.match$1933(arg$1932)) {
                  final Node name = Analyzer.cast(arg$1932.get(0));
                  final Node args = Analyzer.cast(arg$1932.get(1));

                  return Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
                    final Pair<Node> el;
                    final String str;
                    final Pair<TypicalTypes.call> caList;
                    final TypicalTypes.call ca;

                    {
                      el = Analyzer.cast(getNodeList.apply(args));
                      str = Analyzer.cast(getString.apply(name));
                      caList = Analyzer.cast(getCallList.apply(el, s, li));
                      ca = Analyzer.cast(new TypicalTypes.call(s, str));
                    }

                    public Pair<TypicalTypes.call> apply() {
                      return Analyzer.cast(TypicalSupport.union$1821.apply(li, Primitives.wrapCons(ca, caList)));
                    }
                  }.apply());
                }
                if (TypicalSupport.match$1934(arg$1932)) {
                  final Pair<Node> el = Analyzer.cast(Primitives.getChildren(arg$1932.get(2), 0, arg$1932.get(2).size()));

                  return Analyzer.cast(TypicalSupport.union$1821.apply(li, getCallList.apply(el, s, li)));
                }
                if (true) {
                  return Analyzer.cast(null);
                }
                return null;
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1938);
          }
          if (TypicalSupport.match$62(arg$1838)) {
            final String str = (arg$1838.size() > 0 ? arg$1838.getString(0) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1942 = Analyzer.cast(new Let<Pair<TypicalTypes.call>>() {
              final TypicalTypes.call ca;

              {
                ca = Analyzer.cast(new TypicalTypes.call(s, str));
              }

              public Pair<TypicalTypes.call> apply() {
                return Analyzer.cast(TypicalSupport.union$1821.apply(li, new Pair<TypicalTypes.call>(ca)));
              }
            }.apply());

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1942);
          }
          if (TypicalSupport.match$546(arg$1838)) {
            final Node e = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1946 = Analyzer.cast(TypicalSupport.union$1821.apply(li, getCall.apply(e, s, li)));

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1946);
          }
          if (TypicalSupport.match$50(arg$1838)) {
            final Node e = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1950 = Analyzer.cast(TypicalSupport.union$1821.apply(li, getCall.apply(e, s, li)));

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1950);
          }
          if (TypicalSupport.match$85(arg$1838)) {
            final Node e = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1954 = Analyzer.cast(TypicalSupport.union$1821.apply(li, getCall.apply(e, s, li)));

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1954);
          }
          if (TypicalSupport.match$579(arg$1838)) {
            final Node e = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1958 = Analyzer.cast(TypicalSupport.union$1821.apply(li, getCall.apply(e, s, li)));

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1958);
          }
          if (TypicalSupport.match$1072(arg$1838)) {
            final Node e = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1962 = Analyzer.cast(TypicalSupport.union$1821.apply(li, getCall.apply(e, s, li)));

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1962);
          }
          if (TypicalSupport.match$589(arg$1838)) {
            final Node e = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1966 = Analyzer.cast(TypicalSupport.union$1821.apply(li, getCall.apply(e, s, li)));

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1966);
          }
          if (TypicalSupport.match$86(arg$1838)) {
            final Node e = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1970 = Analyzer.cast(TypicalSupport.union$1821.apply(li, getCall.apply(e, s, li)));

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1970);
          }
          if (TypicalSupport.match$46(arg$1838)) {
            final Node e = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1974 = Analyzer.cast(TypicalSupport.union$1821.apply(li, getCall.apply(e, s, li)));

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1974);
          }
          if (TypicalSupport.match$187(arg$1838)) {
            final Node e = (arg$1838.size() > 0 ? arg$1838.getGeneric(0) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1978 = Analyzer.cast(TypicalSupport.union$1821.apply(li, getCall.apply(e, s, li)));

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1978);
          }
          if (TypicalSupport.match$78(arg$1838)) {
            final Node e = (arg$1838.size() > 2 ? arg$1838.getGeneric(2) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1982 = Analyzer.cast(TypicalSupport.union$1821.apply(li, getCall.apply(e, s, li)));

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1982);
          }
          if (TypicalSupport.match$712(arg$1838)) {
            final Node e = (arg$1838.size() > 2 ? arg$1838.getGeneric(2) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1986 = Analyzer.cast(TypicalSupport.union$1821.apply(li, getCall.apply(e, s, li)));

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1986);
          }
          if (TypicalSupport.match$427(arg$1838)) {
            final Node e = (arg$1838.size() > 1 ? arg$1838.getGeneric(1) : null);

            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1990 = Analyzer.cast(TypicalSupport.union$1821.apply(li, getCall.apply(e, s, li)));

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1990);
          }
          if (true) {
            matching_nodes.add(arg$1838);
            if ((null != arg$1838 && processScopeNodes.contains(arg$1838.getName()))) {
              processScope(arg$1838, getScope);
            }
            checkEnterScope(arg$1838);

            final Object retValue$1993 = Analyzer.cast(li);

            checkExitScope(arg$1838);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$1993);
          }
          return null;
        }
      }.apply());
    }
  };

  final Function.F6<Pair<Pair<String>>, Pair<String>, String, Pair<String>, Pair<String>, Pair<Pair<String>>, Pair<TypicalTypes.call>> findPathsList = new Function.F6<Pair<Pair<String>>, Pair<String>, String, Pair<String>, Pair<String>, Pair<Pair<String>>, Pair<TypicalTypes.call>>() {
    public Pair<Pair<String>> apply(final Pair<String> fromList, final String des, final Pair<String> curPath, final Pair<String> visitedNodes, final Pair<Pair<String>> paths, final Pair<TypicalTypes.call> edges) {
      return new Match<Pair<Pair<String>>>() {
        public Pair<Pair<String>> apply() {
          final Pair<String> arg$1995 = Analyzer.cast(fromList);

          if ((null == arg$1995)) {
            return null;
          }
          if (TypicalSupport.match$1046(arg$1995)) {
            return Analyzer.cast(paths);
          }
          if ((null != arg$1995 && !((Pair)arg$1995).isEmpty())) {
            final Pair<String> list$1997 = Analyzer.cast(arg$1995);
            final String x = Analyzer.cast(Primitives.wrapHead(list$1997));
            final Pair<String> xs = Analyzer.cast(Primitives.wrapTail(list$1997));

            return Analyzer.cast(new Let<Pair<Pair<String>>>() {
              final Pair<Pair<String>> paths1;

              {
                paths1 = Analyzer.cast(findPaths.apply(x, des, curPath, visitedNodes, paths, edges));
              }

              public Pair<Pair<String>> apply() {
                return Analyzer.cast(findPathsList.apply(xs, des, curPath, visitedNodes, paths1, edges));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F6<Pair<Pair<String>>, String, String, Pair<String>, Pair<String>, Pair<Pair<String>>, Pair<TypicalTypes.call>> findPaths = new Function.F6<Pair<Pair<String>>, String, String, Pair<String>, Pair<String>, Pair<Pair<String>>, Pair<TypicalTypes.call>>() {
    public Pair<Pair<String>> apply(final String from, final String des, final Pair<String> curPath, final Pair<String> visitedNodes, final Pair<Pair<String>> paths, final Pair<TypicalTypes.call> edges) {
      return (null == Primitives.not.apply(Primitives.contains.apply(from, visitedNodes)) ? null : Primitives.not.apply(Primitives.contains.apply(from, visitedNodes)) ? (null == Primitives.not.apply(Primitives.equal.apply(from, des)) ? null : Primitives.not.apply(Primitives.equal.apply(from, des)) ? new Let<Pair<Pair<String>>>() {
        final Pair<String> newVisited;
        final Pair<String> newCur;
        final Pair<String> children;

        {
          newVisited = Analyzer.cast(Primitives.wrapCons(from, visitedNodes));
          newCur = Analyzer.cast(Primitives.wrapCons(from, curPath));
          children = Analyzer.cast(getChildren.apply(from, edges));
        }

        public Pair<Pair<String>> apply() {
          return Analyzer.cast(findPathsList.apply(children, des, newCur, newVisited, paths, edges));
        }
      }.apply() : new Let<Pair<Pair<String>>>() {
        final Pair<String> res;

        {
          res = Analyzer.cast(Primitives.wrapCons(from, curPath));
        }

        public Pair<Pair<String>> apply() {
          return Analyzer.cast(Primitives.wrapCons(res, paths));
        }
      }.apply()) : paths);
    }
  };

  final Function.F2<Pair<String>, String, Pair<TypicalTypes.call>> getChildren = new Function.F2<Pair<String>, String, Pair<TypicalTypes.call>>() {
    public Pair<String> apply(final String parent, final Pair<TypicalTypes.call> edges) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<TypicalTypes.call> arg$1999 = Analyzer.cast(edges);

          if ((null == arg$1999)) {
            return null;
          }
          if (TypicalSupport.match$988(arg$1999)) {
            return Analyzer.cast(Pair.<String>empty());
          }
          if ((null != arg$1999 && !((Pair)arg$1999).isEmpty())) {
            final Pair<TypicalTypes.call> list$2001 = Analyzer.cast(arg$1999);
            final TypicalTypes.call x = Analyzer.cast(Primitives.wrapHead(list$2001));
            final Pair<TypicalTypes.call> xs = Analyzer.cast(Primitives.wrapTail(list$2001));

            return Analyzer.cast(null == Primitives.equal.apply(null == x ? null : x.caller, parent) ? null : Primitives.equal.apply(null == x ? null : x.caller, parent) ? Primitives.wrapCons(null == x ? null : x.callee, getChildren.apply(parent, xs)) : getChildren.apply(parent, xs));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<Pair<String>>, Pair<TypicalTypes.call>> findCircles = new Function.F1<Pair<Pair<String>>, Pair<TypicalTypes.call>>() {
    public Pair<Pair<String>> apply(final Pair<TypicalTypes.call> edges) {
      return new Match<Pair<Pair<String>>>() {
        public Pair<Pair<String>> apply() {
          final Pair<TypicalTypes.call> arg$2003 = Analyzer.cast(edges);

          if ((null == arg$2003)) {
            return null;
          }
          if (TypicalSupport.match$988(arg$2003)) {
            return Analyzer.cast(Pair.<Pair<String>>empty());
          }
          if ((null != arg$2003 && !((Pair)arg$2003).isEmpty())) {
            final Pair<TypicalTypes.call> list$2005 = Analyzer.cast(arg$2003);
            final TypicalTypes.call x = Analyzer.cast(Primitives.wrapHead(list$2005));
            final Pair<TypicalTypes.call> xs = Analyzer.cast(Primitives.wrapTail(list$2005));

            return Analyzer.cast(new Let<Pair<Pair<String>>>() {
              final Pair<Pair<String>> paths1;
              final Pair<Pair<String>> paths2;

              {
                paths1 = Analyzer.cast(findPaths.apply(null == x ? null : x.callee, null == x ? null : x.caller, Pair.<String>empty(), Pair.<String>empty(), Pair.<Pair<String>>empty(), xs));
                paths2 = Analyzer.cast(findCircles.apply(xs));
              }

              public Pair<Pair<String>> apply() {
                return Analyzer.cast(TypicalSupport.union$2006.apply(paths1, paths2));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<Pair<String>>, Pair<Pair<String>>, Pair<String>> groupCircles = new Function.F2<Pair<Pair<String>>, Pair<Pair<String>>, Pair<String>>() {
    public Pair<Pair<String>> apply(final Pair<Pair<String>> circles, final Pair<String> vertices) {
      return new Match<Pair<Pair<String>>>() {
        public Pair<Pair<String>> apply() {
          final Pair<String> arg$2008 = Analyzer.cast(vertices);

          if ((null == arg$2008)) {
            return null;
          }
          if (TypicalSupport.match$1046(arg$2008)) {
            return Analyzer.cast(circles);
          }
          if ((null != arg$2008 && !((Pair)arg$2008).isEmpty())) {
            final Pair<String> list$2010 = Analyzer.cast(arg$2008);
            final String x = Analyzer.cast(Primitives.wrapHead(list$2010));
            final Pair<String> xs = Analyzer.cast(Primitives.wrapTail(list$2010));

            return Analyzer.cast(new Let<Pair<Pair<String>>>() {
              final TypicalTypes.group g;
              final Pair<Pair<String>> newCir;

              {
                g = Analyzer.cast(groupBy.apply(x, circles, Pair.<String>empty(), Pair.<Pair<String>>empty()));
                newCir = Analyzer.cast(TypicalSupport.append$2011.apply(new Pair<Pair<String>>(null == g ? null : g.group), null == g ? null : g.circles));
              }

              public Pair<Pair<String>> apply() {
                return Analyzer.cast(groupCircles.apply(newCir, xs));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F4<TypicalTypes.group, String, Pair<Pair<String>>, Pair<String>, Pair<Pair<String>>> groupBy = new Function.F4<TypicalTypes.group, String, Pair<Pair<String>>, Pair<String>, Pair<Pair<String>>>() {
    public TypicalTypes.group apply(final String str, final Pair<Pair<String>> circles, final Pair<String> res, final Pair<Pair<String>> ret) {
      return new Match<TypicalTypes.group>() {
        public TypicalTypes.group apply() {
          final Pair<Pair<String>> arg$2013 = Analyzer.cast(circles);

          if ((null == arg$2013)) {
            return null;
          }
          if (TypicalSupport.match$2014(arg$2013)) {
            return Analyzer.cast(new TypicalTypes.group(res, ret));
          }
          if ((null != arg$2013 && !((Pair)arg$2013).isEmpty())) {
            final Pair<Pair<String>> list$2015 = Analyzer.cast(arg$2013);
            final Pair<String> x = Analyzer.cast(Primitives.wrapHead(list$2015));
            final Pair<Pair<String>> xs = Analyzer.cast(Primitives.wrapTail(list$2015));

            return Analyzer.cast(null == Primitives.contains.apply(str, x) ? null : Primitives.contains.apply(str, x) ? new Let<TypicalTypes.group>() {
              final Pair<String> newRes;

              {
                newRes = Analyzer.cast(TypicalSupport.union$273.apply(x, res));
              }

              public TypicalTypes.group apply() {
                return Analyzer.cast(groupBy.apply(str, xs, newRes, ret));
              }
            }.apply() : new Let<TypicalTypes.group>() {
              final Pair<Pair<String>> newRet;

              {
                newRet = Analyzer.cast(Primitives.wrapCons(x, ret));
              }

              public TypicalTypes.group apply() {
                return Analyzer.cast(groupBy.apply(str, xs, res, newRet));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F3<Pair<TypicalTypes.nodeRec>, Pair<String>, Pair<TypicalTypes.call>, Pair<Pair<String>>> getResult = new Function.F3<Pair<TypicalTypes.nodeRec>, Pair<String>, Pair<TypicalTypes.call>, Pair<Pair<String>>>() {
    public Pair<TypicalTypes.nodeRec> apply(final Pair<String> vertices, final Pair<TypicalTypes.call> edges, final Pair<Pair<String>> groups) {
      return new Match<Pair<TypicalTypes.nodeRec>>() {
        public Pair<TypicalTypes.nodeRec> apply() {
          final Pair<String> arg$2017 = Analyzer.cast(vertices);

          if ((null == arg$2017)) {
            return null;
          }
          if (TypicalSupport.match$1046(arg$2017)) {
            return Analyzer.cast(Pair.<TypicalTypes.nodeRec>empty());
          }
          if ((null != arg$2017 && !((Pair)arg$2017).isEmpty())) {
            final Pair<String> list$2019 = Analyzer.cast(arg$2017);
            final String x = Analyzer.cast(Primitives.wrapHead(list$2019));
            final Pair<String> xs = Analyzer.cast(Primitives.wrapTail(list$2019));

            return Analyzer.cast(new Let<Pair<TypicalTypes.nodeRec>>() {
              final TypicalTypes.nodeRec rec;

              {
                rec = Analyzer.cast(getResultNode.apply(x, edges, groups));
              }

              public Pair<TypicalTypes.nodeRec> apply() {
                return Analyzer.cast(Primitives.wrapCons(rec, getResult.apply(xs, edges, groups)));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F3<TypicalTypes.nodeRec, String, Pair<TypicalTypes.call>, Pair<Pair<String>>> getResultNode = new Function.F3<TypicalTypes.nodeRec, String, Pair<TypicalTypes.call>, Pair<Pair<String>>>() {
    public TypicalTypes.nodeRec apply(final String str, final Pair<TypicalTypes.call> edges, final Pair<Pair<String>> groups) {
      return new Let<TypicalTypes.nodeRec>() {
        final Pair<String> mutual;
        final Pair<String> depend;

        {
          mutual = Analyzer.cast(getMutual.apply(str, groups));
          depend = Analyzer.cast(getDepend.apply(str, edges, mutual));
        }

        public TypicalTypes.nodeRec apply() {
          return Analyzer.cast(new TypicalTypes.nodeRec(str, mutual, depend));
        }
      }.apply();
    }
  };

  final Function.F2<Pair<String>, String, Pair<Pair<String>>> getMutual = new Function.F2<Pair<String>, String, Pair<Pair<String>>>() {
    public Pair<String> apply(final String str, final Pair<Pair<String>> groups) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<Pair<String>> arg$2021 = Analyzer.cast(groups);

          if ((null == arg$2021)) {
            return null;
          }
          if (TypicalSupport.match$2014(arg$2021)) {
            return Analyzer.cast(Pair.<String>empty());
          }
          if ((null != arg$2021 && !((Pair)arg$2021).isEmpty())) {
            final Pair<Pair<String>> list$2023 = Analyzer.cast(arg$2021);
            final Pair<String> x = Analyzer.cast(Primitives.wrapHead(list$2023));
            final Pair<Pair<String>> xs = Analyzer.cast(Primitives.wrapTail(list$2023));

            return Analyzer.cast(null == Primitives.contains.apply(str, x) ? null : Primitives.contains.apply(str, x) ? remove.apply(str, x) : getMutual.apply(str, xs));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F3<Pair<String>, String, Pair<TypicalTypes.call>, Pair<String>> getDepend = new Function.F3<Pair<String>, String, Pair<TypicalTypes.call>, Pair<String>>() {
    public Pair<String> apply(final String str, final Pair<TypicalTypes.call> edges, final Pair<String> mutual) {
      return new Let<Pair<String>>() {
        final Pair<String> children;

        {
          children = Analyzer.cast(getChildren.apply(str, edges));
        }

        public Pair<String> apply() {
          return Analyzer.cast(removeMutual.apply(children, mutual));
        }
      }.apply();
    }
  };

  final Function.F2<Pair<String>, Pair<String>, Pair<String>> removeMutual = new Function.F2<Pair<String>, Pair<String>, Pair<String>>() {
    public Pair<String> apply(final Pair<String> children, final Pair<String> mutual) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<String> arg$2025 = Analyzer.cast(children);

          if ((null == arg$2025)) {
            return null;
          }
          if (TypicalSupport.match$1046(arg$2025)) {
            return Analyzer.cast(Pair.<String>empty());
          }
          if ((null != arg$2025 && !((Pair)arg$2025).isEmpty())) {
            final Pair<String> list$2027 = Analyzer.cast(arg$2025);
            final String x = Analyzer.cast(Primitives.wrapHead(list$2027));
            final Pair<String> xs = Analyzer.cast(Primitives.wrapTail(list$2027));

            return Analyzer.cast(null == Primitives.contains.apply(x, mutual) ? null : Primitives.contains.apply(x, mutual) ? removeMutual.apply(xs, mutual) : Primitives.wrapCons(x, removeMutual.apply(xs, mutual)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<String>, String, Pair<String>> remove = new Function.F2<Pair<String>, String, Pair<String>>() {
    public Pair<String> apply(final String s, final Pair<String> li) {
      return new Match<Pair<String>>() {
        public Pair<String> apply() {
          final Pair<String> arg$2029 = Analyzer.cast(li);

          if ((null == arg$2029)) {
            return null;
          }
          if (TypicalSupport.match$1046(arg$2029)) {
            return Analyzer.cast(Pair.<String>empty());
          }
          if ((null != arg$2029 && !((Pair)arg$2029).isEmpty())) {
            final Pair<String> list$2031 = Analyzer.cast(arg$2029);
            final String x = Analyzer.cast(Primitives.wrapHead(list$2031));
            final Pair<String> xs = Analyzer.cast(Primitives.wrapTail(list$2031));

            return Analyzer.cast(null == Primitives.equal.apply(s, x) ? null : Primitives.equal.apply(s, x) ? xs : Primitives.wrapCons(x, remove.apply(s, xs)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<TypicalTypes.raw_type<?>>, Node> visitDepend = new Function.F1<Pair<TypicalTypes.raw_type<?>>, Node>() {
    public Pair<TypicalTypes.raw_type<?>> apply(final Node no) {
      return new Let<Pair<TypicalTypes.raw_type<?>>>() {
        final Pair<String> deps;

        {
          deps = Analyzer.cast(getAnnotatedStringList.apply(no, "depend"));
        }

        public Pair<TypicalTypes.raw_type<?>> apply() {
          return Analyzer.cast(TypicalSupport.map$2033.apply(visitDependNode, deps));
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.raw_type<?>, String> visitDependNode = new Function.F1<TypicalTypes.raw_type<?>, String>() {
    public TypicalTypes.raw_type<?> apply(final String s) {
      return new Let<TypicalTypes.raw_type<?>>() {
        final Node no;

        {
          no = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("NameSpaceStructure", s, null, null), getNameSpace)));
        }

        public TypicalTypes.raw_type<?> apply() {
          return Analyzer.cast(analyze.apply(no));
        }
      }.apply();
    }
  };

  final Function.F1<Object, Node> processMutual = new Function.F1<Object, Node>() {
    public Object apply(final Node no) {
      return new Let<Object>() {
        final Pair<String> muts;
        final Pair<Node> nl;
        final Pair<TypicalTypes.raw_type<?>> recList;

        {
          muts = Analyzer.cast(getAnnotatedStringList.apply(no, "mutual"));
          nl = Analyzer.cast(getNodes.apply(muts));
          Primitives.annotateList.apply(nl, "secondary", wildt);
          TypicalSupport.map$125.apply(analyze, nl);
          recList = Analyzer.cast(TypicalSupport.map$125.apply(createFunctionType, nl));
          processBodies.apply(nl, recList);
        }

        public Object apply() {
          return Analyzer.cast(null);
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.raw_type<?>, Node> createFunctionType = new Function.F1<TypicalTypes.raw_type<?>, Node>() {
    public TypicalTypes.raw_type<?> apply(final Node n) {
      return new Match<TypicalTypes.raw_type<?>>() {
        public TypicalTypes.raw_type<?> apply() {
          final Node arg$2034 = GNode.cast(n);

          if ((null == arg$2034)) {
            return null;
          }
          if (TypicalSupport.match$74(arg$2034)) {
            final Node p = (arg$2034.size() > 1 ? arg$2034.getGeneric(1) : null);

            matching_nodes.add(arg$2034);
            if ((null != arg$2034 && processScopeNodes.contains(arg$2034.getName()))) {
              processScope(arg$2034, getScope);
            }
            checkEnterScope(arg$2034);

            final Object retValue$2042 = Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
              final TypicalTypes.raw_type<?> varT;
              final TypicalTypes.raw_type<?> tp;

              {
                varT = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.FALSE));
                tp = Analyzer.cast(analyze.apply(p));
              }

              public TypicalTypes.raw_type<?> apply() {
                return Analyzer.cast(new Match<TypicalTypes.raw_type<?>>() {
                  public TypicalTypes.raw_type<?> apply() {
                    final TypicalTypes.raw_type<?> arg$2036 = Analyzer.cast(tp);

                    if ((null == arg$2036)) {
                      return null;
                    }
                    if ((null != arg$2036))
                                            switch (arg$2036.tag()) {
                      case TupleT:
                        if (TypicalSupport.match$204(arg$2036)) {
                          return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                            {
                              redefine.apply(n, varT, getNameSpace);
                            }

                            public TypicalTypes.raw_type<?> apply() {
                              return Analyzer.cast(varT);
                            }
                          }.apply());
                        }
                        if (TypicalSupport.match$110(arg$2036)) {
                          final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$2036.getTuple().get1());

                          return Analyzer.cast(new Let<TypicalTypes.raw_type<?>>() {
                            {
                              redefine.apply(n, new TypicalTypes.FunctionT(tl, varT), getNameSpace);
                            }

                            public TypicalTypes.raw_type<?> apply() {
                              return Analyzer.cast(varT);
                            }
                          }.apply());
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(null);
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2034);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2042);
          }
          if (true) {
            matching_nodes.add(arg$2034);
            if ((null != arg$2034 && processScopeNodes.contains(arg$2034.getName()))) {
              processScope(arg$2034, getScope);
            }
            checkEnterScope(arg$2034);

            final Object retValue$2045 = Analyzer.cast(null);

            checkExitScope(arg$2034);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2045);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<Object>, Pair<Node>, Pair<TypicalTypes.raw_type<?>>> processBodies = new Function.F2<Pair<Object>, Pair<Node>, Pair<TypicalTypes.raw_type<?>>>() {
    public Pair<Object> apply(final Pair<Node> nl, final Pair<TypicalTypes.raw_type<?>> recList) {
      return new Match<Pair<Object>>() {
        public Pair<Object> apply() {
          final Pair<Node> arg$2047 = Analyzer.cast(nl);

          if ((null == arg$2047)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$2047)) {
            return Analyzer.cast(Pair.empty());
          }
          if ((null != arg$2047 && !((Pair)arg$2047).isEmpty())) {
            final Pair<Node> list$2049 = Analyzer.cast(arg$2047);
            final Node x = GNode.cast(Primitives.wrapHead(list$2049));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$2049));

            return Analyzer.cast(new Match<Pair<Object>>() {
              public Pair<Object> apply() {
                final Node arg$2050 = GNode.cast(x);

                if ((null == arg$2050)) {
                  return null;
                }
                if (TypicalSupport.match$74(arg$2050)) {
                  final Node e = (arg$2050.size() > 2 ? arg$2050.getGeneric(2) : null);

                  matching_nodes.add(arg$2050);
                  if ((null != arg$2050 && processScopeNodes.contains(arg$2050.getName()))) {
                    processScope(arg$2050, getScope);
                  }
                  checkEnterScope(arg$2050);

                  final Object retValue$2058 = Analyzer.cast(new Match<Pair<Object>>() {
                    public Pair<Object> apply() {
                      final Pair<TypicalTypes.raw_type<?>> arg$2052 = Analyzer.cast(recList);

                      if ((null == arg$2052)) {
                        return null;
                      }
                      if (TypicalSupport.match$118(arg$2052)) {
                        return Analyzer.cast(null);
                      }
                      if ((null != arg$2052 && !((Pair)arg$2052).isEmpty())) {
                        final Pair<TypicalTypes.raw_type<?>> list$2054 = Analyzer.cast(arg$2052);
                        final TypicalTypes.raw_type<?> y = Analyzer.cast(Primitives.wrapHead(list$2054));
                        final Pair<TypicalTypes.raw_type<?>> ys = Analyzer.cast(Primitives.wrapTail(list$2054));

                        return Analyzer.cast(new Let<Pair<Object>>() {
                          final TypicalTypes.raw_type<?> te;

                          {
                            te = Analyzer.cast(analyze.apply(e));
                            unify.apply(y, te);
                          }

                          public Pair<Object> apply() {
                            return Analyzer.cast(processBodies.apply(xs, ys));
                          }
                        }.apply());
                      }
                      return null;
                    }
                  }.apply());

                  checkExitScope(arg$2050);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$2058);
                }
                if (true) {
                  matching_nodes.add(arg$2050);
                  if ((null != arg$2050 && processScopeNodes.contains(arg$2050.getName()))) {
                    processScope(arg$2050, getScope);
                  }
                  checkEnterScope(arg$2050);

                  final Object retValue$2061 = Analyzer.cast(null);

                  checkExitScope(arg$2050);
                  matching_nodes.remove(matching_nodes.size() - 1);
                  return Analyzer.cast(retValue$2061);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<Node>, Pair<String>> getNodes = new Function.F1<Pair<Node>, Pair<String>>() {
    public Pair<Node> apply(final Pair<String> names) {
      return new Match<Pair<Node>>() {
        public Pair<Node> apply() {
          final Pair<String> arg$2064 = Analyzer.cast(names);

          if ((null == arg$2064)) {
            return null;
          }
          if (TypicalSupport.match$1046(arg$2064)) {
            return Analyzer.cast(Pair.<Node>empty());
          }
          if ((null != arg$2064 && !((Pair)arg$2064).isEmpty())) {
            final Pair<String> list$2066 = Analyzer.cast(arg$2064);
            final String x = Analyzer.cast(Primitives.wrapHead(list$2066));
            final Pair<String> xs = Analyzer.cast(Primitives.wrapTail(list$2066));

            return Analyzer.cast(new Let<Pair<Node>>() {
              final Node no;

              {
                no = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("NameSpaceStructure", x, null, null), getNameSpace)));
              }

              public Pair<Node> apply() {
                return Analyzer.cast(TypicalSupport.union$2067.apply(new Pair<Node>(no), getNodes.apply(xs)));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<Object>, Node> resolveMutual = new Function.F1<Pair<Object>, Node>() {
    public Pair<Object> apply(final Node no) {
      return new Match<Pair<Object>>() {
        public Pair<Object> apply() {
          final Node arg$2069 = GNode.cast(no);

          if ((null == arg$2069)) {
            return null;
          }
          if (TypicalSupport.match$74(arg$2069)) {
            final String s = (arg$2069.size() > 0 ? arg$2069.getString(0) : null);

            matching_nodes.add(arg$2069);
            if ((null != arg$2069 && processScopeNodes.contains(arg$2069.getName()))) {
              processScope(arg$2069, getScope);
            }
            checkEnterScope(arg$2069);

            final Object retValue$2074 = Analyzer.cast(new Let<Pair<Object>>() {
              final Pair<String> muts;

              {
                muts = Analyzer.cast(getAnnotatedStringList.apply(no, "mutual"));
              }

              public Pair<Object> apply() {
                return Analyzer.cast(TypicalSupport.map$2071.apply(resolveMutualName, Primitives.wrapCons(s, muts)));
              }
            }.apply());

            checkExitScope(arg$2069);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2074);
          }
          if (true) {
            matching_nodes.add(arg$2069);
            if ((null != arg$2069 && processScopeNodes.contains(arg$2069.getName()))) {
              processScope(arg$2069, getScope);
            }
            checkEnterScope(arg$2069);

            final Object retValue$2077 = Analyzer.cast(null);

            checkExitScope(arg$2069);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2077);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Object, String> resolveMutualName = new Function.F1<Object, String>() {
    public Object apply(final String str) {
      return new Let<Object>() {
        final Node nod;
        final TypicalTypes.raw_type<?> tx;
        final TypicalTypes.raw_type<?> res;

        {
          nod = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("NameSpaceStructure", str, null, null), getNameSpace)));
          tx = Analyzer.cast(Analyzer.cast(lookup2.apply(nod, getNameSpace)));
          res = Analyzer.cast(resolveType.apply(tx));
          redefine.apply(nod, res, getNameSpace);
          Primitives.annotate.apply(nod, "visited", wildt);
        }

        public Object apply() {
          return Analyzer.cast(null);
        }
      }.apply();
    }
  };

  final Function.F1<Object, Pair<TypicalTypes.raw_type<?>>> createTypeRecord = new Function.F1<Object, Pair<TypicalTypes.raw_type<?>>>() {
    public Object apply(final Pair<TypicalTypes.raw_type<?>> tl) {
      return new Let<Object>() {
        final TypicalTypes.raw_type<?> ty;

        {
          ty = Analyzer.cast(Analyzer.cast(lookup4.apply(GNode.create("UserDefinedType", "raw_type"), "error", "raw_type must be defined", getNameSpace)));
        }

        public Object apply() {
          return Analyzer.cast(null == Primitives.isNotBottom.apply(ty) || !Primitives.isNotBottom.apply(ty) ? null : new Let<Object>() {
            final TypicalTypes.raw_type<?> t;

            {
              t = Analyzer.cast(new TypicalTypes.FieldT("type", "type", new TypicalTypes.TypeName("raw_type")));
              redefine.apply(GNode.create("FieldType", "type", null), t, getNameSpace);
              redefine.apply(GNode.create("UserDefinedType", "type"), new TypicalTypes.RecordT(Primitives.wrapCons(t, tl)), getNameSpace);
            }

            public Object apply() {
              return Analyzer.cast(null);
            }
          }.apply());
        }
      }.apply();
    }
  };

  final Function.F2<String, Pair<String>, String> joinStringList = new Function.F2<String, Pair<String>, String>() {
    public String apply(final Pair<String> sl, final String res) {
      return new Match<String>() {
        public String apply() {
          final Pair<String> arg$2079 = Analyzer.cast(sl);

          if ((null == arg$2079)) {
            return null;
          }
          if (TypicalSupport.match$1046(arg$2079)) {
            return Analyzer.cast(res);
          }
          if (TypicalSupport.match$2081(arg$2079)) {
            final String x = Analyzer.cast(arg$2079.get(0));

            return Analyzer.cast(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(res, "'"), x), "'"));
          }
          if ((null != arg$2079 && !((Pair)arg$2079).isEmpty())) {
            final Pair<String> list$2082 = Analyzer.cast(arg$2079);
            final String x = Analyzer.cast(Primitives.wrapHead(list$2082));
            final Pair<String> xs = Analyzer.cast(Primitives.wrapTail(list$2082));

            return Analyzer.cast(joinStringList.apply(xs, Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(res, "'"), x), "'"), ", ")));
          }
          return null;
        }
      }.apply();
    }
  };

  protected class preload {
    public <T0> Pair<T0> apply(final T0 n) {
      return new Let<Pair<T0>>() {
        final TypicalTypes.raw_type<?> strL;
        final TypicalTypes.raw_type<?> t1;
        final TypicalTypes.raw_type<?> t2;
        final TypicalTypes.raw_type<?> t3;
        final TypicalTypes.raw_type<?> t6;
        final TypicalTypes.raw_type<?> t7;
        final TypicalTypes.raw_type<?> t9;
        final TypicalTypes.raw_type<?> l1;
        final TypicalTypes.raw_type<?> l2;
        final TypicalTypes.raw_type<?> l4;
        final TypicalTypes.raw_type<?> t14;
        final TypicalTypes.raw_type<?> tup;
        final TypicalTypes.raw_type<?> t4;
        final TypicalTypes.raw_type<?> t5;
        final TypicalTypes.raw_type<?> t11;
        final TypicalTypes.raw_type<?> l3;
        final TypicalTypes.raw_type<?> l5;
        final TypicalTypes.raw_type<?> l6;
        final TypicalTypes.raw_type<?> l7;
        final TypicalTypes.raw_type<?> l8;
        final TypicalTypes.raw_type<?> l9;
        final TypicalTypes.raw_type<?> t8;
        final TypicalTypes.raw_type<?> t12;
        final TypicalTypes.raw_type<?> t13;

        {
          strL = Analyzer.cast(new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(strt), "list"));
          t1 = Analyzer.cast(new TypicalTypes.ConstructorT("name", "SimpleName", strt));
          t2 = Analyzer.cast(new TypicalTypes.TypeName("name"));
          t3 = Analyzer.cast(new TypicalTypes.ConstructorT("name", "QualifiedName", new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(strt), "list")));
          t6 = Analyzer.cast(new TypicalTypes.ConstructorT("scope_kind", "Anonymous", strt));
          t7 = Analyzer.cast(new TypicalTypes.ConstructorT("scope_kind", "Temporary", strt));
          t9 = Analyzer.cast(new TypicalTypes.TypeName("scope_kind"));
          l1 = Analyzer.cast(new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(wildt), "list"));
          l2 = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.TRUE));
          l4 = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.TRUE));
          t14 = Analyzer.cast(new TypicalTypes.VariableT(freshName.apply("type"), Boolean.TRUE));
          tup = Analyzer.cast(new TypicalTypes.TupleT(new Pair<TypicalTypes.raw_type<?>>(new TypicalTypes.TypeName("name")).append(new Pair<TypicalTypes.raw_type<?>>(strt)).append(new Pair<TypicalTypes.raw_type<?>>(strt))));
          load.apply("SimpleName", "constructor", t1);
          load.apply("QualifiedName", "constructor", t3);
          t4 = Analyzer.cast(new TypicalTypes.VariantT(new Pair<TypicalTypes.raw_type<?>>(t1).append(new Pair<TypicalTypes.raw_type<?>>(t3))));
          t5 = Analyzer.cast(new TypicalTypes.ConstructorT("scope_kind", "Named", t2));
          t11 = Analyzer.cast(new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(nodet), "list"));
          l3 = Analyzer.cast(new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(l2), "list"));
          l5 = Analyzer.cast(new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(l4), "list"));
          l6 = Analyzer.cast(new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l2), l4));
          l7 = Analyzer.cast(new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l2), boolt));
          l8 = Analyzer.cast(new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l4).append(new Pair<TypicalTypes.raw_type<?>>(l2)), l2));
          l9 = Analyzer.cast(new TypicalTypes.ConstructedT(new Pair<TypicalTypes.raw_type<?>>(l5), "list"));
          load.apply("name", "type", t4);
          load.apply("Named", "constructor", t5);
          load.apply("Anonymous", "constructor", t6);
          load.apply("Temporary", "constructor", t7);
          t8 = Analyzer.cast(new TypicalTypes.VariantT(new Pair<TypicalTypes.raw_type<?>>(t5).append(new Pair<TypicalTypes.raw_type<?>>(t6)).append(new Pair<TypicalTypes.raw_type<?>>(t7))));
          t12 = Analyzer.cast(new TypicalTypes.TupleT(new Pair<TypicalTypes.raw_type<?>>(t9).append(new Pair<TypicalTypes.raw_type<?>>(t11))));
          load.apply("scope_kind", "type", t8);
          t13 = Analyzer.cast(new TypicalTypes.ConstructorT("scopeT", "Scope", t12));
          load.apply("Scope", "constructor", t13);
          load.apply("scopeT", "type", new TypicalTypes.VariantT(new Pair<TypicalTypes.raw_type<?>>(t13)));
          redefine.apply(GNode.create("UserDefinedType", "scopeT"), new TypicalTypes.VariantT(new Pair<TypicalTypes.raw_type<?>>(t13)), getNameSpace);
          load.apply("node_type", "value", strt);
          load.apply("String.stoi", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt).append(new Pair<TypicalTypes.raw_type<?>>(intt)), intt));
          load.apply("String.stof", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt), floatt));
          load.apply("String.itos", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(intt), strt));
          load.apply("String.ftos", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(floatt), strt));
          load.apply("String.concat", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt).append(new Pair<TypicalTypes.raw_type<?>>(strt)), strt));
          load.apply("String.ends_with", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt).append(new Pair<TypicalTypes.raw_type<?>>(strt)), boolt));
          load.apply("String.ends_withi", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt).append(new Pair<TypicalTypes.raw_type<?>>(strt)), boolt));
          load.apply("String.join_strings", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strL), strt));
          load.apply("String.ssize", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt), intt));
          load.apply("String.starts_with", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt).append(new Pair<TypicalTypes.raw_type<?>>(strt)), boolt));
          load.apply("String.starts_withi", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt).append(new Pair<TypicalTypes.raw_type<?>>(strt)), boolt));
          load.apply("String.substring", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt).append(new Pair<TypicalTypes.raw_type<?>>(intt)), strt));
          load.apply("String.substring2", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt).append(new Pair<TypicalTypes.raw_type<?>>(intt)).append(new Pair<TypicalTypes.raw_type<?>>(intt)), strt));
          load.apply("abs_float", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(floatt), floatt));
          load.apply("abs_int", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(intt), intt));
          load.apply("ftoi", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(floatt), intt));
          load.apply("shift_left", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(intt).append(new Pair<TypicalTypes.raw_type<?>>(intt)), intt));
          load.apply("shift_right", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(intt).append(new Pair<TypicalTypes.raw_type<?>>(intt)), intt));
          load.apply("and_bits", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(intt).append(new Pair<TypicalTypes.raw_type<?>>(intt)), intt));
          load.apply("or_bits", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(intt).append(new Pair<TypicalTypes.raw_type<?>>(intt)), intt));
          load.apply("xor_bits", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(intt).append(new Pair<TypicalTypes.raw_type<?>>(intt)), intt));
          load.apply("negate_bits", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(intt), intt));
          load.apply("negate_float", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(floatt), floatt));
          load.apply("negate_int", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(intt), intt));
          load.apply("List.is_empty", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l1), boolt));
          load.apply("List.length", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l1), intt));
          load.apply("List.flatten", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l9), l5));
          load.apply("List.mem", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l2).append(new Pair<TypicalTypes.raw_type<?>>(l3)), boolt));
          load.apply("List.append", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l3).append(new Pair<TypicalTypes.raw_type<?>>(l3)), l3));
          load.apply("List.head", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l3), l2));
          load.apply("List.tail", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l3), l3));
          load.apply("List.nth", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l3).append(new Pair<TypicalTypes.raw_type<?>>(intt)), l2));
          load.apply("List.union", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l3).append(new Pair<TypicalTypes.raw_type<?>>(l3)), l3));
          load.apply("List.subtraction", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l3).append(new Pair<TypicalTypes.raw_type<?>>(l3)), l3));
          load.apply("List.intersection", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l3).append(new Pair<TypicalTypes.raw_type<?>>(l3)), l3));
          load.apply("List.map", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l6).append(new Pair<TypicalTypes.raw_type<?>>(l3)), l5));
          load.apply("List.iter", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l6).append(new Pair<TypicalTypes.raw_type<?>>(l3)), l4));
          load.apply("List.exists", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l7).append(new Pair<TypicalTypes.raw_type<?>>(l5)), boolt));
          load.apply("List.foldl", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l8).append(new Pair<TypicalTypes.raw_type<?>>(l5)).append(new Pair<TypicalTypes.raw_type<?>>(l2)), l2));
          load.apply("List.cons", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(l2), l3));
          load.apply("trace", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(t14), t14));
          load.apply("trace2", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt).append(new Pair<TypicalTypes.raw_type<?>>(t14)), t14));
          load.apply("show_symbols", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt), boolt));
          load.apply("is_defined", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(nodet), boolt));
          load.apply("is_defined_locally", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(nodet), boolt));
          load.apply("annotate", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(nodet).append(new Pair<TypicalTypes.raw_type<?>>(strt)).append(new Pair<TypicalTypes.raw_type<?>>(l2)), l2));
          load.apply("has_annotation", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(nodet).append(new Pair<TypicalTypes.raw_type<?>>(strt)), boolt));
          load.apply("get_annotation", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(nodet).append(new Pair<TypicalTypes.raw_type<?>>(strt)), wildt));
          load.apply("annotate_list", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(t11).append(new Pair<TypicalTypes.raw_type<?>>(strt)).append(new Pair<TypicalTypes.raw_type<?>>(l2)), l2));
          load.apply("Map.get", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt), typet));
          load.apply("Map.put", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt).append(new Pair<TypicalTypes.raw_type<?>>(typet)), wildt));
          load.apply("fresh_name", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt), strt));
          load.apply("not_bottom", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(wildt), boolt));
          load.apply("is_bottom", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(wildt), boolt));
          load.apply("is_not_bottom", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(wildt), boolt));
          load.apply("node_name", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(nodet), strt));
          load.apply("load", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(strt).append(new Pair<TypicalTypes.raw_type<?>>(strt)).append(new Pair<TypicalTypes.raw_type<?>>(wildt)), wildt));
          load.apply("ancestor", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(wildt), nodet));
          load.apply("parent", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(wildt), nodet));
          load.apply("getNameSpace", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(nodet), tup));
          load.apply("getScope", "value", new TypicalTypes.FunctionT(new Pair<TypicalTypes.raw_type<?>>(nodet), new TypicalTypes.TypeName("scopeT")));
          load.apply("Limits.void_size", "value", intt);
          load.apply("Limits.bool_size", "value", intt);
          load.apply("Limits.int_size", "value", intt);
          load.apply("Limits.short_size", "value", intt);
          load.apply("Limits.long_size", "value", intt);
          load.apply("Limits.long_long_size", "value", intt);
          load.apply("Limits.float_size", "value", intt);
          load.apply("Limits.double_size", "value", intt);
          load.apply("Limits.pointer_size", "value", intt);
          load.apply("Limits.long_double_size", "value", intt);
          load.apply("Limits.function_size", "value", intt);
          load.apply("Limits.array_max", "value", intt);
          load.apply("Limits.void_align", "value", intt);
          load.apply("Limits.bool_align", "value", intt);
          load.apply("Limits.bool_nat_align", "value", intt);
          load.apply("Limits.short_align", "value", intt);
          load.apply("Limits.short_nat_align", "value", intt);
          load.apply("Limits.int_align", "value", intt);
          load.apply("Limits.int_nat_align", "value", intt);
          load.apply("Limits.long_align", "value", intt);
          load.apply("Limits.long_nat_align", "value", intt);
          load.apply("Limits.long_long_align", "value", intt);
          load.apply("Limits.long_long_nat_align", "value", intt);
          load.apply("Limits.float_align", "value", intt);
          load.apply("Limits.float_nat_align", "value", intt);
          load.apply("Limits.double_align", "value", intt);
          load.apply("Limits.double_nat_align", "value", intt);
          load.apply("Limits.long_double_align", "value", intt);
          load.apply("Limits.long_double_nat_align", "value", intt);
          load.apply("Limits.pointer_align", "value", intt);
          load.apply("Limits.pointer_nat_align", "value", intt);
          load.apply("Limits.function_align", "value", intt);
          load.apply("Limits.char_bits", "value", intt);
          load.apply("Limits.compiler_name", "value", strt);
          load.apply("Limits.compiler_version", "value", strt);
          load.apply("Limits.compiler_version_major", "value", intt);
          load.apply("Limits.compiler_version_minor", "value", intt);
          load.apply("nonce", "value", intt);
        }

        public Pair<T0> apply() {
          return new Pair<T0>(n);
        }
      }.apply();
    }
  }

  final preload preload = new preload();

  final Function.F1<Object, Node> resolveNode = new Function.F1<Object, Node>() {
    public Object apply(final Node no) {
      return new Match<Object>() {
        public Object apply() {
          final Node arg$2084 = GNode.cast(no);

          if ((null == arg$2084)) {
            return null;
          }
          if (TypicalSupport.match$142(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 1, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2088 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2088);
          }
          if (TypicalSupport.match$191(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2092 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2092);
          }
          if (TypicalSupport.match$218(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2096 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2096);
          }
          if (TypicalSupport.match$243(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2100 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2100);
          }
          if (TypicalSupport.match$249(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2104 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2104);
          }
          if (TypicalSupport.match$1284(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2108 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2108);
          }
          if (TypicalSupport.match$279(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2112 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2112);
          }
          if (TypicalSupport.match$288(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2116 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2116);
          }
          if (TypicalSupport.match$332(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2120 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2120);
          }
          if (TypicalSupport.match$416(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2124 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2124);
          }
          if (TypicalSupport.match$1202(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2128 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2128);
          }
          if (TypicalSupport.match$1210(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2132 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2132);
          }
          if (TypicalSupport.match$596(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2136 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2136);
          }
          if (TypicalSupport.match$10(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 1, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2140 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2140);
          }
          if (TypicalSupport.match$641(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2144 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2144);
          }
          if (TypicalSupport.match$702(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2148 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2148);
          }
          if (TypicalSupport.match$748(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2152 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2152);
          }
          if (TypicalSupport.match$1194(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2156 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2156);
          }
          if (TypicalSupport.match$167(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2160 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2160);
          }
          if (TypicalSupport.match$158(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2164 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2164);
          }
          if (TypicalSupport.match$235(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2168 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2168);
          }
          if (TypicalSupport.match$1198(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 0, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2172 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2172);
          }
          if (TypicalSupport.match$6(arg$2084)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 1, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2176 = Analyzer.cast(new Let<Object>() {
              {
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2176);
          }
          if (TypicalSupport.match$187(arg$2084)) {
            final Node n = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2180 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2180);
          }
          if (TypicalSupport.match$34(arg$2084)) {
            final Node n = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2184 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2184);
          }
          if (TypicalSupport.match$776(arg$2084)) {
            final Node n = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2188 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2188);
          }
          if (TypicalSupport.match$38(arg$2084)) {
            final Node n = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2192 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2192);
          }
          if (TypicalSupport.match$78(arg$2084)) {
            final Node n = (arg$2084.size() > 2 ? arg$2084.getGeneric(2) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2196 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2196);
          }
          if (TypicalSupport.match$70(arg$2084)) {
            final Node n = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2200 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2200);
          }
          if (TypicalSupport.match$58(arg$2084)) {
            final Node n = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2204 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2204);
          }
          if (TypicalSupport.match$551(arg$2084)) {
            final Node n = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2208 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2208);
          }
          if (TypicalSupport.match$50(arg$2084)) {
            final Node n = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2212 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2212);
          }
          if (TypicalSupport.match$579(arg$2084)) {
            final Node n = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2216 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2216);
          }
          if (TypicalSupport.match$589(arg$2084)) {
            final Node n = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2220 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2220);
          }
          if (TypicalSupport.match$46(arg$2084)) {
            final Node n = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2224 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2224);
          }
          if (TypicalSupport.match$26(arg$2084)) {
            final Node n = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2228 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2228);
          }
          if (TypicalSupport.match$14(arg$2084)) {
            final Node n = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2232 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2232);
          }
          if (TypicalSupport.match$42(arg$2084)) {
            final Node n = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2236 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2236);
          }
          if (TypicalSupport.match$740(arg$2084)) {
            final Node n = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2240 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2240);
          }
          if (TypicalSupport.match$22(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 2 ? arg$2084.getGeneric(2) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2244 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2244);
          }
          if (TypicalSupport.match$74(arg$2084)) {
            final Node n1 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);
            final Node n2 = (arg$2084.size() > 2 ? arg$2084.getGeneric(2) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2248 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2248);
          }
          if (TypicalSupport.match$86(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2252 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2252);
          }
          if (TypicalSupport.match$253(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2256 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2256);
          }
          if (TypicalSupport.match$267(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2260 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2260);
          }
          if (TypicalSupport.match$272(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2264 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2264);
          }
          if (TypicalSupport.match$299(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2268 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2268);
          }
          if (TypicalSupport.match$336(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2272 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2272);
          }
          if (TypicalSupport.match$85(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2276 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2276);
          }
          if (TypicalSupport.match$342(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2280 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2280);
          }
          if (TypicalSupport.match$348(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 2 ? arg$2084.getGeneric(2) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2284 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2284);
          }
          if (TypicalSupport.match$353(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 2 ? arg$2084.getGeneric(2) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2288 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2288);
          }
          if (TypicalSupport.match$369(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 2 ? arg$2084.getGeneric(2) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2292 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2292);
          }
          if (TypicalSupport.match$387(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 2 ? arg$2084.getGeneric(2) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2296 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2296);
          }
          if (TypicalSupport.match$411(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2300 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2300);
          }
          if (TypicalSupport.match$546(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2304 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2304);
          }
          if (TypicalSupport.match$84(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2308 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2308);
          }
          if (TypicalSupport.match$1072(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2312 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2312);
          }
          if (TypicalSupport.match$227(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2316 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2316);
          }
          if (TypicalSupport.match$759(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2320 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2320);
          }
          if (TypicalSupport.match$763(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2324 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2324);
          }
          if (TypicalSupport.match$405(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 2 ? arg$2084.getGeneric(2) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2328 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2328);
          }
          if (TypicalSupport.match$691(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2332 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2332);
          }
          if (TypicalSupport.match$608(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2336 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2336);
          }
          if (TypicalSupport.match$618(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2340 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2340);
          }
          if (TypicalSupport.match$147(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2084, 2, arg$2084.size()));

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2344 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
                TypicalSupport.map$124.apply(resolveNode, nl);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2344);
          }
          if (TypicalSupport.match$2345(arg$2084)) {
            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2348 = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
              final TypicalTypes.raw_type<?> t;
              final TypicalTypes.raw_type<?> ty;

              {
                t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                ty = Analyzer.cast(resolveType.apply(t));
                Primitives.annotate.apply(no, "__type", ty);
              }

              public Object apply() {
                return Analyzer.cast(null);
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2348);
          }
          if (TypicalSupport.match$2349(arg$2084)) {
            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2352 = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
              final TypicalTypes.raw_type<?> t;
              final TypicalTypes.raw_type<?> ty;

              {
                t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                ty = Analyzer.cast(resolveType.apply(t));
                Primitives.annotate.apply(no, "__type", ty);
              }

              public Object apply() {
                return Analyzer.cast(null);
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2352);
          }
          if (TypicalSupport.match$2353(arg$2084)) {
            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2356 = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
              final TypicalTypes.raw_type<?> t;
              final TypicalTypes.raw_type<?> ty;

              {
                t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                ty = Analyzer.cast(resolveType.apply(t));
                Primitives.annotate.apply(no, "__type", ty);
              }

              public Object apply() {
                return Analyzer.cast(null);
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2356);
          }
          if (TypicalSupport.match$2357(arg$2084)) {
            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2360 = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
              final TypicalTypes.raw_type<?> t;
              final TypicalTypes.raw_type<?> ty;

              {
                t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                ty = Analyzer.cast(resolveType.apply(t));
                Primitives.annotate.apply(no, "__type", ty);
              }

              public Object apply() {
                return Analyzer.cast(null);
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2360);
          }
          if (TypicalSupport.match$2361(arg$2084)) {
            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2364 = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
              final TypicalTypes.raw_type<?> t;
              final TypicalTypes.raw_type<?> ty;

              {
                t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                ty = Analyzer.cast(resolveType.apply(t));
                Primitives.annotate.apply(no, "__type", ty);
              }

              public Object apply() {
                return Analyzer.cast(null);
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2364);
          }
          if (TypicalSupport.match$2365(arg$2084)) {
            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2368 = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
              final TypicalTypes.raw_type<?> t;
              final TypicalTypes.raw_type<?> ty;

              {
                t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                ty = Analyzer.cast(resolveType.apply(t));
                Primitives.annotate.apply(no, "__type", ty);
              }

              public Object apply() {
                return Analyzer.cast(null);
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2368);
          }
          if (TypicalSupport.match$2369(arg$2084)) {
            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2372 = Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
              final TypicalTypes.raw_type<?> t;
              final TypicalTypes.raw_type<?> ty;

              {
                t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                ty = Analyzer.cast(resolveType.apply(t));
                Primitives.annotate.apply(no, "__type", ty);
              }

              public Object apply() {
                return Analyzer.cast(null);
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2372);
          }
          if (TypicalSupport.match$427(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);
            final Node n3 = (arg$2084.size() > 2 ? arg$2084.getGeneric(2) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2376 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
                resolveNode.apply(n3);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2376);
          }
          if (TypicalSupport.match$712(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);
            final Node n3 = (arg$2084.size() > 2 ? arg$2084.getGeneric(2) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2380 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
                resolveNode.apply(n3);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2380);
          }
          if (TypicalSupport.match$696(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);
            final Node n3 = (arg$2084.size() > 2 ? arg$2084.getGeneric(2) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2384 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
                resolveNode.apply(n3);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2384);
          }
          if (TypicalSupport.match$601(arg$2084)) {
            final Node n1 = (arg$2084.size() > 0 ? arg$2084.getGeneric(0) : null);
            final Node n2 = (arg$2084.size() > 1 ? arg$2084.getGeneric(1) : null);
            final Node n3 = (arg$2084.size() > 2 ? arg$2084.getGeneric(2) : null);
            final Node n4 = (arg$2084.size() > 3 ? arg$2084.getGeneric(3) : null);

            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2388 = Analyzer.cast(new Let<Object>() {
              {
                resolveNode.apply(n1);
                resolveNode.apply(n2);
                resolveNode.apply(n3);
                resolveNode.apply(n4);
              }

              public Object apply() {
                return Analyzer.cast(null == Primitives.hasAnnotation.apply(no, "__type") || !Primitives.hasAnnotation.apply(no, "__type") ? null : new Let<Object>() {
                  final TypicalTypes.raw_type<?> t;
                  final TypicalTypes.raw_type<?> ty;

                  {
                    t = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
                    ty = Analyzer.cast(resolveType.apply(t));
                    Primitives.annotate.apply(no, "__type", ty);
                  }

                  public Object apply() {
                    return Analyzer.cast(null);
                  }
                }.apply());
              }
            }.apply());

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2388);
          }
          if (true) {
            matching_nodes.add(arg$2084);
            if ((null != arg$2084 && processScopeNodes.contains(arg$2084.getName()))) {
              processScope(arg$2084, getScope);
            }
            checkEnterScope(arg$2084);

            final Object retValue$2391 = Analyzer.cast(null);

            checkExitScope(arg$2084);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2391);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<Node>, Pair<Node>> getPatternNodes = new Function.F1<Pair<Node>, Pair<Node>>() {
    public Pair<Node> apply(final Pair<Node> nl) {
      return new Match<Pair<Node>>() {
        public Pair<Node> apply() {
          final Pair<Node> arg$2393 = Analyzer.cast(nl);

          if ((null == arg$2393)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$2393)) {
            return Analyzer.cast(Pair.<Node>empty());
          }
          if ((null != arg$2393 && !((Pair)arg$2393).isEmpty())) {
            final Pair<Node> list$2395 = Analyzer.cast(arg$2393);
            final Node x = GNode.cast(Primitives.wrapHead(list$2395));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$2395));

            return Analyzer.cast(new Let<Pair<Node>>() {
              final Pair<Node> pl;

              {
                pl = Analyzer.cast(getNodeList.apply(x));
              }

              public Pair<Node> apply() {
                return Analyzer.cast(TypicalSupport.append$123.apply(pl, getPatternNodes.apply(xs)));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<TypicalTypes.patternRecord>, Pair<Node>> getPatternRecords = new Function.F1<Pair<TypicalTypes.patternRecord>, Pair<Node>>() {
    public Pair<TypicalTypes.patternRecord> apply(final Pair<Node> nl) {
      return new Match<Pair<TypicalTypes.patternRecord>>() {
        public Pair<TypicalTypes.patternRecord> apply() {
          final Pair<Node> arg$2397 = Analyzer.cast(nl);

          if ((null == arg$2397)) {
            return null;
          }
          if (TypicalSupport.match$281(arg$2397)) {
            return Analyzer.cast(Pair.<TypicalTypes.patternRecord>empty());
          }
          if ((null != arg$2397 && !((Pair)arg$2397).isEmpty())) {
            final Pair<Node> list$2399 = Analyzer.cast(arg$2397);
            final Node x = GNode.cast(Primitives.wrapHead(list$2399));
            final Pair<Node> xs = Analyzer.cast(Primitives.wrapTail(list$2399));

            return Analyzer.cast(Primitives.wrapCons(getPatternRecord.apply(x), getPatternRecords.apply(xs)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.patternRecord, Node> getPatternRecord = new Function.F1<TypicalTypes.patternRecord, Node>() {
    public TypicalTypes.patternRecord apply(final Node n) {
      return new Match<TypicalTypes.patternRecord>() {
        public TypicalTypes.patternRecord apply() {
          final Node arg$2401 = GNode.cast(n);

          if ((null == arg$2401)) {
            return null;
          }
          if (TypicalSupport.match$249(arg$2401)) {
            final Pair<Node> pl = Analyzer.cast(Primitives.getChildren(arg$2401, 0, arg$2401.size()));

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2405 = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.TupPattern(getPatternRecords.apply(pl)), n, Boolean.FALSE));

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2405);
          }
          if (TypicalSupport.match$253(arg$2401)) {
            final Node p = (arg$2401.size() > 0 ? arg$2401.getGeneric(0) : null);

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2409 = Analyzer.cast(new Let<TypicalTypes.patternRecord>() {
              final TypicalTypes.patternRecord pa;

              {
                pa = Analyzer.cast(getPatternRecord.apply(p));
              }

              public TypicalTypes.patternRecord apply() {
                return Analyzer.cast(new TypicalTypes.patternRecord(null == pa ? null : pa.pat, n, Boolean.TRUE));
              }
            }.apply());

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2409);
          }
          if (TypicalSupport.match$58(arg$2401)) {
            final Node p = (arg$2401.size() > 0 ? arg$2401.getGeneric(0) : null);

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2413 = Analyzer.cast(getPatternRecord.apply(p));

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2413);
          }
          if (TypicalSupport.match$267(arg$2401)) {
            final Node p = (arg$2401.size() > 0 ? arg$2401.getGeneric(0) : null);

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2417 = Analyzer.cast(getPatternRecord.apply(p));

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2417);
          }
          if (TypicalSupport.match$272(arg$2401)) {
            final Node p1 = (arg$2401.size() > 0 ? arg$2401.getGeneric(0) : null);
            final Node p2 = (arg$2401.size() > 1 ? arg$2401.getGeneric(1) : null);

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2421 = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.PairPattern(getPatternRecord.apply(p1), getPatternRecord.apply(p2)), n, Boolean.FALSE));

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2421);
          }
          if (TypicalSupport.match$66(arg$2401)) {
            final String s = (arg$2401.size() > 0 ? arg$2401.getString(0) : null);

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2425 = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.VariablePattern(s), n, Boolean.FALSE));

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2425);
          }
          if (TypicalSupport.match$6(arg$2401)) {
            final String s = (arg$2401.size() > 0 ? arg$2401.getString(0) : null);
            final Pair<Node> nodList = Analyzer.cast(Primitives.getChildren(arg$2401, 1, arg$2401.size()));

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2433 = Analyzer.cast(new Match<TypicalTypes.patternRecord>() {
              public TypicalTypes.patternRecord apply() {
                final Pair<Node> arg$2427 = Analyzer.cast(nodList);

                if ((null == arg$2427)) {
                  return null;
                }
                if (TypicalSupport.match$314(arg$2427)) {
                  final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2427.get(0), 0, arg$2427.get(0).size()));

                  return Analyzer.cast(new Let<TypicalTypes.patternRecord>() {
                    final Pair<TypicalTypes.patternRecord> pl;

                    {
                      pl = Analyzer.cast(getPatternRecords.apply(nl));
                    }

                    public TypicalTypes.patternRecord apply() {
                      return Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.ConstructorPattern(s, pl), n, Boolean.FALSE));
                    }
                  }.apply());
                }
                if (TypicalSupport.match$323(arg$2427)) {
                  return Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.ConstructorPattern(s, null), n, Boolean.FALSE));
                }
                if (true) {
                  return Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.ConstructorPattern(s, Pair.<TypicalTypes.patternRecord>empty()), n, Boolean.FALSE));
                }
                return null;
              }
            }.apply());

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2433);
          }
          if (TypicalSupport.match$784(arg$2401)) {
            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2437 = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.BotPattern(), n, Boolean.FALSE));

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2437);
          }
          if (TypicalSupport.match$279(arg$2401)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2401, 0, arg$2401.size()));

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2441 = Analyzer.cast(new Let<TypicalTypes.patternRecord>() {
              final Pair<TypicalTypes.patternRecord> pl;
              final TypicalTypes.patternRecord res;

              {
                pl = Analyzer.cast(getPatternRecords.apply(nl));
                res = Analyzer.cast(getPairFromList.apply(pl));
              }

              public TypicalTypes.patternRecord apply() {
                return Analyzer.cast(new TypicalTypes.patternRecord(null == res ? null : res.pat, n, Boolean.FALSE));
              }
            }.apply());

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2441);
          }
          if (TypicalSupport.match$288(arg$2401)) {
            final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2401, 0, arg$2401.size()));

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2445 = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.RecPattern(getPatternRecords.apply(nl)), n, Boolean.FALSE));

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2445);
          }
          if (TypicalSupport.match$299(arg$2401)) {
            final Node lowID = (arg$2401.size() > 0 ? arg$2401.getGeneric(0) : null);
            final Node p = (arg$2401.size() > 1 ? arg$2401.getGeneric(1) : null);

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2449 = Analyzer.cast(new Let<TypicalTypes.patternRecord>() {
              final String s;

              {
                s = Analyzer.cast(getString.apply(lowID));
              }

              public TypicalTypes.patternRecord apply() {
                return Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.RecFieldPattern(s, getPatternRecord.apply(p)), n, Boolean.FALSE));
              }
            }.apply());

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2449);
          }
          if (TypicalSupport.match$2450(arg$2401)) {
            final String s = (arg$2401.size() > 0 ? arg$2401.getString(0) : null);

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2453 = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.ConstantPattern(new TypicalTypes.StringValue(s)), n, Boolean.FALSE));

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2453);
          }
          if (TypicalSupport.match$2454(arg$2401)) {
            final String s = (arg$2401.size() > 0 ? arg$2401.getString(0) : null);

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2457 = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.ConstantPattern(new TypicalTypes.IntValue(Primitives.stoi.apply(s, BigInteger.valueOf(10)))), n, Boolean.FALSE));

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2457);
          }
          if (TypicalSupport.match$2458(arg$2401)) {
            final String s = (arg$2401.size() > 0 ? arg$2401.getString(0) : null);

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2461 = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.ConstantPattern(new TypicalTypes.FloatValue(Primitives.stof.apply(s))), n, Boolean.FALSE));

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2461);
          }
          if (TypicalSupport.match$2462(arg$2401)) {
            final String s = (arg$2401.size() > 0 ? arg$2401.getString(0) : null);

            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2465 = Analyzer.cast(new Let<TypicalTypes.patternRecord>() {
              final Boolean res;

              {
                res = Analyzer.cast(null == Primitives.equal.apply("true", s) ? null : Primitives.equal.apply("true", s) ? Boolean.TRUE : Boolean.FALSE);
              }

              public TypicalTypes.patternRecord apply() {
                return Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.ConstantPattern(new TypicalTypes.BoolValue(res)), n, Boolean.FALSE));
              }
            }.apply());

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2465);
          }
          if (TypicalSupport.match$788(arg$2401)) {
            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2469 = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.WildCardPattern(), n, Boolean.FALSE));

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2469);
          }
          if (true) {
            matching_nodes.add(arg$2401);
            if ((null != arg$2401 && processScopeNodes.contains(arg$2401.getName()))) {
              processScope(arg$2401, getScope);
            }
            checkEnterScope(arg$2401);

            final Object retValue$2472 = Analyzer.cast(null);

            checkExitScope(arg$2401);
            matching_nodes.remove(matching_nodes.size() - 1);
            return Analyzer.cast(retValue$2472);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.patternRecord, Pair<TypicalTypes.patternRecord>> getPairFromList = new Function.F1<TypicalTypes.patternRecord, Pair<TypicalTypes.patternRecord>>() {
    public TypicalTypes.patternRecord apply(final Pair<TypicalTypes.patternRecord> pl) {
      return new Match<TypicalTypes.patternRecord>() {
        public TypicalTypes.patternRecord apply() {
          final Pair<TypicalTypes.patternRecord> arg$2474 = Analyzer.cast(pl);

          if ((null == arg$2474)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2474)) {
            return Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.EmptyPattern(), GNode.create("ListPattern", Pair.<Node>empty()), Boolean.FALSE));
          }
          if ((null != arg$2474 && !((Pair)arg$2474).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2476 = Analyzer.cast(arg$2474);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2476));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2476));

            return Analyzer.cast(new Let<TypicalTypes.patternRecord>() {
              final TypicalTypes.patternRecord pt;

              {
                pt = Analyzer.cast(getPairFromList.apply(xs));
              }

              public TypicalTypes.patternRecord apply() {
                return Analyzer.cast(new Match<TypicalTypes.patternRecord>() {
                  public TypicalTypes.patternRecord apply() {
                    final Node arg$2477 = GNode.cast(null == pt ? null : pt.nod);

                    if ((null == arg$2477)) {
                      return null;
                    }
                    if (TypicalSupport.match$279(arg$2477)) {
                      final Pair<Node> nl = Analyzer.cast(Primitives.getChildren(arg$2477, 0, arg$2477.size()));

                      matching_nodes.add(arg$2477);
                      if ((null != arg$2477 && processScopeNodes.contains(arg$2477.getName()))) {
                        processScope(arg$2477, getScope);
                      }
                      checkEnterScope(arg$2477);

                      final Object retValue$2481 = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.PairPattern(x, pt), GNode.create("ListPattern", TypicalSupport.append$123.apply(new Pair<Node>(null == x ? null : x.nod), nl)), Boolean.FALSE));

                      checkExitScope(arg$2477);
                      matching_nodes.remove(matching_nodes.size() - 1);
                      return Analyzer.cast(retValue$2481);
                    }
                    if (true) {
                      matching_nodes.add(arg$2477);
                      if ((null != arg$2477 && processScopeNodes.contains(arg$2477.getName()))) {
                        processScope(arg$2477, getScope);
                      }
                      checkEnterScope(arg$2477);

                      final Object retValue$2484 = Analyzer.cast(null);

                      checkExitScope(arg$2477);
                      matching_nodes.remove(matching_nodes.size() - 1);
                      return Analyzer.cast(retValue$2484);
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Object, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> checkPatterns = new Function.F2<Object, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
    public Object apply(final Pair<TypicalTypes.patternRecord> preList, final Pair<TypicalTypes.patternRecord> posList) {
      return new Match<Object>() {
        public Object apply() {
          final Pair<TypicalTypes.patternRecord> arg$2487 = Analyzer.cast(posList);

          if ((null == arg$2487)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2487)) {
            return Analyzer.cast(null);
          }
          if ((null != arg$2487 && !((Pair)arg$2487).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2489 = Analyzer.cast(arg$2487);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2489));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2489));

            return Analyzer.cast(new Let<Object>() {
              {
                checkUnused.apply(preList, x);
              }

              public Object apply() {
                return Analyzer.cast(checkPatterns.apply(TypicalSupport.append$2490.apply(preList, new Pair<TypicalTypes.patternRecord>(x)), xs));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord> checkUnused = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord>() {
    public Boolean apply(final Pair<TypicalTypes.patternRecord> preList, final TypicalTypes.patternRecord pat) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.patternRecord> arg$2492 = Analyzer.cast(preList);

          if ((null == arg$2492)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2492)) {
            return Analyzer.cast(Boolean.FALSE);
          }
          if ((null != arg$2492 && !((Pair)arg$2492).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2494 = Analyzer.cast(arg$2492);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2494));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2494));

            return Analyzer.cast(null == isMoreGeneral.apply(x, pat) ? null : isMoreGeneral.apply(x, pat) ? new Let<Boolean>() {
              final Node nod;

              {
                nod = Analyzer.cast(null == pat ? null : pat.nod);
                error("unused pattern", nod);
              }

              public Boolean apply() {
                return Analyzer.cast(Boolean.TRUE);
              }
            }.apply() : checkUnused.apply(xs, pat));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, TypicalTypes.patternRecord, TypicalTypes.patternRecord> isMoreGeneral = new Function.F2<Boolean, TypicalTypes.patternRecord, TypicalTypes.patternRecord>() {
    public Boolean apply(final TypicalTypes.patternRecord p, final TypicalTypes.patternRecord q) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final TypicalTypes.pattern arg$2496 = Analyzer.cast(null == p ? null : p.pat);

          if ((null == arg$2496)) {
            return null;
          }
          if ((null != arg$2496))
                        switch (arg$2496.tag()) {
            case WildCardPattern:
              if (TypicalSupport.match$2497(arg$2496)) {
                return Analyzer.cast(Boolean.TRUE);
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(null == (null == p ? null : p.guarded) ? null : (null == p ? null : p.guarded) ? Boolean.FALSE : null == Primitives.and.apply(null == q ? null : q.guarded, equalPattern.apply(p, q)) ? null : Primitives.and.apply(null == q ? null : q.guarded, equalPattern.apply(p, q)) ? Boolean.TRUE : new Match<Boolean>() {
              public Boolean apply() {
                final TypicalTypes.pattern arg$2498 = Analyzer.cast(null == p ? null : p.pat);

                if ((null == arg$2498)) {
                  return null;
                }
                if ((null != arg$2498))
                                    switch (arg$2498.tag()) {
                  case EmptyPattern:
                    if (TypicalSupport.match$2522(arg$2498)) {
                      return Analyzer.cast(new Match<Boolean>() {
                        public Boolean apply() {
                          final TypicalTypes.pattern arg$2523 = Analyzer.cast(null == q ? null : q.pat);

                          if ((null == arg$2523)) {
                            return null;
                          }
                          if ((null != arg$2523))
                                                        switch (arg$2523.tag()) {
                            case EmptyPattern:
                              if (TypicalSupport.match$2522(arg$2523)) {
                                return Analyzer.cast(Boolean.TRUE);
                              }
                              break;
                            default:
                              break;
                            };
                          if (true) {
                            return Analyzer.cast(Boolean.FALSE);
                          }
                          return null;
                        }
                      }.apply());
                    }
                    break;
                  case RecFieldPattern:
                    if (TypicalSupport.match$2534(arg$2498)) {
                      final String str1 = Analyzer.cast(arg$2498.getTuple().get1());
                      final TypicalTypes.patternRecord p1 = Analyzer.cast(arg$2498.getTuple().get2());

                      return Analyzer.cast(new Match<Boolean>() {
                        public Boolean apply() {
                          final TypicalTypes.pattern arg$2535 = Analyzer.cast(null == q ? null : q.pat);

                          if ((null == arg$2535)) {
                            return null;
                          }
                          if ((null != arg$2535))
                                                        switch (arg$2535.tag()) {
                            case RecFieldPattern:
                              if (TypicalSupport.match$2534(arg$2535)) {
                                final String str2 = Analyzer.cast(arg$2535.getTuple().get1());
                                final TypicalTypes.patternRecord p2 = Analyzer.cast(arg$2535.getTuple().get2());

                                return Analyzer.cast(Primitives.and.apply(Primitives.equal.apply(str1, str2), isMoreGeneral.apply(p1, p2)));
                              }
                              break;
                            default:
                              break;
                            };
                          if (true) {
                            return Analyzer.cast(Boolean.FALSE);
                          }
                          return null;
                        }
                      }.apply());
                    }
                    break;
                  case BotPattern:
                    if (TypicalSupport.match$2500(arg$2498)) {
                      return Analyzer.cast(new Match<Boolean>() {
                        public Boolean apply() {
                          final TypicalTypes.pattern arg$2501 = Analyzer.cast(null == q ? null : q.pat);

                          if ((null == arg$2501)) {
                            return null;
                          }
                          if ((null != arg$2501))
                                                        switch (arg$2501.tag()) {
                            case BotPattern:
                              if (TypicalSupport.match$2500(arg$2501)) {
                                return Analyzer.cast(Boolean.TRUE);
                              }
                              break;
                            default:
                              break;
                            };
                          if (true) {
                            return Analyzer.cast(Boolean.FALSE);
                          }
                          return null;
                        }
                      }.apply());
                    }
                    break;
                  case ConstantPattern:
                    if (TypicalSupport.match$2504(arg$2498)) {
                      final TypicalTypes.value val = Analyzer.cast(arg$2498.getTuple().get1());

                      return Analyzer.cast(new Match<Boolean>() {
                        public Boolean apply() {
                          final TypicalTypes.pattern arg$2505 = Analyzer.cast(null == q ? null : q.pat);

                          if ((null == arg$2505)) {
                            return null;
                          }
                          if ((null != arg$2505))
                                                        switch (arg$2505.tag()) {
                            case ConstantPattern:
                              if (TypicalSupport.match$2504(arg$2505)) {
                                final TypicalTypes.value va = Analyzer.cast(arg$2505.getTuple().get1());

                                return Analyzer.cast(new Match<Boolean>() {
                                  public Boolean apply() {
                                    final Tuple.T2<TypicalTypes.value, TypicalTypes.value> arg$2507 = Analyzer.cast(new Tuple.T2<TypicalTypes.value, TypicalTypes.value>(val, va));

                                    if ((null == arg$2507)) {
                                      return null;
                                    }
                                    if (TypicalSupport.match$2508(arg$2507)) {
                                      final String s1 = Analyzer.cast(arg$2507.get1().getTuple().get1());
                                      final String s2 = Analyzer.cast(arg$2507.get2().getTuple().get1());

                                      return Analyzer.cast(Primitives.equal.apply(s1, s2));
                                    }
                                    if (TypicalSupport.match$2509(arg$2507)) {
                                      final Double f1 = Analyzer.cast(arg$2507.get1().getTuple().get1());
                                      final Double f2 = Analyzer.cast(arg$2507.get2().getTuple().get1());

                                      return Analyzer.cast(Primitives.equal.apply(f1, f2));
                                    }
                                    if (TypicalSupport.match$2510(arg$2507)) {
                                      final BigInteger in1 = Analyzer.cast(arg$2507.get1().getTuple().get1());
                                      final BigInteger in2 = Analyzer.cast(arg$2507.get2().getTuple().get1());

                                      return Analyzer.cast(Primitives.equal.apply(in1, in2));
                                    }
                                    if (TypicalSupport.match$2511(arg$2507)) {
                                      final Boolean b1 = Analyzer.cast(arg$2507.get1().getTuple().get1());
                                      final Boolean b2 = Analyzer.cast(arg$2507.get2().getTuple().get1());

                                      return Analyzer.cast(Primitives.equal.apply(b1, b2));
                                    }
                                    if (true) {
                                      return Analyzer.cast(Boolean.FALSE);
                                    }
                                    return null;
                                  }
                                }.apply());
                              }
                              break;
                            default:
                              break;
                            };
                          if (true) {
                            return Analyzer.cast(Boolean.FALSE);
                          }
                          return null;
                        }
                      }.apply());
                    }
                    break;
                  case VariablePattern:
                    if (TypicalSupport.match$2499(arg$2498)) {
                      return Analyzer.cast(Boolean.TRUE);
                    }
                    break;
                  case ConstructorPattern:
                    if (TypicalSupport.match$2518(arg$2498)) {
                      final String s1 = Analyzer.cast(arg$2498.getTuple().get1());
                      final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2498.getTuple().get2());

                      return Analyzer.cast(new Match<Boolean>() {
                        public Boolean apply() {
                          final TypicalTypes.pattern arg$2519 = Analyzer.cast(null == q ? null : q.pat);

                          if ((null == arg$2519)) {
                            return null;
                          }
                          if ((null != arg$2519))
                                                        switch (arg$2519.tag()) {
                            case ConstructorPattern:
                              if (TypicalSupport.match$2518(arg$2519)) {
                                final String s2 = Analyzer.cast(arg$2519.getTuple().get1());
                                final Pair<TypicalTypes.patternRecord> ql = Analyzer.cast(arg$2519.getTuple().get2());

                                return Analyzer.cast(null == Primitives.not.apply(Primitives.equal.apply(s1, s2)) ? null : Primitives.not.apply(Primitives.equal.apply(s1, s2)) ? Boolean.FALSE : null == Primitives.isBottom.apply(pl) ? null : Primitives.isBottom.apply(pl) ? Boolean.TRUE : null == Primitives.isBottom.apply(ql) ? null : Primitives.isBottom.apply(ql) ? Boolean.FALSE : lessPatternList.apply(pl, ql));
                              }
                              break;
                            default:
                              break;
                            };
                          if (true) {
                            return Analyzer.cast(Boolean.FALSE);
                          }
                          return null;
                        }
                      }.apply());
                    }
                    break;
                  case RecPattern:
                    if (TypicalSupport.match$2530(arg$2498)) {
                      final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2498.getTuple().get1());

                      return Analyzer.cast(new Match<Boolean>() {
                        public Boolean apply() {
                          final TypicalTypes.pattern arg$2531 = Analyzer.cast(null == q ? null : q.pat);

                          if ((null == arg$2531)) {
                            return null;
                          }
                          if ((null != arg$2531))
                                                        switch (arg$2531.tag()) {
                            case RecPattern:
                              if (TypicalSupport.match$2530(arg$2531)) {
                                final Pair<TypicalTypes.patternRecord> ql = Analyzer.cast(arg$2531.getTuple().get1());

                                return Analyzer.cast(checkListInList.apply(ql, pl));
                              }
                              break;
                            default:
                              break;
                            };
                          if (true) {
                            return Analyzer.cast(Boolean.FALSE);
                          }
                          return null;
                        }
                      }.apply());
                    }
                    break;
                  case PairPattern:
                    if (TypicalSupport.match$2526(arg$2498)) {
                      final TypicalTypes.patternRecord hd1 = Analyzer.cast(arg$2498.getTuple().get1());
                      final TypicalTypes.patternRecord tl1 = Analyzer.cast(arg$2498.getTuple().get2());

                      return Analyzer.cast(new Match<Boolean>() {
                        public Boolean apply() {
                          final TypicalTypes.pattern arg$2527 = Analyzer.cast(null == q ? null : q.pat);

                          if ((null == arg$2527)) {
                            return null;
                          }
                          if ((null != arg$2527))
                                                        switch (arg$2527.tag()) {
                            case PairPattern:
                              if (TypicalSupport.match$2526(arg$2527)) {
                                final TypicalTypes.patternRecord hd2 = Analyzer.cast(arg$2527.getTuple().get1());
                                final TypicalTypes.patternRecord tl2 = Analyzer.cast(arg$2527.getTuple().get2());

                                return Analyzer.cast(Primitives.and.apply(isMoreGeneral.apply(hd1, hd2), isMoreGeneral.apply(tl1, tl2)));
                              }
                              break;
                            default:
                              break;
                            };
                          if (true) {
                            return Analyzer.cast(Boolean.FALSE);
                          }
                          return null;
                        }
                      }.apply());
                    }
                    break;
                  case TupPattern:
                    if (TypicalSupport.match$2514(arg$2498)) {
                      final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2498.getTuple().get1());

                      return Analyzer.cast(new Match<Boolean>() {
                        public Boolean apply() {
                          final TypicalTypes.pattern arg$2515 = Analyzer.cast(null == q ? null : q.pat);

                          if ((null == arg$2515)) {
                            return null;
                          }
                          if ((null != arg$2515))
                                                        switch (arg$2515.tag()) {
                            case TupPattern:
                              if (TypicalSupport.match$2514(arg$2515)) {
                                final Pair<TypicalTypes.patternRecord> ql = Analyzer.cast(arg$2515.getTuple().get1());

                                return Analyzer.cast(lessPatternList.apply(pl, ql));
                              }
                              break;
                            default:
                              break;
                            };
                          if (true) {
                            return Analyzer.cast(Boolean.FALSE);
                          }
                          return null;
                        }
                      }.apply());
                    }
                    break;
                  default:
                    break;
                  };
                if (true) {
                  return Analyzer.cast(Boolean.FALSE);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> lessPatternList = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
    public Boolean apply(final Pair<TypicalTypes.patternRecord> pl, final Pair<TypicalTypes.patternRecord> ql) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.patternRecord> arg$2540 = Analyzer.cast(pl);

          if ((null == arg$2540)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2540)) {
            return Analyzer.cast(Boolean.TRUE);
          }
          if ((null != arg$2540 && !((Pair)arg$2540).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2542 = Analyzer.cast(arg$2540);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2542));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2542));

            return Analyzer.cast(null == isMoreGeneral.apply(x, TypicalSupport.head$2543.apply(ql)) ? null : isMoreGeneral.apply(x, TypicalSupport.head$2543.apply(ql)) ? lessPatternList.apply(xs, TypicalSupport.tail$2544.apply(ql)) : Boolean.FALSE);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, TypicalTypes.patternRecord, TypicalTypes.patternRecord> equalPattern = new Function.F2<Boolean, TypicalTypes.patternRecord, TypicalTypes.patternRecord>() {
    public Boolean apply(final TypicalTypes.patternRecord p, final TypicalTypes.patternRecord q) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Tuple.T2<TypicalTypes.pattern, TypicalTypes.pattern> arg$2546 = Analyzer.cast(new Tuple.T2<TypicalTypes.pattern, TypicalTypes.pattern>(null == p ? null : p.pat, null == q ? null : q.pat));

          if ((null == arg$2546)) {
            return null;
          }
          if (TypicalSupport.match$2547(arg$2546)) {
            return Analyzer.cast(Boolean.TRUE);
          }
          if (TypicalSupport.match$2548(arg$2546)) {
            return Analyzer.cast(Boolean.TRUE);
          }
          if (TypicalSupport.match$2549(arg$2546)) {
            final TypicalTypes.value val1 = Analyzer.cast(arg$2546.get1().getTuple().get1());
            final TypicalTypes.value val2 = Analyzer.cast(arg$2546.get2().getTuple().get1());

            return Analyzer.cast(new Match<Boolean>() {
              public Boolean apply() {
                final Tuple.T2<TypicalTypes.value, TypicalTypes.value> arg$2550 = Analyzer.cast(new Tuple.T2<TypicalTypes.value, TypicalTypes.value>(val1, val2));

                if ((null == arg$2550)) {
                  return null;
                }
                if (TypicalSupport.match$2508(arg$2550)) {
                  final String str1 = Analyzer.cast(arg$2550.get1().getTuple().get1());
                  final String str2 = Analyzer.cast(arg$2550.get2().getTuple().get1());

                  return Analyzer.cast(Primitives.equal.apply(str1, str2));
                }
                if (TypicalSupport.match$2509(arg$2550)) {
                  final Double f1 = Analyzer.cast(arg$2550.get1().getTuple().get1());
                  final Double f2 = Analyzer.cast(arg$2550.get2().getTuple().get1());

                  return Analyzer.cast(Primitives.equal.apply(f1, f2));
                }
                if (TypicalSupport.match$2510(arg$2550)) {
                  final BigInteger in1 = Analyzer.cast(arg$2550.get1().getTuple().get1());
                  final BigInteger in2 = Analyzer.cast(arg$2550.get2().getTuple().get1());

                  return Analyzer.cast(Primitives.equal.apply(in1, in2));
                }
                if (TypicalSupport.match$2511(arg$2550)) {
                  final Boolean b1 = Analyzer.cast(arg$2550.get1().getTuple().get1());
                  final Boolean b2 = Analyzer.cast(arg$2550.get2().getTuple().get1());

                  return Analyzer.cast(Primitives.equal.apply(b1, b2));
                }
                if (true) {
                  return Analyzer.cast(Boolean.FALSE);
                }
                return null;
              }
            }.apply());
          }
          if (TypicalSupport.match$2556(arg$2546)) {
            final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2546.get1().getTuple().get1());
            final Pair<TypicalTypes.patternRecord> ql = Analyzer.cast(arg$2546.get2().getTuple().get1());

            return Analyzer.cast(equalPatternList.apply(pl, ql));
          }
          if (TypicalSupport.match$2557(arg$2546)) {
            final String s1 = Analyzer.cast(arg$2546.get1().getTuple().get1());
            final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2546.get1().getTuple().get2());
            final String s2 = Analyzer.cast(arg$2546.get2().getTuple().get1());
            final Pair<TypicalTypes.patternRecord> ql = Analyzer.cast(arg$2546.get2().getTuple().get2());

            return Analyzer.cast(null == Primitives.not.apply(Primitives.equal.apply(s1, s2)) ? null : Primitives.not.apply(Primitives.equal.apply(s1, s2)) ? Boolean.FALSE : null == Primitives.and.apply(Primitives.isBottom.apply(pl), Primitives.isBottom.apply(ql)) ? null : Primitives.and.apply(Primitives.isBottom.apply(pl), Primitives.isBottom.apply(ql)) ? Boolean.TRUE : null == Primitives.or.apply(Primitives.isBottom.apply(pl), Primitives.isBottom.apply(ql)) ? null : Primitives.or.apply(Primitives.isBottom.apply(pl), Primitives.isBottom.apply(ql)) ? Boolean.FALSE : equalPatternList.apply(pl, ql));
          }
          if (true) {
            return Analyzer.cast(Boolean.FALSE);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> equalPatternList = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
    public Boolean apply(final Pair<TypicalTypes.patternRecord> pl, final Pair<TypicalTypes.patternRecord> ql) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.patternRecord> arg$2559 = Analyzer.cast(pl);

          if ((null == arg$2559)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2559)) {
            return Analyzer.cast(Boolean.TRUE);
          }
          if ((null != arg$2559 && !((Pair)arg$2559).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2561 = Analyzer.cast(arg$2559);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2561));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2561));

            return Analyzer.cast(null == equalPattern.apply(x, TypicalSupport.head$2543.apply(ql)) ? null : equalPattern.apply(x, TypicalSupport.head$2543.apply(ql)) ? equalPatternList.apply(xs, TypicalSupport.tail$2544.apply(ql)) : Boolean.FALSE);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> checkListInList = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
    public Boolean apply(final Pair<TypicalTypes.patternRecord> pl, final Pair<TypicalTypes.patternRecord> ql) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.patternRecord> arg$2563 = Analyzer.cast(ql);

          if ((null == arg$2563)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2563)) {
            return Analyzer.cast(Boolean.TRUE);
          }
          if ((null != arg$2563 && !((Pair)arg$2563).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2565 = Analyzer.cast(arg$2563);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2565));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2565));

            return Analyzer.cast(null == checkInList.apply(pl, x) ? null : checkInList.apply(pl, x) ? checkListInList.apply(pl, xs) : Boolean.FALSE);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord> checkInList = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord>() {
    public Boolean apply(final Pair<TypicalTypes.patternRecord> pl, final TypicalTypes.patternRecord q) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.patternRecord> arg$2567 = Analyzer.cast(pl);

          if ((null == arg$2567)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2567)) {
            return Analyzer.cast(Boolean.FALSE);
          }
          if ((null != arg$2567 && !((Pair)arg$2567).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2569 = Analyzer.cast(arg$2567);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2569));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2569));

            return Analyzer.cast(null == isMoreGeneral.apply(q, x) ? null : isMoreGeneral.apply(q, x) ? Boolean.TRUE : checkInList.apply(xs, q));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Object, Pair<Node>> checkIrredundant = new Function.F1<Object, Pair<Node>>() {
    public Object apply(final Pair<Node> nl) {
      return new Let<Object>() {
        final Pair<Node> pl;

        {
          pl = Analyzer.cast(getPatternNodes.apply(nl));
        }

        public Object apply() {
          return Analyzer.cast(null == Primitives.greaterInt.apply(Primitives.length.apply(pl), BigInteger.valueOf(1)) || !Primitives.greaterInt.apply(Primitives.length.apply(pl), BigInteger.valueOf(1)) ? null : new Let<Object>() {
            final Pair<TypicalTypes.patternRecord> patList;

            {
              patList = Analyzer.cast(getPatternRecords.apply(pl));
            }

            public Object apply() {
              return Analyzer.cast(checkPatterns.apply(new Pair<TypicalTypes.patternRecord>(TypicalSupport.head$2543.apply(patList)), TypicalSupport.tail$2544.apply(patList)));
            }
          }.apply());
        }
      }.apply();
    }
  };

  final Function.F1<Object, Pair<Node>> checkReduceMatching = new Function.F1<Object, Pair<Node>>() {
    public Object apply(final Pair<Node> nl) {
      return new Let<Object>() {
        final Pair<Node> pl;

        {
          pl = Analyzer.cast(getPatternNodes.apply(nl));
        }

        public Object apply() {
          return Analyzer.cast(null == Primitives.greaterInt.apply(Primitives.length.apply(pl), BigInteger.valueOf(1)) || !Primitives.greaterInt.apply(Primitives.length.apply(pl), BigInteger.valueOf(1)) ? null : new Let<Object>() {
            final Pair<TypicalTypes.patternRecord> patList;

            {
              patList = Analyzer.cast(getPatternRecords.apply(pl));
            }

            public Object apply() {
              return Analyzer.cast(checkReducePatterns.apply(new Pair<TypicalTypes.patternRecord>(TypicalSupport.head$2543.apply(patList)), TypicalSupport.tail$2544.apply(patList)));
            }
          }.apply());
        }
      }.apply();
    }
  };

  final Function.F2<Object, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> checkReducePatterns = new Function.F2<Object, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
    public Object apply(final Pair<TypicalTypes.patternRecord> preList, final Pair<TypicalTypes.patternRecord> posList) {
      return new Match<Object>() {
        public Object apply() {
          final Pair<TypicalTypes.patternRecord> arg$2571 = Analyzer.cast(posList);

          if ((null == arg$2571)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2571)) {
            return Analyzer.cast(null);
          }
          if ((null != arg$2571 && !((Pair)arg$2571).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2573 = Analyzer.cast(arg$2571);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2573));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2573));

            return Analyzer.cast(new Let<Object>() {
              {
                checkReduceUnused.apply(preList, x);
              }

              public Object apply() {
                return Analyzer.cast(checkReducePatterns.apply(TypicalSupport.append$2490.apply(preList, new Pair<TypicalTypes.patternRecord>(x)), xs));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Object, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord> checkReduceUnused = new Function.F2<Object, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord>() {
    public Object apply(final Pair<TypicalTypes.patternRecord> preList, final TypicalTypes.patternRecord pat) {
      return new Match<Object>() {
        public Object apply() {
          final Pair<TypicalTypes.patternRecord> arg$2575 = Analyzer.cast(preList);

          if ((null == arg$2575)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2575)) {
            return Analyzer.cast(null);
          }
          if ((null != arg$2575 && !((Pair)arg$2575).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2577 = Analyzer.cast(arg$2575);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2577));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2577));

            return Analyzer.cast(null == containPattern.apply(x, pat) ? null : containPattern.apply(x, pat) ? new Let<Object>() {
              final Node nod;

              {
                nod = Analyzer.cast(null == pat ? null : pat.nod);
              }

              public Object apply() {
                return Analyzer.cast(error("unused pattern", nod));
              }
            }.apply() : checkReduceUnused.apply(xs, pat));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, TypicalTypes.patternRecord, TypicalTypes.patternRecord> containPattern = new Function.F2<Boolean, TypicalTypes.patternRecord, TypicalTypes.patternRecord>() {
    public Boolean apply(final TypicalTypes.patternRecord p, final TypicalTypes.patternRecord q) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final TypicalTypes.pattern arg$2579 = Analyzer.cast(null == p ? null : p.pat);

          if ((null == arg$2579)) {
            return null;
          }
          if ((null != arg$2579))
                        switch (arg$2579.tag()) {
            case EmptyPattern:
              if (TypicalSupport.match$2522(arg$2579)) {
                return Analyzer.cast(new Let<Boolean>() {
                  final Pair<TypicalTypes.patternRecord> pl;

                  {
                    pl = Analyzer.cast(getListFromPair.apply(p));
                  }

                  public Boolean apply() {
                    return Analyzer.cast(new Match<Boolean>() {
                      public Boolean apply() {
                        final TypicalTypes.pattern arg$2582 = Analyzer.cast(null == q ? null : q.pat);

                        if ((null == arg$2582)) {
                          return null;
                        }
                        if ((null != arg$2582))
                                                    switch (arg$2582.tag()) {
                          case EmptyPattern:
                            if (TypicalSupport.match$2522(arg$2582)) {
                              return Analyzer.cast(new Let<Boolean>() {
                                final Pair<TypicalTypes.patternRecord> ql;

                                {
                                  ql = Analyzer.cast(getListFromPair.apply(q));
                                }

                                public Boolean apply() {
                                  return Analyzer.cast(null == Primitives.greaterInt.apply(Primitives.length.apply(pl), Primitives.length.apply(ql)) ? null : Primitives.greaterInt.apply(Primitives.length.apply(pl), Primitives.length.apply(ql)) ? Boolean.FALSE : checkContain.apply(ql, pl));
                                }
                              }.apply());
                            }
                            break;
                          case PairPattern:
                            if (TypicalSupport.match$2526(arg$2582)) {
                              return Analyzer.cast(new Let<Boolean>() {
                                final Pair<TypicalTypes.patternRecord> ql;

                                {
                                  ql = Analyzer.cast(getListFromPair.apply(q));
                                }

                                public Boolean apply() {
                                  return Analyzer.cast(null == Primitives.greaterInt.apply(Primitives.length.apply(pl), Primitives.length.apply(ql)) ? null : Primitives.greaterInt.apply(Primitives.length.apply(pl), Primitives.length.apply(ql)) ? Boolean.FALSE : checkContain.apply(ql, pl));
                                }
                              }.apply());
                            }
                            break;
                          default:
                            break;
                          };
                        if (true) {
                          return Analyzer.cast(Boolean.FALSE);
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply());
              }
              break;
            case WildCardPattern:
              if (TypicalSupport.match$2497(arg$2579)) {
                return Analyzer.cast(Boolean.TRUE);
              }
              break;
            case PairPattern:
              if (TypicalSupport.match$2526(arg$2579)) {
                return Analyzer.cast(new Let<Boolean>() {
                  final Pair<TypicalTypes.patternRecord> pl;

                  {
                    pl = Analyzer.cast(getListFromPair.apply(p));
                  }

                  public Boolean apply() {
                    return Analyzer.cast(new Match<Boolean>() {
                      public Boolean apply() {
                        final TypicalTypes.pattern arg$2587 = Analyzer.cast(null == q ? null : q.pat);

                        if ((null == arg$2587)) {
                          return null;
                        }
                        if ((null != arg$2587))
                                                    switch (arg$2587.tag()) {
                          case EmptyPattern:
                            if (TypicalSupport.match$2522(arg$2587)) {
                              return Analyzer.cast(new Let<Boolean>() {
                                final Pair<TypicalTypes.patternRecord> ql;

                                {
                                  ql = Analyzer.cast(getListFromPair.apply(q));
                                }

                                public Boolean apply() {
                                  return Analyzer.cast(null == Primitives.greaterInt.apply(Primitives.length.apply(pl), Primitives.length.apply(ql)) ? null : Primitives.greaterInt.apply(Primitives.length.apply(pl), Primitives.length.apply(ql)) ? Boolean.FALSE : checkContain.apply(ql, pl));
                                }
                              }.apply());
                            }
                            break;
                          case PairPattern:
                            if (TypicalSupport.match$2526(arg$2587)) {
                              return Analyzer.cast(new Let<Boolean>() {
                                final Pair<TypicalTypes.patternRecord> ql;

                                {
                                  ql = Analyzer.cast(getListFromPair.apply(q));
                                }

                                public Boolean apply() {
                                  return Analyzer.cast(null == Primitives.greaterInt.apply(Primitives.length.apply(pl), Primitives.length.apply(ql)) ? null : Primitives.greaterInt.apply(Primitives.length.apply(pl), Primitives.length.apply(ql)) ? Boolean.FALSE : checkContain.apply(ql, pl));
                                }
                              }.apply());
                            }
                            break;
                          default:
                            break;
                          };
                        if (true) {
                          return Analyzer.cast(Boolean.FALSE);
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply());
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(Boolean.FALSE);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord> getListFromPair = new Function.F1<Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord>() {
    public Pair<TypicalTypes.patternRecord> apply(final TypicalTypes.patternRecord p) {
      return new Match<Pair<TypicalTypes.patternRecord>>() {
        public Pair<TypicalTypes.patternRecord> apply() {
          final TypicalTypes.pattern arg$2592 = Analyzer.cast(null == p ? null : p.pat);

          if ((null == arg$2592)) {
            return null;
          }
          if ((null != arg$2592))
                        switch (arg$2592.tag()) {
            case EmptyPattern:
              if (TypicalSupport.match$2522(arg$2592)) {
                return Analyzer.cast(Pair.<TypicalTypes.patternRecord>empty());
              }
              break;
            case PairPattern:
              if (TypicalSupport.match$2526(arg$2592)) {
                final TypicalTypes.patternRecord hd = Analyzer.cast(arg$2592.getTuple().get1());
                final TypicalTypes.patternRecord tl = Analyzer.cast(arg$2592.getTuple().get2());

                return Analyzer.cast(TypicalSupport.append$2490.apply(new Pair<TypicalTypes.patternRecord>(hd), getListFromPair.apply(tl)));
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(null);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> checkContain = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
    public Boolean apply(final Pair<TypicalTypes.patternRecord> ql, final Pair<TypicalTypes.patternRecord> pl) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.patternRecord> arg$2596 = Analyzer.cast(pl);

          if ((null == arg$2596)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2596)) {
            return Analyzer.cast(Boolean.TRUE);
          }
          if ((null != arg$2596 && !((Pair)arg$2596).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2598 = Analyzer.cast(arg$2596);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2598));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2598));

            return Analyzer.cast(new Let<Boolean>() {
              final Pair<TypicalTypes.patternRecord> rem;

              {
                rem = Analyzer.cast(checkRemovePattern.apply(ql, x, Pair.<TypicalTypes.patternRecord>empty()));
              }

              public Boolean apply() {
                return Analyzer.cast(null == Primitives.isBottom.apply(rem) ? null : Primitives.isBottom.apply(rem) ? Boolean.FALSE : checkContain.apply(rem, xs));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F3<Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord, Pair<TypicalTypes.patternRecord>> checkRemovePattern = new Function.F3<Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord, Pair<TypicalTypes.patternRecord>>() {
    public Pair<TypicalTypes.patternRecord> apply(final Pair<TypicalTypes.patternRecord> ql, final TypicalTypes.patternRecord pat, final Pair<TypicalTypes.patternRecord> rem) {
      return new Match<Pair<TypicalTypes.patternRecord>>() {
        public Pair<TypicalTypes.patternRecord> apply() {
          final Pair<TypicalTypes.patternRecord> arg$2600 = Analyzer.cast(ql);

          if ((null == arg$2600)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2600)) {
            return Analyzer.cast(null);
          }
          if ((null != arg$2600 && !((Pair)arg$2600).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2602 = Analyzer.cast(arg$2600);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2602));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2602));

            return Analyzer.cast(null == isMoreGeneral.apply(x, pat) ? null : isMoreGeneral.apply(x, pat) ? TypicalSupport.append$2490.apply(rem, xs) : checkRemovePattern.apply(xs, pat, TypicalSupport.append$2490.apply(rem, new Pair<TypicalTypes.patternRecord>(x))));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord> checkUsed = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord>() {
    public Boolean apply(final Pair<TypicalTypes.patternRecord> preList, final TypicalTypes.patternRecord pat) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.patternRecord> arg$2604 = Analyzer.cast(preList);

          if ((null == arg$2604)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2604)) {
            return Analyzer.cast(Boolean.TRUE);
          }
          if ((null != arg$2604 && !((Pair)arg$2604).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2606 = Analyzer.cast(arg$2604);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2606));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2606));

            return Analyzer.cast(null == isMoreGeneral.apply(x, pat) ? null : isMoreGeneral.apply(x, pat) ? Boolean.FALSE : checkUsed.apply(xs, pat));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F3<Pair<Pair<TypicalTypes.patternRecord>>, Pair<Pair<TypicalTypes.patternRecord>>, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> buildMatrix = new Function.F3<Pair<Pair<TypicalTypes.patternRecord>>, Pair<Pair<TypicalTypes.patternRecord>>, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
    public Pair<Pair<TypicalTypes.patternRecord>> apply(final Pair<Pair<TypicalTypes.patternRecord>> matrix, final Pair<TypicalTypes.patternRecord> preList, final Pair<TypicalTypes.patternRecord> postList) {
      return new Match<Pair<Pair<TypicalTypes.patternRecord>>>() {
        public Pair<Pair<TypicalTypes.patternRecord>> apply() {
          final Pair<TypicalTypes.patternRecord> arg$2608 = Analyzer.cast(postList);

          if ((null == arg$2608)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2608)) {
            return Analyzer.cast(matrix);
          }
          if ((null != arg$2608 && !((Pair)arg$2608).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2610 = Analyzer.cast(arg$2608);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2610));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2610));

            return Analyzer.cast(null == (null == x ? null : x.guarded) ? null : (null == x ? null : x.guarded) ? buildMatrix.apply(matrix, TypicalSupport.append$2490.apply(preList, new Pair<TypicalTypes.patternRecord>(x)), xs) : null == Primitives.not.apply(checkUsed.apply(preList, x)) ? null : Primitives.not.apply(checkUsed.apply(preList, x)) ? buildMatrix.apply(matrix, preList, xs) : new Let<Pair<Pair<TypicalTypes.patternRecord>>>() {
              final Pair<TypicalTypes.patternRecord> row;

              {
                row = Analyzer.cast(new Pair<TypicalTypes.patternRecord>(x));
              }

              public Pair<Pair<TypicalTypes.patternRecord>> apply() {
                return Analyzer.cast(buildMatrix.apply(TypicalSupport.append$2611.apply(matrix, new Pair<Pair<TypicalTypes.patternRecord>>(row)), TypicalSupport.append$2490.apply(preList, new Pair<TypicalTypes.patternRecord>(x)), xs));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<TypicalTypes.constr>, Pair<TypicalTypes.constr>, Pair<Pair<TypicalTypes.patternRecord>>> getSigma = new Function.F2<Pair<TypicalTypes.constr>, Pair<TypicalTypes.constr>, Pair<Pair<TypicalTypes.patternRecord>>>() {
    public Pair<TypicalTypes.constr> apply(final Pair<TypicalTypes.constr> sigma, final Pair<Pair<TypicalTypes.patternRecord>> matrix) {
      return new Match<Pair<TypicalTypes.constr>>() {
        public Pair<TypicalTypes.constr> apply() {
          final Pair<Pair<TypicalTypes.patternRecord>> arg$2613 = Analyzer.cast(matrix);

          if ((null == arg$2613)) {
            return null;
          }
          if (TypicalSupport.match$2614(arg$2613)) {
            return Analyzer.cast(sigma);
          }
          if ((null != arg$2613 && !((Pair)arg$2613).isEmpty())) {
            final Pair<Pair<TypicalTypes.patternRecord>> list$2615 = Analyzer.cast(arg$2613);
            final Pair<TypicalTypes.patternRecord> x = Analyzer.cast(Primitives.wrapHead(list$2615));
            final Pair<Pair<TypicalTypes.patternRecord>> xs = Analyzer.cast(Primitives.wrapTail(list$2615));

            return Analyzer.cast(new Let<Pair<TypicalTypes.constr>>() {
              final TypicalTypes.patternRecord patRec;
              final TypicalTypes.constr constructor;

              {
                patRec = Analyzer.cast(TypicalSupport.head$2543.apply(x));
                constructor = Analyzer.cast(getConstructor.apply(patRec));
              }

              public Pair<TypicalTypes.constr> apply() {
                return Analyzer.cast(getSigma.apply(TypicalSupport.append$2616.apply(sigma, new Pair<TypicalTypes.constr>(constructor)), xs));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.constr, TypicalTypes.patternRecord> getConstructor = new Function.F1<TypicalTypes.constr, TypicalTypes.patternRecord>() {
    public TypicalTypes.constr apply(final TypicalTypes.patternRecord patRec) {
      return new Match<TypicalTypes.constr>() {
        public TypicalTypes.constr apply() {
          final TypicalTypes.pattern arg$2618 = Analyzer.cast(null == patRec ? null : patRec.pat);

          if ((null == arg$2618)) {
            return null;
          }
          if ((null != arg$2618))
                        switch (arg$2618.tag()) {
            case EmptyPattern:
              if (TypicalSupport.match$2522(arg$2618)) {
                return Analyzer.cast(new TypicalTypes.EmptyConstr());
              }
              break;
            case RecFieldPattern:
              if (TypicalSupport.match$2534(arg$2618)) {
                final TypicalTypes.patternRecord p = Analyzer.cast(arg$2618.getTuple().get2());

                return Analyzer.cast(getConstructor.apply(p));
              }
              break;
            case BotPattern:
              if (TypicalSupport.match$2500(arg$2618)) {
                return Analyzer.cast(new TypicalTypes.BotConstr());
              }
              break;
            case WildCardPattern:
              if (TypicalSupport.match$2497(arg$2618)) {
                return Analyzer.cast(new TypicalTypes.WildConstr());
              }
              break;
            case ConstantPattern:
              if (TypicalSupport.match$2504(arg$2618)) {
                final TypicalTypes.value val = Analyzer.cast(arg$2618.getTuple().get1());

                return Analyzer.cast(new TypicalTypes.Const(val));
              }
              break;
            case VariablePattern:
              if (TypicalSupport.match$2499(arg$2618)) {
                return Analyzer.cast(new TypicalTypes.WildConstr());
              }
              break;
            case ConstructorPattern:
              if (TypicalSupport.match$2518(arg$2618)) {
                final String s = Analyzer.cast(arg$2618.getTuple().get1());
                final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2618.getTuple().get2());

                return Analyzer.cast(null == Primitives.isBottom.apply(pl) ? null : Primitives.isBottom.apply(pl) ? new TypicalTypes.CConstr(s, getConstructorSize.apply(s)) : new TypicalTypes.CConstr(s, Primitives.length.apply(pl)));
              }
              break;
            case RecPattern:
              if (TypicalSupport.match$2530(arg$2618)) {
                return Analyzer.cast(new Let<TypicalTypes.constr>() {
                  final TypicalTypes.raw_type<?> ty;

                  {
                    ty = Analyzer.cast(Primitives.getAnnotation.apply(null == patRec ? null : patRec.nod, "__type"));
                  }

                  public TypicalTypes.constr apply() {
                    return Analyzer.cast(new Match<TypicalTypes.constr>() {
                      public TypicalTypes.constr apply() {
                        final TypicalTypes.raw_type<?> arg$2625 = Analyzer.cast(ty);

                        if ((null == arg$2625)) {
                          return null;
                        }
                        if ((null != arg$2625))
                                                    switch (arg$2625.tag()) {
                          case RecordT:
                            if (TypicalSupport.match$106(arg$2625)) {
                              final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$2625.getTuple().get1());

                              return Analyzer.cast(new TypicalTypes.RecordConstr(Primitives.length.apply(tl)));
                            }
                            break;
                          default:
                            break;
                          };
                        if (true) {
                          return Analyzer.cast(null);
                        }
                        return null;
                      }
                    }.apply());
                  }
                }.apply());
              }
              break;
            case PairPattern:
              if (TypicalSupport.match$2526(arg$2618)) {
                return Analyzer.cast(new TypicalTypes.PairConstr());
              }
              break;
            case TupPattern:
              if (TypicalSupport.match$2514(arg$2618)) {
                final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2618.getTuple().get1());

                return Analyzer.cast(new TypicalTypes.TupleConstr(Primitives.length.apply(pl)));
              }
              break;
            default:
              break;
            };
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Boolean, Pair<Node>> checkExhaustive = new Function.F1<Boolean, Pair<Node>>() {
    public Boolean apply(final Pair<Node> nl) {
      return new Let<Boolean>() {
        final Node nod;
        final Pair<Node> pl;
        final Pair<TypicalTypes.patternRecord> patList;
        final Pair<Pair<TypicalTypes.patternRecord>> matrix;

        {
          nod = Analyzer.cast(TypicalSupport.head$245.apply(nl));
          pl = Analyzer.cast(getPatternNodes.apply(nl));
          patList = Analyzer.cast(getPatternRecords.apply(pl));
          matrix = Analyzer.cast(buildMatrix.apply(Pair.<Pair<TypicalTypes.patternRecord>>empty(), Pair.<TypicalTypes.patternRecord>empty(), patList));
        }

        public Boolean apply() {
          return Analyzer.cast(null == Primitives.equal.apply(Primitives.length.apply(matrix), BigInteger.valueOf(0)) ? null : Primitives.equal.apply(Primitives.length.apply(matrix), BigInteger.valueOf(0)) ? new Let<Boolean>() {
            {
              warning("all patterns are guarded", nod);
            }

            public Boolean apply() {
              return Analyzer.cast(Boolean.TRUE);
            }
          }.apply() : null == quickPartialCheck.apply(matrix) ? null : quickPartialCheck.apply(matrix) ? Boolean.TRUE : new Let<Boolean>() {
            final TypicalTypes.result res;

            {
              res = Analyzer.cast(checkPartial.apply(matrix, BigInteger.valueOf(1)));
            }

            public Boolean apply() {
              return Analyzer.cast(new Match<Boolean>() {
                public Boolean apply() {
                  final TypicalTypes.result arg$2633 = Analyzer.cast(res);

                  if ((null == arg$2633)) {
                    return null;
                  }
                  if ((null != arg$2633))
                                        switch (arg$2633.tag()) {
                    case Some:
                      if (TypicalSupport.match$2635(arg$2633)) {
                        final Pair<TypicalTypes.pattern> p = Analyzer.cast(arg$2633.getTuple().get1());

                        return Analyzer.cast(new Let<Boolean>() {
                          final String mes;

                          {
                            mes = Analyzer.cast(showPatterns.apply(p));
                            error(Primitives.concat.apply(Primitives.concat.apply("non-exhaustive match, ", "an example of an unmatched value is: "), mes), nod);
                          }

                          public Boolean apply() {
                            return Analyzer.cast(Boolean.FALSE);
                          }
                        }.apply());
                      }
                      break;
                    case None:
                      if (TypicalSupport.match$2634(arg$2633)) {
                        return Analyzer.cast(Boolean.TRUE);
                      }
                      break;
                    default:
                      break;
                    };
                  return null;
                }
              }.apply());
            }
          }.apply());
        }
      }.apply();
    }
  };

  final Function.F2<TypicalTypes.result, Pair<Pair<TypicalTypes.patternRecord>>, BigInteger> checkPartial = new Function.F2<TypicalTypes.result, Pair<Pair<TypicalTypes.patternRecord>>, BigInteger>() {
    public TypicalTypes.result apply(final Pair<Pair<TypicalTypes.patternRecord>> matrix, final BigInteger n) {
      return (null == Primitives.equal.apply(BigInteger.valueOf(0), n) ? null : Primitives.equal.apply(BigInteger.valueOf(0), n) ? (null == Primitives.greaterInt.apply(Primitives.length.apply(matrix), BigInteger.valueOf(0)) ? null : Primitives.greaterInt.apply(Primitives.length.apply(matrix), BigInteger.valueOf(0)) ? new TypicalTypes.None() : new TypicalTypes.Some(Pair.<TypicalTypes.pattern>empty())) : new Let<TypicalTypes.result>() {
        final Pair<TypicalTypes.constr> sigma;

        {
          sigma = Analyzer.cast(getSigma.apply(Pair.<TypicalTypes.constr>empty(), matrix));
        }

        public TypicalTypes.result apply() {
          return Analyzer.cast(null == completeSigma.apply(sigma) ? null : completeSigma.apply(sigma) ? checkSubPartials.apply(matrix, sigma) : new Let<TypicalTypes.result>() {
            final Pair<Pair<TypicalTypes.patternRecord>> dMatrix;
            final TypicalTypes.result res;

            {
              dMatrix = Analyzer.cast(buildDMatrix.apply(matrix));
              res = Analyzer.cast(checkPartial.apply(dMatrix, Primitives.subtractInt.apply(n, BigInteger.valueOf(1))));
            }

            public TypicalTypes.result apply() {
              return Analyzer.cast(new Match<TypicalTypes.result>() {
                public TypicalTypes.result apply() {
                  final TypicalTypes.result arg$2637 = Analyzer.cast(res);

                  if ((null == arg$2637)) {
                    return null;
                  }
                  if ((null != arg$2637))
                                        switch (arg$2637.tag()) {
                    case Some:
                      if (TypicalSupport.match$2635(arg$2637)) {
                        final Pair<TypicalTypes.pattern> pl = Analyzer.cast(arg$2637.getTuple().get1());

                        return Analyzer.cast(null == emptySigma.apply(sigma) ? null : emptySigma.apply(sigma) ? new TypicalTypes.Some(TypicalSupport.append$2640.apply(new Pair<TypicalTypes.pattern>(new TypicalTypes.WildCardPattern()), pl)) : new Let<TypicalTypes.result>() {
                          final TypicalTypes.pattern p;

                          {
                            p = Analyzer.cast(findUnmatchedPattern.apply(sigma));
                          }

                          public TypicalTypes.result apply() {
                            return Analyzer.cast(new TypicalTypes.Some(TypicalSupport.append$2640.apply(new Pair<TypicalTypes.pattern>(p), pl)));
                          }
                        }.apply());
                      }
                      break;
                    case None:
                      if (TypicalSupport.match$2634(arg$2637)) {
                        return Analyzer.cast(new TypicalTypes.None());
                      }
                      break;
                    default:
                      break;
                    };
                  return null;
                }
              }.apply());
            }
          }.apply());
        }
      }.apply());
    }
  };

  final Function.F2<TypicalTypes.result, Pair<Pair<TypicalTypes.patternRecord>>, Pair<TypicalTypes.constr>> checkSubPartials = new Function.F2<TypicalTypes.result, Pair<Pair<TypicalTypes.patternRecord>>, Pair<TypicalTypes.constr>>() {
    public TypicalTypes.result apply(final Pair<Pair<TypicalTypes.patternRecord>> matrix, final Pair<TypicalTypes.constr> sigma) {
      return new Match<TypicalTypes.result>() {
        public TypicalTypes.result apply() {
          final Pair<TypicalTypes.constr> arg$2642 = Analyzer.cast(sigma);

          if ((null == arg$2642)) {
            return null;
          }
          if (TypicalSupport.match$2643(arg$2642)) {
            return Analyzer.cast(new TypicalTypes.None());
          }
          if ((null != arg$2642 && !((Pair)arg$2642).isEmpty())) {
            final Pair<TypicalTypes.constr> list$2644 = Analyzer.cast(arg$2642);
            final TypicalTypes.constr x = Analyzer.cast(Primitives.wrapHead(list$2644));
            final Pair<TypicalTypes.constr> xs = Analyzer.cast(Primitives.wrapTail(list$2644));

            return Analyzer.cast(new Match<TypicalTypes.result>() {
              public TypicalTypes.result apply() {
                final TypicalTypes.constr arg$2645 = Analyzer.cast(x);

                if ((null == arg$2645)) {
                  return null;
                }
                if ((null != arg$2645))
                                    switch (arg$2645.tag()) {
                  case WildConstr:
                    if (TypicalSupport.match$2646(arg$2645)) {
                      return Analyzer.cast(checkSubPartials.apply(matrix, xs));
                    }
                    break;
                  default:
                    break;
                  };
                if (true) {
                  return Analyzer.cast(new Let<TypicalTypes.result>() {
                    final TypicalTypes.result res;

                    {
                      res = Analyzer.cast(checkSubPartial.apply(matrix, x));
                    }

                    public TypicalTypes.result apply() {
                      return Analyzer.cast(new Match<TypicalTypes.result>() {
                        public TypicalTypes.result apply() {
                          final TypicalTypes.result arg$2647 = Analyzer.cast(res);

                          if ((null == arg$2647)) {
                            return null;
                          }
                          if ((null != arg$2647))
                                                        switch (arg$2647.tag()) {
                            case Some:
                              if (TypicalSupport.match$2635(arg$2647)) {
                                return Analyzer.cast(res);
                              }
                              break;
                            default:
                              break;
                            };
                          if (true) {
                            return Analyzer.cast(checkSubPartials.apply(matrix, xs));
                          }
                          return null;
                        }
                      }.apply());
                    }
                  }.apply());
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<TypicalTypes.result, Pair<Pair<TypicalTypes.patternRecord>>, TypicalTypes.constr> checkSubPartial = new Function.F2<TypicalTypes.result, Pair<Pair<TypicalTypes.patternRecord>>, TypicalTypes.constr>() {
    public TypicalTypes.result apply(final Pair<Pair<TypicalTypes.patternRecord>> matrix, final TypicalTypes.constr ck) {
      return new Let<TypicalTypes.result>() {
        final Pair<Pair<TypicalTypes.patternRecord>> sMatrix;
        final BigInteger len;
        final TypicalTypes.result res;

        {
          sMatrix = Analyzer.cast(buildSMatrix.apply(matrix, ck, Pair.<Pair<TypicalTypes.patternRecord>>empty()));
          len = Analyzer.cast(Primitives.length.apply(TypicalSupport.head$2656.apply(sMatrix)));
          res = Analyzer.cast(checkPartial.apply(sMatrix, len));
        }

        public TypicalTypes.result apply() {
          return Analyzer.cast(new Match<TypicalTypes.result>() {
            public TypicalTypes.result apply() {
              final TypicalTypes.result arg$2652 = Analyzer.cast(res);

              if ((null == arg$2652)) {
                return null;
              }
              if ((null != arg$2652))
                                switch (arg$2652.tag()) {
                case Some:
                  if (TypicalSupport.match$2635(arg$2652)) {
                    final Pair<TypicalTypes.pattern> pl = Analyzer.cast(arg$2652.getTuple().get1());

                    return Analyzer.cast(new TypicalTypes.Some(buildResultPattern.apply(pl, ck)));
                  }
                  break;
                case None:
                  if (TypicalSupport.match$2634(arg$2652)) {
                    return Analyzer.cast(new TypicalTypes.None());
                  }
                  break;
                default:
                  break;
                };
              return null;
            }
          }.apply());
        }
      }.apply();
    }
  };

  final Function.F3<Pair<Pair<TypicalTypes.patternRecord>>, Pair<Pair<TypicalTypes.patternRecord>>, TypicalTypes.constr, Pair<Pair<TypicalTypes.patternRecord>>> buildSMatrix = new Function.F3<Pair<Pair<TypicalTypes.patternRecord>>, Pair<Pair<TypicalTypes.patternRecord>>, TypicalTypes.constr, Pair<Pair<TypicalTypes.patternRecord>>>() {
    public Pair<Pair<TypicalTypes.patternRecord>> apply(final Pair<Pair<TypicalTypes.patternRecord>> matrix, final TypicalTypes.constr ck, final Pair<Pair<TypicalTypes.patternRecord>> res) {
      return new Match<Pair<Pair<TypicalTypes.patternRecord>>>() {
        public Pair<Pair<TypicalTypes.patternRecord>> apply() {
          final Pair<Pair<TypicalTypes.patternRecord>> arg$2657 = Analyzer.cast(matrix);

          if ((null == arg$2657)) {
            return null;
          }
          if (TypicalSupport.match$2614(arg$2657)) {
            return Analyzer.cast(res);
          }
          if ((null != arg$2657 && !((Pair)arg$2657).isEmpty())) {
            final Pair<Pair<TypicalTypes.patternRecord>> list$2659 = Analyzer.cast(arg$2657);
            final Pair<TypicalTypes.patternRecord> x = Analyzer.cast(Primitives.wrapHead(list$2659));
            final Pair<Pair<TypicalTypes.patternRecord>> xs = Analyzer.cast(Primitives.wrapTail(list$2659));

            return Analyzer.cast(new Let<Pair<Pair<TypicalTypes.patternRecord>>>() {
              final TypicalTypes.constr co;

              {
                co = Analyzer.cast(getConstructor.apply(TypicalSupport.head$2543.apply(x)));
              }

              public Pair<Pair<TypicalTypes.patternRecord>> apply() {
                return Analyzer.cast(null == Primitives.equal.apply(co, ck) ? null : Primitives.equal.apply(co, ck) ? new Let<Pair<Pair<TypicalTypes.patternRecord>>>() {
                  final Pair<TypicalTypes.patternRecord> subList;
                  final Pair<TypicalTypes.patternRecord> newRow;

                  {
                    subList = Analyzer.cast(expandPattern.apply(TypicalSupport.head$2543.apply(x), ck));
                    newRow = Analyzer.cast(TypicalSupport.append$2490.apply(subList, TypicalSupport.tail$2544.apply(x)));
                  }

                  public Pair<Pair<TypicalTypes.patternRecord>> apply() {
                    return Analyzer.cast(buildSMatrix.apply(xs, ck, TypicalSupport.append$2611.apply(res, new Pair<Pair<TypicalTypes.patternRecord>>(newRow))));
                  }
                }.apply() : buildSMatrix.apply(xs, ck, res));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord, TypicalTypes.constr> expandPattern = new Function.F2<Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord, TypicalTypes.constr>() {
    public Pair<TypicalTypes.patternRecord> apply(final TypicalTypes.patternRecord p, final TypicalTypes.constr ck) {
      return new Match<Pair<TypicalTypes.patternRecord>>() {
        public Pair<TypicalTypes.patternRecord> apply() {
          final TypicalTypes.constr arg$2661 = Analyzer.cast(ck);

          if ((null == arg$2661)) {
            return null;
          }
          if ((null != arg$2661))
                        switch (arg$2661.tag()) {
            case CConstr:
              if (TypicalSupport.match$2675(arg$2661)) {
                return Analyzer.cast(new Match<Pair<TypicalTypes.patternRecord>>() {
                  public Pair<TypicalTypes.patternRecord> apply() {
                    final TypicalTypes.pattern arg$2676 = Analyzer.cast(null == p ? null : p.pat);

                    if ((null == arg$2676)) {
                      return null;
                    }
                    if ((null != arg$2676))
                                            switch (arg$2676.tag()) {
                      case ConstructorPattern:
                        if (TypicalSupport.match$2518(arg$2676)) {
                          final String s = Analyzer.cast(arg$2676.getTuple().get1());
                          final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2676.getTuple().get2());

                          return Analyzer.cast(null == Primitives.isBottom.apply(pl) ? null : Primitives.isBottom.apply(pl) ? new Let<Pair<TypicalTypes.patternRecord>>() {
                            final BigInteger si;

                            {
                              si = Analyzer.cast(getConstructorSize.apply(s));
                            }

                            public Pair<TypicalTypes.patternRecord> apply() {
                              return Analyzer.cast(makeWildCards.apply(si));
                            }
                          }.apply() : pl);
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(null);
                    }
                    return null;
                  }
                }.apply());
              }
              break;
            case PairConstr:
              if (TypicalSupport.match$2671(arg$2661)) {
                return Analyzer.cast(new Match<Pair<TypicalTypes.patternRecord>>() {
                  public Pair<TypicalTypes.patternRecord> apply() {
                    final TypicalTypes.pattern arg$2672 = Analyzer.cast(null == p ? null : p.pat);

                    if ((null == arg$2672)) {
                      return null;
                    }
                    if ((null != arg$2672))
                                            switch (arg$2672.tag()) {
                      case PairPattern:
                        if (TypicalSupport.match$2526(arg$2672)) {
                          final TypicalTypes.patternRecord hd = Analyzer.cast(arg$2672.getTuple().get1());
                          final TypicalTypes.patternRecord tl = Analyzer.cast(arg$2672.getTuple().get2());

                          return Analyzer.cast(new Pair<TypicalTypes.patternRecord>(hd).append(new Pair<TypicalTypes.patternRecord>(tl)));
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(null);
                    }
                    return null;
                  }
                }.apply());
              }
              break;
            case TupleConstr:
              if (TypicalSupport.match$2667(arg$2661)) {
                return Analyzer.cast(new Match<Pair<TypicalTypes.patternRecord>>() {
                  public Pair<TypicalTypes.patternRecord> apply() {
                    final TypicalTypes.pattern arg$2668 = Analyzer.cast(null == p ? null : p.pat);

                    if ((null == arg$2668)) {
                      return null;
                    }
                    if ((null != arg$2668))
                                            switch (arg$2668.tag()) {
                      case TupPattern:
                        if (TypicalSupport.match$2514(arg$2668)) {
                          final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2668.getTuple().get1());

                          return Analyzer.cast(pl);
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(null);
                    }
                    return null;
                  }
                }.apply());
              }
              break;
            case BotConstr:
              if (TypicalSupport.match$2662(arg$2661)) {
                return Analyzer.cast(Pair.<TypicalTypes.patternRecord>empty());
              }
              break;
            case EmptyConstr:
              if (TypicalSupport.match$2665(arg$2661)) {
                return Analyzer.cast(Pair.<TypicalTypes.patternRecord>empty());
              }
              break;
            case WildConstr:
              if (TypicalSupport.match$2646(arg$2661)) {
                return Analyzer.cast(Pair.<TypicalTypes.patternRecord>empty());
              }
              break;
            case Const:
              if (TypicalSupport.match$2664(arg$2661)) {
                return Analyzer.cast(Pair.<TypicalTypes.patternRecord>empty());
              }
              break;
            case RecordConstr:
              if (TypicalSupport.match$2666(arg$2661)) {
                return Analyzer.cast(expandRecPattern.apply(p));
              }
              break;
            default:
              break;
            };
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<BigInteger, String> getConstructorSize = new Function.F1<BigInteger, String>() {
    public BigInteger apply(final String s) {
      return new Let<BigInteger>() {
        final TypicalTypes.raw_type<?> t;

        {
          t = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("TypeConstructor", s, null), getNameSpace)));
        }

        public BigInteger apply() {
          return Analyzer.cast(new Match<BigInteger>() {
            public BigInteger apply() {
              final TypicalTypes.raw_type<?> arg$2680 = Analyzer.cast(t);

              if ((null == arg$2680)) {
                return null;
              }
              if ((null != arg$2680))
                                switch (arg$2680.tag()) {
                case ConstructorT:
                  if (TypicalSupport.match$96(arg$2680)) {
                    final TypicalTypes.raw_type<?> ty = Analyzer.cast(arg$2680.getTuple().get3());

                    return Analyzer.cast(null == Primitives.isBottom.apply(ty) ? null : Primitives.isBottom.apply(ty) ? BigInteger.valueOf(0) : new Match<BigInteger>() {
                      public BigInteger apply() {
                        final TypicalTypes.raw_type<?> arg$2682 = Analyzer.cast(ty);

                        if ((null == arg$2682)) {
                          return null;
                        }
                        if ((null != arg$2682))
                                                    switch (arg$2682.tag()) {
                          case TupleT:
                            if (TypicalSupport.match$110(arg$2682)) {
                              final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$2682.getTuple().get1());

                              return Analyzer.cast(Primitives.length.apply(tl));
                            }
                            break;
                          default:
                            break;
                          };
                        if (true) {
                          return Analyzer.cast(BigInteger.valueOf(1));
                        }
                        return null;
                      }
                    }.apply());
                  }
                  break;
                default:
                  break;
                };
              if (true) {
                return Analyzer.cast(null);
              }
              return null;
            }
          }.apply());
        }
      }.apply();
    }
  };

  final Function.F1<Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord> expandRecPattern = new Function.F1<Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord>() {
    public Pair<TypicalTypes.patternRecord> apply(final TypicalTypes.patternRecord p) {
      return new Let<Pair<TypicalTypes.patternRecord>>() {
        final Node no;
        final TypicalTypes.raw_type<?> ty;

        {
          no = Analyzer.cast(null == p ? null : p.nod);
          ty = Analyzer.cast(Primitives.getAnnotation.apply(no, "__type"));
        }

        public Pair<TypicalTypes.patternRecord> apply() {
          return Analyzer.cast(new Match<Pair<TypicalTypes.patternRecord>>() {
            public Pair<TypicalTypes.patternRecord> apply() {
              final TypicalTypes.raw_type<?> arg$2686 = Analyzer.cast(ty);

              if ((null == arg$2686)) {
                return null;
              }
              if ((null != arg$2686))
                                switch (arg$2686.tag()) {
                case RecordT:
                  if (TypicalSupport.match$106(arg$2686)) {
                    final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$2686.getTuple().get1());

                    return Analyzer.cast(new Match<Pair<TypicalTypes.patternRecord>>() {
                      public Pair<TypicalTypes.patternRecord> apply() {
                        final TypicalTypes.pattern arg$2688 = Analyzer.cast(null == p ? null : p.pat);

                        if ((null == arg$2688)) {
                          return null;
                        }
                        if ((null != arg$2688))
                                                    switch (arg$2688.tag()) {
                          case RecPattern:
                            if (TypicalSupport.match$2530(arg$2688)) {
                              final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2688.getTuple().get1());

                              return Analyzer.cast(makeFieldPatterns.apply(tl, pl));
                            }
                            break;
                          default:
                            break;
                          };
                        if (true) {
                          return Analyzer.cast(null);
                        }
                        return null;
                      }
                    }.apply());
                  }
                  break;
                default:
                  break;
                };
              if (true) {
                return Analyzer.cast(null);
              }
              return null;
            }
          }.apply());
        }
      }.apply();
    }
  };

  final Function.F2<Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.patternRecord>> makeFieldPatterns = new Function.F2<Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.patternRecord>>() {
    public Pair<TypicalTypes.patternRecord> apply(final Pair<TypicalTypes.raw_type<?>> tl, final Pair<TypicalTypes.patternRecord> pl) {
      return new Match<Pair<TypicalTypes.patternRecord>>() {
        public Pair<TypicalTypes.patternRecord> apply() {
          final Pair<TypicalTypes.raw_type<?>> arg$2692 = Analyzer.cast(tl);

          if ((null == arg$2692)) {
            return null;
          }
          if (TypicalSupport.match$118(arg$2692)) {
            return Analyzer.cast(Pair.<TypicalTypes.patternRecord>empty());
          }
          if ((null != arg$2692 && !((Pair)arg$2692).isEmpty())) {
            final Pair<TypicalTypes.raw_type<?>> list$2694 = Analyzer.cast(arg$2692);
            final TypicalTypes.raw_type<?> x = Analyzer.cast(Primitives.wrapHead(list$2694));
            final Pair<TypicalTypes.raw_type<?>> xs = Analyzer.cast(Primitives.wrapTail(list$2694));

            return Analyzer.cast(new Let<Pair<TypicalTypes.patternRecord>>() {
              final String s;
              final TypicalTypes.patternRecord p;

              {
                s = Analyzer.cast(new Match<String>() {
                  public String apply() {
                    final TypicalTypes.raw_type<?> arg$2695 = Analyzer.cast(x);

                    if ((null == arg$2695)) {
                      return null;
                    }
                    if ((null != arg$2695))
                                            switch (arg$2695.tag()) {
                      case FieldT:
                        if (TypicalSupport.match$98(arg$2695)) {
                          final String str = Analyzer.cast(arg$2695.getTuple().get2());

                          return Analyzer.cast(str);
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(null);
                    }
                    return null;
                  }
                }.apply());
                p = Analyzer.cast(makeFieldPattern.apply(s, pl));
              }

              public Pair<TypicalTypes.patternRecord> apply() {
                return Analyzer.cast(TypicalSupport.append$2490.apply(new Pair<TypicalTypes.patternRecord>(p), makeFieldPatterns.apply(xs, pl)));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<TypicalTypes.patternRecord, String, Pair<TypicalTypes.patternRecord>> makeFieldPattern = new Function.F2<TypicalTypes.patternRecord, String, Pair<TypicalTypes.patternRecord>>() {
    public TypicalTypes.patternRecord apply(final String s, final Pair<TypicalTypes.patternRecord> pl) {
      return new Match<TypicalTypes.patternRecord>() {
        public TypicalTypes.patternRecord apply() {
          final Pair<TypicalTypes.patternRecord> arg$2699 = Analyzer.cast(pl);

          if ((null == arg$2699)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2699)) {
            return Analyzer.cast(new Let<TypicalTypes.patternRecord>() {
              final TypicalTypes.patternRecord wild;

              {
                wild = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.WildCardPattern(), null, Boolean.FALSE));
              }

              public TypicalTypes.patternRecord apply() {
                return Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.RecFieldPattern(s, wild), null, Boolean.FALSE));
              }
            }.apply());
          }
          if ((null != arg$2699 && !((Pair)arg$2699).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2701 = Analyzer.cast(arg$2699);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2701));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2701));

            return Analyzer.cast(new Match<TypicalTypes.patternRecord>() {
              public TypicalTypes.patternRecord apply() {
                final TypicalTypes.pattern arg$2702 = Analyzer.cast(null == x ? null : x.pat);

                if ((null == arg$2702)) {
                  return null;
                }
                if ((null != arg$2702))
                                    switch (arg$2702.tag()) {
                  case RecFieldPattern:
                    if (TypicalSupport.match$2534(arg$2702)) {
                      final String str = Analyzer.cast(arg$2702.getTuple().get1());

                      return Analyzer.cast(null == Primitives.equal.apply(str, s) ? null : Primitives.equal.apply(str, s) ? x : makeFieldPattern.apply(s, xs));
                    }
                    break;
                  default:
                    break;
                  };
                if (true) {
                  return Analyzer.cast(null);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<TypicalTypes.patternRecord>, BigInteger> makeWildCards = new Function.F1<Pair<TypicalTypes.patternRecord>, BigInteger>() {
    public Pair<TypicalTypes.patternRecord> apply(final BigInteger n) {
      return new Match<Pair<TypicalTypes.patternRecord>>() {
        public Pair<TypicalTypes.patternRecord> apply() {
          final BigInteger arg$2706 = Analyzer.cast(n);

          if ((null == arg$2706)) {
            return null;
          }
          if ((null != BigInteger.valueOf(0) && BigInteger.valueOf(0).equals(arg$2706))) {
            return Analyzer.cast(Pair.<TypicalTypes.patternRecord>empty());
          }
          if (true) {
            return Analyzer.cast(new Let<Pair<TypicalTypes.patternRecord>>() {
              final TypicalTypes.patternRecord wild;

              {
                wild = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.WildCardPattern(), null, Boolean.FALSE));
              }

              public Pair<TypicalTypes.patternRecord> apply() {
                return Analyzer.cast(TypicalSupport.append$2490.apply(new Pair<TypicalTypes.patternRecord>(wild), makeWildCards.apply(Primitives.subtractInt.apply(n, BigInteger.valueOf(1)))));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>, TypicalTypes.constr> buildResultPattern = new Function.F2<Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>, TypicalTypes.constr>() {
    public Pair<TypicalTypes.pattern> apply(final Pair<TypicalTypes.pattern> pl, final TypicalTypes.constr ck) {
      return new Match<Pair<TypicalTypes.pattern>>() {
        public Pair<TypicalTypes.pattern> apply() {
          final TypicalTypes.constr arg$2708 = Analyzer.cast(ck);

          if ((null == arg$2708)) {
            return null;
          }
          if ((null != arg$2708))
                        switch (arg$2708.tag()) {
            case CConstr:
              if (TypicalSupport.match$2675(arg$2708)) {
                final String s = Analyzer.cast(arg$2708.getTuple().get1());
                final BigInteger size = Analyzer.cast(arg$2708.getTuple().get2());

                return Analyzer.cast(reduceTypeConstructorPattern.apply(s, size, pl, Pair.<TypicalTypes.pattern>empty()));
              }
              break;
            case PairConstr:
              if (TypicalSupport.match$2671(arg$2708)) {
                return Analyzer.cast(new Let<Pair<TypicalTypes.pattern>>() {
                  final TypicalTypes.pattern h1;
                  final TypicalTypes.patternRecord p1;
                  final Pair<TypicalTypes.pattern> ta;
                  final TypicalTypes.pattern h2;
                  final TypicalTypes.patternRecord p2;
                  final Pair<TypicalTypes.pattern> tai;

                  {
                    h1 = Analyzer.cast(TypicalSupport.head$2714.apply(pl));
                    p1 = Analyzer.cast(new TypicalTypes.patternRecord(h1, null, Boolean.FALSE));
                    ta = Analyzer.cast(TypicalSupport.tail$2715.apply(pl));
                    h2 = Analyzer.cast(TypicalSupport.head$2714.apply(ta));
                    p2 = Analyzer.cast(new TypicalTypes.patternRecord(h2, null, Boolean.FALSE));
                    tai = Analyzer.cast(TypicalSupport.tail$2715.apply(ta));
                  }

                  public Pair<TypicalTypes.pattern> apply() {
                    return Analyzer.cast(Primitives.wrapCons(new TypicalTypes.PairPattern(p1, p2), tai));
                  }
                }.apply());
              }
              break;
            case TupleConstr:
              if (TypicalSupport.match$2667(arg$2708)) {
                final BigInteger size = Analyzer.cast(arg$2708.getTuple().get1());

                return Analyzer.cast(reduceTuplePattern.apply(size, pl, Pair.<TypicalTypes.pattern>empty()));
              }
              break;
            case BotConstr:
              if (TypicalSupport.match$2662(arg$2708)) {
                return Analyzer.cast(Primitives.wrapCons(new TypicalTypes.BotPattern(), pl));
              }
              break;
            case EmptyConstr:
              if (TypicalSupport.match$2665(arg$2708)) {
                return Analyzer.cast(Primitives.wrapCons(new TypicalTypes.EmptyPattern(), pl));
              }
              break;
            case WildConstr:
              if (TypicalSupport.match$2646(arg$2708)) {
                return Analyzer.cast(Primitives.wrapCons(new TypicalTypes.WildCardPattern(), pl));
              }
              break;
            case Const:
              if (TypicalSupport.match$2664(arg$2708)) {
                final TypicalTypes.value val = Analyzer.cast(arg$2708.getTuple().get1());

                return Analyzer.cast(Primitives.wrapCons(new TypicalTypes.ConstantPattern(val), pl));
              }
              break;
            case RecordConstr:
              if (TypicalSupport.match$2666(arg$2708)) {
                final BigInteger size = Analyzer.cast(arg$2708.getTuple().get1());

                return Analyzer.cast(reduceRecordPattern.apply(size, pl, Pair.<TypicalTypes.pattern>empty()));
              }
              break;
            default:
              break;
            };
          return null;
        }
      }.apply();
    }
  };

  final Function.F4<Pair<TypicalTypes.pattern>, String, BigInteger, Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>> reduceTypeConstructorPattern = new Function.F4<Pair<TypicalTypes.pattern>, String, BigInteger, Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>>() {
    public Pair<TypicalTypes.pattern> apply(final String s, final BigInteger size, final Pair<TypicalTypes.pattern> pl, final Pair<TypicalTypes.pattern> children) {
      return (null == Primitives.equal.apply(size, BigInteger.valueOf(0)) ? null : Primitives.equal.apply(size, BigInteger.valueOf(0)) ? new Let<Pair<TypicalTypes.pattern>>() {
        final Pair<TypicalTypes.patternRecord> recList;

        {
          recList = Analyzer.cast(makePatternRecords.apply(children));
        }

        public Pair<TypicalTypes.pattern> apply() {
          return Analyzer.cast(Primitives.wrapCons(new TypicalTypes.ConstructorPattern(s, recList), pl));
        }
      }.apply() : reduceTypeConstructorPattern.apply(s, Primitives.subtractInt.apply(size, BigInteger.valueOf(1)), TypicalSupport.tail$2715.apply(pl), TypicalSupport.append$2640.apply(children, new Pair<TypicalTypes.pattern>(TypicalSupport.head$2714.apply(pl)))));
    }
  };

  final Function.F3<Pair<TypicalTypes.pattern>, BigInteger, Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>> reduceRecordPattern = new Function.F3<Pair<TypicalTypes.pattern>, BigInteger, Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>>() {
    public Pair<TypicalTypes.pattern> apply(final BigInteger size, final Pair<TypicalTypes.pattern> pl, final Pair<TypicalTypes.pattern> children) {
      return (null == Primitives.equal.apply(size, BigInteger.valueOf(0)) ? null : Primitives.equal.apply(size, BigInteger.valueOf(0)) ? new Let<Pair<TypicalTypes.pattern>>() {
        final Pair<TypicalTypes.patternRecord> recList;

        {
          recList = Analyzer.cast(makePatternRecords.apply(children));
        }

        public Pair<TypicalTypes.pattern> apply() {
          return Analyzer.cast(Primitives.wrapCons(new TypicalTypes.RecPattern(recList), pl));
        }
      }.apply() : reduceRecordPattern.apply(Primitives.subtractInt.apply(size, BigInteger.valueOf(1)), TypicalSupport.tail$2715.apply(pl), TypicalSupport.append$2640.apply(children, new Pair<TypicalTypes.pattern>(TypicalSupport.head$2714.apply(pl)))));
    }
  };

  final Function.F3<Pair<TypicalTypes.pattern>, BigInteger, Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>> reduceTuplePattern = new Function.F3<Pair<TypicalTypes.pattern>, BigInteger, Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>>() {
    public Pair<TypicalTypes.pattern> apply(final BigInteger size, final Pair<TypicalTypes.pattern> pl, final Pair<TypicalTypes.pattern> children) {
      return (null == Primitives.equal.apply(size, BigInteger.valueOf(0)) ? null : Primitives.equal.apply(size, BigInteger.valueOf(0)) ? new Let<Pair<TypicalTypes.pattern>>() {
        final Pair<TypicalTypes.patternRecord> recList;

        {
          recList = Analyzer.cast(makePatternRecords.apply(children));
        }

        public Pair<TypicalTypes.pattern> apply() {
          return Analyzer.cast(Primitives.wrapCons(new TypicalTypes.TupPattern(recList), pl));
        }
      }.apply() : reduceTuplePattern.apply(Primitives.subtractInt.apply(size, BigInteger.valueOf(1)), TypicalSupport.tail$2715.apply(pl), TypicalSupport.append$2640.apply(children, new Pair<TypicalTypes.pattern>(TypicalSupport.head$2714.apply(pl)))));
    }
  };

  final Function.F1<Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.pattern>> makePatternRecords = new Function.F1<Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.pattern>>() {
    public Pair<TypicalTypes.patternRecord> apply(final Pair<TypicalTypes.pattern> pl) {
      return new Match<Pair<TypicalTypes.patternRecord>>() {
        public Pair<TypicalTypes.patternRecord> apply() {
          final Pair<TypicalTypes.pattern> arg$2720 = Analyzer.cast(pl);

          if ((null == arg$2720)) {
            return null;
          }
          if (TypicalSupport.match$2721(arg$2720)) {
            return Analyzer.cast(Pair.<TypicalTypes.patternRecord>empty());
          }
          if ((null != arg$2720 && !((Pair)arg$2720).isEmpty())) {
            final Pair<TypicalTypes.pattern> list$2722 = Analyzer.cast(arg$2720);
            final TypicalTypes.pattern x = Analyzer.cast(Primitives.wrapHead(list$2722));
            final Pair<TypicalTypes.pattern> xs = Analyzer.cast(Primitives.wrapTail(list$2722));

            return Analyzer.cast(new Let<Pair<TypicalTypes.patternRecord>>() {
              final TypicalTypes.patternRecord pr;

              {
                pr = Analyzer.cast(new TypicalTypes.patternRecord(x, null, Boolean.FALSE));
              }

              public Pair<TypicalTypes.patternRecord> apply() {
                return Analyzer.cast(Primitives.wrapCons(pr, makePatternRecords.apply(xs)));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<Pair<TypicalTypes.patternRecord>>, Pair<Pair<TypicalTypes.patternRecord>>> buildDMatrix = new Function.F1<Pair<Pair<TypicalTypes.patternRecord>>, Pair<Pair<TypicalTypes.patternRecord>>>() {
    public Pair<Pair<TypicalTypes.patternRecord>> apply(final Pair<Pair<TypicalTypes.patternRecord>> matrix) {
      return new Match<Pair<Pair<TypicalTypes.patternRecord>>>() {
        public Pair<Pair<TypicalTypes.patternRecord>> apply() {
          final Pair<Pair<TypicalTypes.patternRecord>> arg$2724 = Analyzer.cast(matrix);

          if ((null == arg$2724)) {
            return null;
          }
          if (TypicalSupport.match$2614(arg$2724)) {
            return Analyzer.cast(Pair.<Pair<TypicalTypes.patternRecord>>empty());
          }
          if ((null != arg$2724 && !((Pair)arg$2724).isEmpty())) {
            final Pair<Pair<TypicalTypes.patternRecord>> list$2726 = Analyzer.cast(arg$2724);
            final Pair<TypicalTypes.patternRecord> x = Analyzer.cast(Primitives.wrapHead(list$2726));
            final Pair<Pair<TypicalTypes.patternRecord>> xs = Analyzer.cast(Primitives.wrapTail(list$2726));

            return Analyzer.cast(new Let<Pair<Pair<TypicalTypes.patternRecord>>>() {
              final TypicalTypes.patternRecord p;

              {
                p = Analyzer.cast(TypicalSupport.head$2543.apply(x));
              }

              public Pair<Pair<TypicalTypes.patternRecord>> apply() {
                return Analyzer.cast(new Match<Pair<Pair<TypicalTypes.patternRecord>>>() {
                  public Pair<Pair<TypicalTypes.patternRecord>> apply() {
                    final TypicalTypes.pattern arg$2727 = Analyzer.cast(null == p ? null : p.pat);

                    if ((null == arg$2727)) {
                      return null;
                    }
                    if ((null != arg$2727))
                                            switch (arg$2727.tag()) {
                      case RecFieldPattern:
                        if (TypicalSupport.match$2534(arg$2727)) {
                          final TypicalTypes.patternRecord pt = Analyzer.cast(arg$2727.getTuple().get2());

                          return Analyzer.cast(new Let<Pair<Pair<TypicalTypes.patternRecord>>>() {
                            final TypicalTypes.constr co;

                            {
                              co = Analyzer.cast(getConstructor.apply(pt));
                            }

                            public Pair<Pair<TypicalTypes.patternRecord>> apply() {
                              return Analyzer.cast(null == Primitives.equal.apply(co, new TypicalTypes.WildConstr()) ? null : Primitives.equal.apply(co, new TypicalTypes.WildConstr()) ? Primitives.wrapCons(TypicalSupport.tail$2544.apply(x), buildDMatrix.apply(xs)) : buildDMatrix.apply(xs));
                            }
                          }.apply());
                        }
                        break;
                      case WildCardPattern:
                        if (TypicalSupport.match$2497(arg$2727)) {
                          return Analyzer.cast(Primitives.wrapCons(TypicalSupport.tail$2544.apply(x), buildDMatrix.apply(xs)));
                        }
                        break;
                      case VariablePattern:
                        if (TypicalSupport.match$2499(arg$2727)) {
                          return Analyzer.cast(Primitives.wrapCons(TypicalSupport.tail$2544.apply(x), buildDMatrix.apply(xs)));
                        }
                        break;
                      default:
                        break;
                      };
                    if (true) {
                      return Analyzer.cast(buildDMatrix.apply(xs));
                    }
                    return null;
                  }
                }.apply());
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Boolean, Pair<TypicalTypes.constr>> emptySigma = new Function.F1<Boolean, Pair<TypicalTypes.constr>>() {
    public Boolean apply(final Pair<TypicalTypes.constr> sigma) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.constr> arg$2733 = Analyzer.cast(sigma);

          if ((null == arg$2733)) {
            return null;
          }
          if (TypicalSupport.match$2643(arg$2733)) {
            return Analyzer.cast(Boolean.TRUE);
          }
          if ((null != arg$2733 && !((Pair)arg$2733).isEmpty())) {
            final Pair<TypicalTypes.constr> list$2735 = Analyzer.cast(arg$2733);
            final TypicalTypes.constr x = Analyzer.cast(Primitives.wrapHead(list$2735));
            final Pair<TypicalTypes.constr> xs = Analyzer.cast(Primitives.wrapTail(list$2735));

            return Analyzer.cast(new Match<Boolean>() {
              public Boolean apply() {
                final TypicalTypes.constr arg$2736 = Analyzer.cast(x);

                if ((null == arg$2736)) {
                  return null;
                }
                if ((null != arg$2736))
                                    switch (arg$2736.tag()) {
                  case WildConstr:
                    if (TypicalSupport.match$2646(arg$2736)) {
                      return Analyzer.cast(emptySigma.apply(xs));
                    }
                    break;
                  default:
                    break;
                  };
                if (true) {
                  return Analyzer.cast(Boolean.FALSE);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Boolean, Pair<TypicalTypes.constr>> completeSigma = new Function.F1<Boolean, Pair<TypicalTypes.constr>>() {
    public Boolean apply(final Pair<TypicalTypes.constr> sigma) {
      return new Let<Boolean>() {
        final Pair<TypicalTypes.constr> si;

        {
          si = Analyzer.cast(removeWildConstr.apply(sigma));
        }

        public Boolean apply() {
          return Analyzer.cast(null == Primitives.equal.apply(Primitives.length.apply(si), BigInteger.valueOf(0)) ? null : Primitives.equal.apply(Primitives.length.apply(si), BigInteger.valueOf(0)) ? Boolean.FALSE : new Let<Boolean>() {
            final TypicalTypes.constr h;

            {
              h = Analyzer.cast(TypicalSupport.head$2757.apply(si));
            }

            public Boolean apply() {
              return Analyzer.cast(new Match<Boolean>() {
                public Boolean apply() {
                  final TypicalTypes.constr arg$2740 = Analyzer.cast(h);

                  if ((null == arg$2740)) {
                    return null;
                  }
                  if ((null != arg$2740))
                                        switch (arg$2740.tag()) {
                    case CConstr:
                      if (TypicalSupport.match$2675(arg$2740)) {
                        final String s = Analyzer.cast(arg$2740.getTuple().get1());

                        return Analyzer.cast(new Let<Boolean>() {
                          final TypicalTypes.raw_type<?> ty;

                          {
                            ty = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("TypeConstructor", s, null), getNameSpace)));
                          }

                          public Boolean apply() {
                            return Analyzer.cast(new Match<Boolean>() {
                              public Boolean apply() {
                                final TypicalTypes.raw_type<?> arg$2750 = Analyzer.cast(ty);

                                if ((null == arg$2750)) {
                                  return null;
                                }
                                if ((null != arg$2750))
                                                                    switch (arg$2750.tag()) {
                                  case ConstructorT:
                                    if (TypicalSupport.match$96(arg$2750)) {
                                      final String str = Analyzer.cast(arg$2750.getTuple().get1());

                                      return Analyzer.cast(new Let<Boolean>() {
                                        final TypicalTypes.raw_type<?> t;

                                        {
                                          t = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", str), getNameSpace)));
                                        }

                                        public Boolean apply() {
                                          return Analyzer.cast(new Match<Boolean>() {
                                            public Boolean apply() {
                                              final TypicalTypes.raw_type<?> arg$2752 = Analyzer.cast(t);

                                              if ((null == arg$2752)) {
                                                return null;
                                              }
                                              if ((null != arg$2752))
                                                                                                switch (arg$2752.tag()) {
                                                case VariantT:
                                                  if (TypicalSupport.match$102(arg$2752)) {
                                                    final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$2752.getTuple().get1());

                                                    return Analyzer.cast(checkComplete.apply(tl, si));
                                                  }
                                                  break;
                                                default:
                                                  break;
                                                };
                                              if (true) {
                                                return Analyzer.cast(null);
                                              }
                                              return null;
                                            }
                                          }.apply());
                                        }
                                      }.apply());
                                    }
                                    break;
                                  default:
                                    break;
                                  };
                                if (true) {
                                  return Analyzer.cast(null);
                                }
                                return null;
                              }
                            }.apply());
                          }
                        }.apply());
                      }
                      break;
                    case PairConstr:
                      if (TypicalSupport.match$2671(arg$2740)) {
                        return Analyzer.cast(Primitives.and.apply(Primitives.contains.apply(new TypicalTypes.EmptyConstr(), si), Primitives.contains.apply(new TypicalTypes.PairConstr(), si)));
                      }
                      break;
                    case TupleConstr:
                      if (TypicalSupport.match$2667(arg$2740)) {
                        return Analyzer.cast(Boolean.TRUE);
                      }
                      break;
                    case EmptyConstr:
                      if (TypicalSupport.match$2665(arg$2740)) {
                        return Analyzer.cast(Primitives.and.apply(Primitives.contains.apply(new TypicalTypes.EmptyConstr(), si), Primitives.contains.apply(new TypicalTypes.PairConstr(), si)));
                      }
                      break;
                    case Const:
                      if (TypicalSupport.match$2664(arg$2740)) {
                        final TypicalTypes.value val = Analyzer.cast(arg$2740.getTuple().get1());

                        return Analyzer.cast(new Match<Boolean>() {
                          public Boolean apply() {
                            final TypicalTypes.value arg$2742 = Analyzer.cast(val);

                            if ((null == arg$2742)) {
                              return null;
                            }
                            if ((null != arg$2742))
                                                            switch (arg$2742.tag()) {
                              case BoolValue:
                                if (TypicalSupport.match$2743(arg$2742)) {
                                  return Analyzer.cast(Primitives.and.apply(Primitives.contains.apply(new TypicalTypes.Const(new TypicalTypes.BoolValue(Boolean.TRUE)), sigma), Primitives.contains.apply(new TypicalTypes.Const(new TypicalTypes.BoolValue(Boolean.FALSE)), sigma)));
                                }
                                break;
                              default:
                                break;
                              };
                            if (true) {
                              return Analyzer.cast(Boolean.FALSE);
                            }
                            return null;
                          }
                        }.apply());
                      }
                      break;
                    case RecordConstr:
                      if (TypicalSupport.match$2666(arg$2740)) {
                        return Analyzer.cast(Boolean.TRUE);
                      }
                      break;
                    default:
                      break;
                    };
                  if (true) {
                    return Analyzer.cast(null);
                  }
                  return null;
                }
              }.apply());
            }
          }.apply());
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.constr>> checkComplete = new Function.F2<Boolean, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.constr>>() {
    public Boolean apply(final Pair<TypicalTypes.raw_type<?>> tl, final Pair<TypicalTypes.constr> sigma) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.raw_type<?>> arg$2758 = Analyzer.cast(tl);

          if ((null == arg$2758)) {
            return null;
          }
          if (TypicalSupport.match$118(arg$2758)) {
            return Analyzer.cast(Boolean.TRUE);
          }
          if ((null != arg$2758 && !((Pair)arg$2758).isEmpty())) {
            final Pair<TypicalTypes.raw_type<?>> list$2760 = Analyzer.cast(arg$2758);
            final TypicalTypes.raw_type<?> x = Analyzer.cast(Primitives.wrapHead(list$2760));
            final Pair<TypicalTypes.raw_type<?>> xs = Analyzer.cast(Primitives.wrapTail(list$2760));

            return Analyzer.cast(new Match<Boolean>() {
              public Boolean apply() {
                final TypicalTypes.raw_type<?> arg$2761 = Analyzer.cast(x);

                if ((null == arg$2761)) {
                  return null;
                }
                if ((null != arg$2761))
                                    switch (arg$2761.tag()) {
                  case ConstructorT:
                    if (TypicalSupport.match$96(arg$2761)) {
                      final String str = Analyzer.cast(arg$2761.getTuple().get2());

                      return Analyzer.cast(null == sigmaContains.apply(sigma, str) ? null : sigmaContains.apply(sigma, str) ? checkComplete.apply(xs, sigma) : Boolean.FALSE);
                    }
                    break;
                  default:
                    break;
                  };
                if (true) {
                  return Analyzer.cast(null);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F2<Boolean, Pair<TypicalTypes.constr>, String> sigmaContains = new Function.F2<Boolean, Pair<TypicalTypes.constr>, String>() {
    public Boolean apply(final Pair<TypicalTypes.constr> sigma, final String s) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.constr> arg$2765 = Analyzer.cast(sigma);

          if ((null == arg$2765)) {
            return null;
          }
          if (TypicalSupport.match$2643(arg$2765)) {
            return Analyzer.cast(Boolean.FALSE);
          }
          if ((null != arg$2765 && !((Pair)arg$2765).isEmpty())) {
            final Pair<TypicalTypes.constr> list$2767 = Analyzer.cast(arg$2765);
            final TypicalTypes.constr x = Analyzer.cast(Primitives.wrapHead(list$2767));
            final Pair<TypicalTypes.constr> xs = Analyzer.cast(Primitives.wrapTail(list$2767));

            return Analyzer.cast(new Match<Boolean>() {
              public Boolean apply() {
                final TypicalTypes.constr arg$2768 = Analyzer.cast(x);

                if ((null == arg$2768)) {
                  return null;
                }
                if ((null != arg$2768))
                                    switch (arg$2768.tag()) {
                  case CConstr:
                    if (TypicalSupport.match$2675(arg$2768)) {
                      final String str = Analyzer.cast(arg$2768.getTuple().get1());

                      return Analyzer.cast(null == Primitives.equal.apply(s, str) ? null : Primitives.equal.apply(s, str) ? Boolean.TRUE : sigmaContains.apply(xs, s));
                    }
                    break;
                  default:
                    break;
                  };
                if (true) {
                  return Analyzer.cast(null);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<TypicalTypes.pattern, Pair<TypicalTypes.constr>> findUnmatchedPattern = new Function.F1<TypicalTypes.pattern, Pair<TypicalTypes.constr>>() {
    public TypicalTypes.pattern apply(final Pair<TypicalTypes.constr> sigma) {
      return new Let<TypicalTypes.pattern>() {
        final Pair<TypicalTypes.constr> si;
        final TypicalTypes.constr h;

        {
          si = Analyzer.cast(removeWildConstr.apply(sigma));
          h = Analyzer.cast(TypicalSupport.head$2757.apply(si));
        }

        public TypicalTypes.pattern apply() {
          return Analyzer.cast(new Match<TypicalTypes.pattern>() {
            public TypicalTypes.pattern apply() {
              final TypicalTypes.constr arg$2772 = Analyzer.cast(h);

              if ((null == arg$2772)) {
                return null;
              }
              if ((null != arg$2772))
                                switch (arg$2772.tag()) {
                case CConstr:
                  if (TypicalSupport.match$2675(arg$2772)) {
                    final String s = Analyzer.cast(arg$2772.getTuple().get1());

                    return Analyzer.cast(new Let<TypicalTypes.pattern>() {
                      final TypicalTypes.raw_type<?> ty;

                      {
                        ty = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("TypeConstructor", s, null), getNameSpace)));
                      }

                      public TypicalTypes.pattern apply() {
                        return Analyzer.cast(new Match<TypicalTypes.pattern>() {
                          public TypicalTypes.pattern apply() {
                            final TypicalTypes.raw_type<?> arg$2783 = Analyzer.cast(ty);

                            if ((null == arg$2783)) {
                              return null;
                            }
                            if ((null != arg$2783))
                                                            switch (arg$2783.tag()) {
                              case ConstructorT:
                                if (TypicalSupport.match$96(arg$2783)) {
                                  final String str = Analyzer.cast(arg$2783.getTuple().get1());

                                  return Analyzer.cast(new Let<TypicalTypes.pattern>() {
                                    final TypicalTypes.raw_type<?> t;

                                    {
                                      t = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode.create("UserDefinedType", str), getNameSpace)));
                                    }

                                    public TypicalTypes.pattern apply() {
                                      return Analyzer.cast(new Match<TypicalTypes.pattern>() {
                                        public TypicalTypes.pattern apply() {
                                          final TypicalTypes.raw_type<?> arg$2785 = Analyzer.cast(t);

                                          if ((null == arg$2785)) {
                                            return null;
                                          }
                                          if ((null != arg$2785))
                                                                                        switch (arg$2785.tag()) {
                                            case VariantT:
                                              if (TypicalSupport.match$102(arg$2785)) {
                                                final Pair<TypicalTypes.raw_type<?>> tl = Analyzer.cast(arg$2785.getTuple().get1());

                                                return Analyzer.cast(findUnmatchedConstructor.apply(tl, si));
                                              }
                                              break;
                                            default:
                                              break;
                                            };
                                          if (true) {
                                            return Analyzer.cast(null);
                                          }
                                          return null;
                                        }
                                      }.apply());
                                    }
                                  }.apply());
                                }
                                break;
                              default:
                                break;
                              };
                            if (true) {
                              return Analyzer.cast(null);
                            }
                            return null;
                          }
                        }.apply());
                      }
                    }.apply());
                  }
                  break;
                case PairConstr:
                  if (TypicalSupport.match$2671(arg$2772)) {
                    return Analyzer.cast(null == Primitives.contains.apply(new TypicalTypes.EmptyConstr(), sigma) ? null : Primitives.contains.apply(new TypicalTypes.EmptyConstr(), sigma) ? new Let<TypicalTypes.pattern>() {
                      final TypicalTypes.patternRecord wild;

                      {
                        wild = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.WildCardPattern(), null, Boolean.FALSE));
                      }

                      public TypicalTypes.pattern apply() {
                        return Analyzer.cast(new TypicalTypes.PairPattern(wild, wild));
                      }
                    }.apply() : new TypicalTypes.EmptyPattern());
                  }
                  break;
                case EmptyConstr:
                  if (TypicalSupport.match$2665(arg$2772)) {
                    return Analyzer.cast(null == Primitives.contains.apply(new TypicalTypes.EmptyConstr(), sigma) ? null : Primitives.contains.apply(new TypicalTypes.EmptyConstr(), sigma) ? new Let<TypicalTypes.pattern>() {
                      final TypicalTypes.patternRecord wild;

                      {
                        wild = Analyzer.cast(new TypicalTypes.patternRecord(new TypicalTypes.WildCardPattern(), null, Boolean.FALSE));
                      }

                      public TypicalTypes.pattern apply() {
                        return Analyzer.cast(new TypicalTypes.PairPattern(wild, wild));
                      }
                    }.apply() : new TypicalTypes.EmptyPattern());
                  }
                  break;
                case Const:
                  if (TypicalSupport.match$2664(arg$2772)) {
                    final TypicalTypes.value val = Analyzer.cast(arg$2772.getTuple().get1());

                    return Analyzer.cast(new Match<TypicalTypes.pattern>() {
                      public TypicalTypes.pattern apply() {
                        final TypicalTypes.value arg$2774 = Analyzer.cast(val);

                        if ((null == arg$2774)) {
                          return null;
                        }
                        if ((null != arg$2774))
                                                    switch (arg$2774.tag()) {
                          case IntValue:
                            if (TypicalSupport.match$2776(arg$2774)) {
                              final BigInteger i = Analyzer.cast(arg$2774.getTuple().get1());

                              return Analyzer.cast(findIntPattern.apply(i, sigma));
                            }
                            break;
                          case StringValue:
                            if (TypicalSupport.match$2778(arg$2774)) {
                              final String s = Analyzer.cast(arg$2774.getTuple().get1());

                              return Analyzer.cast(findStringPattern.apply(s, sigma));
                            }
                            break;
                          case FloatValue:
                            if (TypicalSupport.match$2777(arg$2774)) {
                              final Double f = Analyzer.cast(arg$2774.getTuple().get1());

                              return Analyzer.cast(findFloatPattern.apply(f, sigma));
                            }
                            break;
                          case BoolValue:
                            if (TypicalSupport.match$2743(arg$2774)) {
                              return Analyzer.cast(null == Primitives.not.apply(Primitives.contains.apply(new TypicalTypes.Const(new TypicalTypes.BoolValue(Boolean.TRUE)), sigma)) ? null : Primitives.not.apply(Primitives.contains.apply(new TypicalTypes.Const(new TypicalTypes.BoolValue(Boolean.TRUE)), sigma)) ? new TypicalTypes.ConstantPattern(new TypicalTypes.BoolValue(Boolean.TRUE)) : new TypicalTypes.ConstantPattern(new TypicalTypes.BoolValue(Boolean.FALSE)));
                            }
                            break;
                          default:
                            break;
                          };
                        return null;
                      }
                    }.apply());
                  }
                  break;
                default:
                  break;
                };
              if (true) {
                return Analyzer.cast(null);
              }
              return null;
            }
          }.apply());
        }
      }.apply();
    }
  };

  final Function.F2<TypicalTypes.pattern, BigInteger, Pair<TypicalTypes.constr>> findIntPattern = new Function.F2<TypicalTypes.pattern, BigInteger, Pair<TypicalTypes.constr>>() {
    public TypicalTypes.pattern apply(final BigInteger i, final Pair<TypicalTypes.constr> sigma) {
      return (null == Primitives.not.apply(Primitives.contains.apply(new TypicalTypes.Const(new TypicalTypes.IntValue(Primitives.addInt.apply(i, BigInteger.valueOf(1)))), sigma)) ? null : Primitives.not.apply(Primitives.contains.apply(new TypicalTypes.Const(new TypicalTypes.IntValue(Primitives.addInt.apply(i, BigInteger.valueOf(1)))), sigma)) ? new TypicalTypes.ConstantPattern(new TypicalTypes.IntValue(Primitives.addInt.apply(i, BigInteger.valueOf(1)))) : findIntPattern.apply(Primitives.addInt.apply(i, BigInteger.valueOf(1)), sigma));
    }
  };

  final Function.F2<TypicalTypes.pattern, Double, Pair<TypicalTypes.constr>> findFloatPattern = new Function.F2<TypicalTypes.pattern, Double, Pair<TypicalTypes.constr>>() {
    public TypicalTypes.pattern apply(final Double f, final Pair<TypicalTypes.constr> sigma) {
      return (null == Primitives.not.apply(Primitives.contains.apply(new TypicalTypes.Const(new TypicalTypes.FloatValue(Primitives.addFloat64.apply(f, new Double(1.0)))), sigma)) ? null : Primitives.not.apply(Primitives.contains.apply(new TypicalTypes.Const(new TypicalTypes.FloatValue(Primitives.addFloat64.apply(f, new Double(1.0)))), sigma)) ? new TypicalTypes.ConstantPattern(new TypicalTypes.FloatValue(Primitives.addFloat64.apply(f, new Double(1.0)))) : findFloatPattern.apply(Primitives.addFloat64.apply(f, new Double(1.0)), sigma));
    }
  };

  final Function.F2<TypicalTypes.pattern, String, Pair<TypicalTypes.constr>> findStringPattern = new Function.F2<TypicalTypes.pattern, String, Pair<TypicalTypes.constr>>() {
    public TypicalTypes.pattern apply(final String s, final Pair<TypicalTypes.constr> sigma) {
      return (null == Primitives.not.apply(Primitives.contains.apply(new TypicalTypes.Const(new TypicalTypes.StringValue(Primitives.concat.apply("z", s))), sigma)) ? null : Primitives.not.apply(Primitives.contains.apply(new TypicalTypes.Const(new TypicalTypes.StringValue(Primitives.concat.apply("z", s))), sigma)) ? new TypicalTypes.ConstantPattern(new TypicalTypes.StringValue(Primitives.concat.apply("z", s))) : findStringPattern.apply(Primitives.concat.apply("z", s), sigma));
    }
  };

  final Function.F2<TypicalTypes.pattern, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.constr>> findUnmatchedConstructor = new Function.F2<TypicalTypes.pattern, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.constr>>() {
    public TypicalTypes.pattern apply(final Pair<TypicalTypes.raw_type<?>> tl, final Pair<TypicalTypes.constr> sigma) {
      return new Match<TypicalTypes.pattern>() {
        public TypicalTypes.pattern apply() {
          final Pair<TypicalTypes.raw_type<?>> arg$2790 = Analyzer.cast(tl);

          if ((null == arg$2790)) {
            return null;
          }
          if (TypicalSupport.match$118(arg$2790)) {
            return Analyzer.cast(null);
          }
          if ((null != arg$2790 && !((Pair)arg$2790).isEmpty())) {
            final Pair<TypicalTypes.raw_type<?>> list$2792 = Analyzer.cast(arg$2790);
            final TypicalTypes.raw_type<?> x = Analyzer.cast(Primitives.wrapHead(list$2792));
            final Pair<TypicalTypes.raw_type<?>> xs = Analyzer.cast(Primitives.wrapTail(list$2792));

            return Analyzer.cast(new Match<TypicalTypes.pattern>() {
              public TypicalTypes.pattern apply() {
                final TypicalTypes.raw_type<?> arg$2793 = Analyzer.cast(x);

                if ((null == arg$2793)) {
                  return null;
                }
                if ((null != arg$2793))
                                    switch (arg$2793.tag()) {
                  case ConstructorT:
                    if (TypicalSupport.match$96(arg$2793)) {
                      final String str = Analyzer.cast(arg$2793.getTuple().get2());

                      return Analyzer.cast(null == sigmaContains.apply(sigma, str) ? null : sigmaContains.apply(sigma, str) ? findUnmatchedConstructor.apply(xs, sigma) : new Let<TypicalTypes.pattern>() {
                        final BigInteger size;
                        final Pair<TypicalTypes.patternRecord> li;

                        {
                          size = Analyzer.cast(getConstructorSize.apply(str));
                          li = Analyzer.cast(makeWildCards.apply(size));
                        }

                        public TypicalTypes.pattern apply() {
                          return Analyzer.cast(new TypicalTypes.ConstructorPattern(str, li));
                        }
                      }.apply());
                    }
                    break;
                  default:
                    break;
                  };
                if (true) {
                  return Analyzer.cast(null);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Pair<TypicalTypes.constr>, Pair<TypicalTypes.constr>> removeWildConstr = new Function.F1<Pair<TypicalTypes.constr>, Pair<TypicalTypes.constr>>() {
    public Pair<TypicalTypes.constr> apply(final Pair<TypicalTypes.constr> sigma) {
      return new Match<Pair<TypicalTypes.constr>>() {
        public Pair<TypicalTypes.constr> apply() {
          final Pair<TypicalTypes.constr> arg$2797 = Analyzer.cast(sigma);

          if ((null == arg$2797)) {
            return null;
          }
          if (TypicalSupport.match$2643(arg$2797)) {
            return Analyzer.cast(Pair.<TypicalTypes.constr>empty());
          }
          if ((null != arg$2797 && !((Pair)arg$2797).isEmpty())) {
            final Pair<TypicalTypes.constr> list$2799 = Analyzer.cast(arg$2797);
            final TypicalTypes.constr x = Analyzer.cast(Primitives.wrapHead(list$2799));
            final Pair<TypicalTypes.constr> xs = Analyzer.cast(Primitives.wrapTail(list$2799));

            return Analyzer.cast(null == Primitives.equal.apply(x, new TypicalTypes.WildConstr()) ? null : Primitives.equal.apply(x, new TypicalTypes.WildConstr()) ? removeWildConstr.apply(xs) : Primitives.wrapCons(x, removeWildConstr.apply(xs)));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Boolean, Pair<Pair<TypicalTypes.patternRecord>>> quickPartialCheck = new Function.F1<Boolean, Pair<Pair<TypicalTypes.patternRecord>>>() {
    public Boolean apply(final Pair<Pair<TypicalTypes.patternRecord>> matrix) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<Pair<TypicalTypes.patternRecord>> arg$2801 = Analyzer.cast(matrix);

          if ((null == arg$2801)) {
            return null;
          }
          if (TypicalSupport.match$2614(arg$2801)) {
            return Analyzer.cast(Boolean.FALSE);
          }
          if ((null != arg$2801 && !((Pair)arg$2801).isEmpty())) {
            final Pair<Pair<TypicalTypes.patternRecord>> list$2803 = Analyzer.cast(arg$2801);
            final Pair<TypicalTypes.patternRecord> x = Analyzer.cast(Primitives.wrapHead(list$2803));
            final Pair<Pair<TypicalTypes.patternRecord>> xs = Analyzer.cast(Primitives.wrapTail(list$2803));

            return Analyzer.cast(null == allWildCard.apply(x) ? null : allWildCard.apply(x) ? Boolean.TRUE : quickPartialCheck.apply(xs));
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<Boolean, Pair<TypicalTypes.patternRecord>> allWildCard = new Function.F1<Boolean, Pair<TypicalTypes.patternRecord>>() {
    public Boolean apply(final Pair<TypicalTypes.patternRecord> row) {
      return new Match<Boolean>() {
        public Boolean apply() {
          final Pair<TypicalTypes.patternRecord> arg$2805 = Analyzer.cast(row);

          if ((null == arg$2805)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2805)) {
            return Analyzer.cast(Boolean.TRUE);
          }
          if ((null != arg$2805 && !((Pair)arg$2805).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2807 = Analyzer.cast(arg$2805);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2807));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2807));

            return Analyzer.cast(new Match<Boolean>() {
              public Boolean apply() {
                final TypicalTypes.pattern arg$2808 = Analyzer.cast(null == x ? null : x.pat);

                if ((null == arg$2808)) {
                  return null;
                }
                if ((null != arg$2808))
                                    switch (arg$2808.tag()) {
                  case WildCardPattern:
                    if (TypicalSupport.match$2497(arg$2808)) {
                      return Analyzer.cast(allWildCard.apply(xs));
                    }
                    break;
                  case VariablePattern:
                    if (TypicalSupport.match$2499(arg$2808)) {
                      return Analyzer.cast(allWildCard.apply(xs));
                    }
                    break;
                  case TupPattern:
                    if (TypicalSupport.match$2514(arg$2808)) {
                      final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2808.getTuple().get1());

                      return Analyzer.cast(Primitives.and.apply(allWildCard.apply(pl), allWildCard.apply(xs)));
                    }
                    break;
                  default:
                    break;
                  };
                if (true) {
                  return Analyzer.cast(Boolean.FALSE);
                }
                return null;
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<String, TypicalTypes.pattern> showPattern = new Function.F1<String, TypicalTypes.pattern>() {
    public String apply(final TypicalTypes.pattern p) {
      return new Match<String>() {
        public String apply() {
          final TypicalTypes.pattern arg$2814 = Analyzer.cast(p);

          if ((null == arg$2814)) {
            return null;
          }
          if ((null != arg$2814))
                        switch (arg$2814.tag()) {
            case EmptyPattern:
              if (TypicalSupport.match$2522(arg$2814)) {
                return Analyzer.cast("[]");
              }
              break;
            case RecFieldPattern:
              if (TypicalSupport.match$2534(arg$2814)) {
                final String s = Analyzer.cast(arg$2814.getTuple().get1());
                final TypicalTypes.patternRecord pt = Analyzer.cast(arg$2814.getTuple().get2());

                return Analyzer.cast(new Let<String>() {
                  final String mes;

                  {
                    mes = Analyzer.cast(showPattern.apply(null == pt ? null : pt.pat));
                  }

                  public String apply() {
                    return Analyzer.cast(Primitives.concat.apply(Primitives.concat.apply(s, "="), mes));
                  }
                }.apply());
              }
              break;
            case BotPattern:
              if (TypicalSupport.match$2500(arg$2814)) {
                return Analyzer.cast("_|_");
              }
              break;
            case WildCardPattern:
              if (TypicalSupport.match$2497(arg$2814)) {
                return Analyzer.cast("_");
              }
              break;
            case ConstantPattern:
              if (TypicalSupport.match$2504(arg$2814)) {
                final TypicalTypes.value val = Analyzer.cast(arg$2814.getTuple().get1());

                return Analyzer.cast(new Match<String>() {
                  public String apply() {
                    final TypicalTypes.value arg$2819 = Analyzer.cast(val);

                    if ((null == arg$2819)) {
                      return null;
                    }
                    if ((null != arg$2819))
                                            switch (arg$2819.tag()) {
                      case IntValue:
                        if (TypicalSupport.match$2776(arg$2819)) {
                          final BigInteger i = Analyzer.cast(arg$2819.getTuple().get1());

                          return Analyzer.cast(Primitives.itos.apply(i));
                        }
                        break;
                      case StringValue:
                        if (TypicalSupport.match$2778(arg$2819)) {
                          final String s = Analyzer.cast(arg$2819.getTuple().get1());

                          return Analyzer.cast(s);
                        }
                        break;
                      case FloatValue:
                        if (TypicalSupport.match$2777(arg$2819)) {
                          final Double f = Analyzer.cast(arg$2819.getTuple().get1());

                          return Analyzer.cast(Primitives.ftos.apply(f));
                        }
                        break;
                      case BoolValue:
                        if (TypicalSupport.match$2743(arg$2819)) {
                          final Boolean b = Analyzer.cast(arg$2819.getTuple().get1());

                          return Analyzer.cast(null == b ? null : b ? "true" : "false");
                        }
                        break;
                      default:
                        break;
                      };
                    return null;
                  }
                }.apply());
              }
              break;
            case VariablePattern:
              if (TypicalSupport.match$2499(arg$2814)) {
                return Analyzer.cast("_");
              }
              break;
            case ConstructorPattern:
              if (TypicalSupport.match$2518(arg$2814)) {
                final String s = Analyzer.cast(arg$2814.getTuple().get1());
                final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2814.getTuple().get2());

                return Analyzer.cast(new Let<String>() {
                  final String mes;

                  {
                    mes = Analyzer.cast(showPatternRecords.apply(pl));
                  }

                  public String apply() {
                    return Analyzer.cast(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(s, "("), mes), ")"));
                  }
                }.apply());
              }
              break;
            case RecPattern:
              if (TypicalSupport.match$2530(arg$2814)) {
                final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2814.getTuple().get1());

                return Analyzer.cast(new Let<String>() {
                  final String mes;

                  {
                    mes = Analyzer.cast(showPatternRecords.apply(pl));
                  }

                  public String apply() {
                    return Analyzer.cast(Primitives.concat.apply(Primitives.concat.apply("{", mes), "}"));
                  }
                }.apply());
              }
              break;
            case PairPattern:
              if (TypicalSupport.match$2526(arg$2814)) {
                final TypicalTypes.patternRecord hd = Analyzer.cast(arg$2814.getTuple().get1());
                final TypicalTypes.patternRecord tl = Analyzer.cast(arg$2814.getTuple().get2());

                return Analyzer.cast(new Let<String>() {
                  final String mes1;
                  final String mes2;

                  {
                    mes1 = Analyzer.cast(showPattern.apply(null == hd ? null : hd.pat));
                    mes2 = Analyzer.cast(showPattern.apply(null == tl ? null : tl.pat));
                  }

                  public String apply() {
                    return Analyzer.cast(Primitives.concat.apply(Primitives.concat.apply(Primitives.concat.apply(mes1, "::("), mes2), ")"));
                  }
                }.apply());
              }
              break;
            case TupPattern:
              if (TypicalSupport.match$2514(arg$2814)) {
                final Pair<TypicalTypes.patternRecord> pl = Analyzer.cast(arg$2814.getTuple().get1());

                return Analyzer.cast(new Let<String>() {
                  final String mes;

                  {
                    mes = Analyzer.cast(showPatternRecords.apply(pl));
                  }

                  public String apply() {
                    return Analyzer.cast(Primitives.concat.apply(Primitives.concat.apply("(", mes), ")"));
                  }
                }.apply());
              }
              break;
            default:
              break;
            };
          if (true) {
            return Analyzer.cast(null);
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<String, Pair<TypicalTypes.pattern>> showPatterns = new Function.F1<String, Pair<TypicalTypes.pattern>>() {
    public String apply(final Pair<TypicalTypes.pattern> pl) {
      return new Match<String>() {
        public String apply() {
          final Pair<TypicalTypes.pattern> arg$2832 = Analyzer.cast(pl);

          if ((null == arg$2832)) {
            return null;
          }
          if (TypicalSupport.match$2721(arg$2832)) {
            return Analyzer.cast("");
          }
          if (TypicalSupport.match$2834(arg$2832)) {
            final TypicalTypes.pattern x = Analyzer.cast(arg$2832.get(0));

            return Analyzer.cast(showPattern.apply(x));
          }
          if ((null != arg$2832 && !((Pair)arg$2832).isEmpty())) {
            final Pair<TypicalTypes.pattern> list$2835 = Analyzer.cast(arg$2832);
            final TypicalTypes.pattern x = Analyzer.cast(Primitives.wrapHead(list$2835));
            final Pair<TypicalTypes.pattern> xs = Analyzer.cast(Primitives.wrapTail(list$2835));

            return Analyzer.cast(new Let<String>() {
              final String me;
              final String mes;

              {
                me = Analyzer.cast(showPattern.apply(x));
                mes = Analyzer.cast(showPatterns.apply(xs));
              }

              public String apply() {
                return Analyzer.cast(Primitives.concat.apply(me, mes));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };

  final Function.F1<String, Pair<TypicalTypes.patternRecord>> showPatternRecords = new Function.F1<String, Pair<TypicalTypes.patternRecord>>() {
    public String apply(final Pair<TypicalTypes.patternRecord> pl) {
      return new Match<String>() {
        public String apply() {
          final Pair<TypicalTypes.patternRecord> arg$2837 = Analyzer.cast(pl);

          if ((null == arg$2837)) {
            return null;
          }
          if (TypicalSupport.match$2475(arg$2837)) {
            return Analyzer.cast("");
          }
          if (TypicalSupport.match$2839(arg$2837)) {
            final TypicalTypes.patternRecord x = Analyzer.cast(arg$2837.get(0));

            return Analyzer.cast(showPattern.apply(null == x ? null : x.pat));
          }
          if ((null != arg$2837 && !((Pair)arg$2837).isEmpty())) {
            final Pair<TypicalTypes.patternRecord> list$2840 = Analyzer.cast(arg$2837);
            final TypicalTypes.patternRecord x = Analyzer.cast(Primitives.wrapHead(list$2840));
            final Pair<TypicalTypes.patternRecord> xs = Analyzer.cast(Primitives.wrapTail(list$2840));

            return Analyzer.cast(new Let<String>() {
              final String me;
              final String mes;

              {
                me = Analyzer.cast(showPattern.apply(null == x ? null : x.pat));
                mes = Analyzer.cast(showPatternRecords.apply(xs));
              }

              public String apply() {
                return Analyzer.cast(Primitives.concat.apply(Primitives.concat.apply(me, ","), mes));
              }
            }.apply());
          }
          return null;
        }
      }.apply();
    }
  };
}
