// Path: src/main/java/org/hummingbirdlang/types/scope/Scope.java
// public interface Scope {
//   // Loose visitor pattern: scopes accept visitors; if they have the name the
//   // resolution is looking for then they push themselves onto the path and
//   // assign the type, otherwise they push themselves onto the path and
//   // recurse to their parent scope.
//   public void accept(Resolution resolution) throws NameNotFoundException;
// 
//   public Resolution resolve(String name) throws NameNotFoundException;
// 
//   // Get the type for the given name. Should create a `Resolution` and call
//   // the `accept` recursion under the hood.
//   public Type get(String name) throws NameNotFoundException;
// 
//   public void setLocal(String name, Type type);
// 
//   public Scope getParent();
// 
//   // Close the scope to prevent further modifications.
//   public void close();
// 
//   // Returns whether or not the scope has been closed.
//   public boolean isClosed();
// 
//   // Should only be called on closed scopes.
//   public List<Resolution> getNonLocalResolutions();
// }


import org.hummingbirdlang.types.scope.Scope;
import com.oracle.truffle.api.CallTarget;
package org.hummingbirdlang.types;



public final class FunctionType extends ConcreteType {
  private final Type[] parameterTypes;
  private final Type returnType;
  private final String name;
  private final CallTarget callTarget;
  // Scope where the function was declared.
  private Scope declarationScope;
  // Scope inside the function (ie. of its block).
// Path: src/main/java/org/hummingbirdlang/types/scope/Scope.java
// public interface Scope {
//   // Loose visitor pattern: scopes accept visitors; if they have the name the
//   // resolution is looking for then they push themselves onto the path and
//   // assign the type, otherwise they push themselves onto the path and
//   // recurse to their parent scope.
//   public void accept(Resolution resolution) throws NameNotFoundException;
// 
//   public Resolution resolve(String name) throws NameNotFoundException;
// 
//   // Get the type for the given name. Should create a `Resolution` and call
//   // the `accept` recursion under the hood.
//   public Type get(String name) throws NameNotFoundException;
// 
//   public void setLocal(String name, Type type);
// 
//   public Scope getParent();
// 
//   // Close the scope to prevent further modifications.
//   public void close();
// 
//   // Returns whether or not the scope has been closed.
//   public boolean isClosed();
// 
//   // Should only be called on closed scopes.
//   public List<Resolution> getNonLocalResolutions();
// }


// Path: src/main/java/org/hummingbirdlang/types/FunctionType.java
import org.hummingbirdlang.types.scope.Scope;
import com.oracle.truffle.api.CallTarget;

package org.hummingbirdlang.types;



public final class FunctionType extends ConcreteType {
  private final Type[] parameterTypes;
  private final Type returnType;
  private final String name;
  private final CallTarget callTarget;
  // Scope where the function was declared.
  private Scope declarationScope;
  // Scope inside the function (ie. of its block).
  private Scope ownScope;