package nl.utwente.viskell.haskell.env;

import java.util.Collection;
import java.util.Collections;

import nl.utwente.viskell.haskell.type.Type;
import nl.utwente.viskell.ui.components.Block;

public abstract class FunctionInfo {

    /** The function name. */
    private final String name;
    
    /** The type signature the corresponding function. */
    private final Type signature;
    
    /** A set of required blocks for this function type */
    private final Collection<Block> requiredBlocks;

    /**
     * @param name The function name.
     * @param signature The type signature the corresponding function.
     */
    public FunctionInfo(String name, Type signature) {
        this.name = name;
        this.signature = signature;
        this.requiredBlocks = Collections.EMPTY_LIST;
    }

    /**
     * @param name The function name.
     * @param signature The type signature the corresponding function.
     * @param requiredBlocks A set of blocks required for this function type
     */
    protected FunctionInfo(String name, Type signature, Collection<Block> requiredBlocks) {
        this.name = name;
        this.signature = signature;
        this.requiredBlocks = requiredBlocks;
    }

    /** @return The internal name of this function. */
    public final String getName() {
        return this.name;
    }

    /** @return The name of this function used for the front-end. */
    public String getDisplayName() {
        return this.name;
    }

    /** @return The a fresh copy of type signature of this function. */
    public final Type getFreshSignature() {
        return this.signature.getFresh();
    }
    
    /** @return The required blocks for this function type */
    public Collection<Block> getRequiredBlocks() {
        return requiredBlocks;
    }

}
@@ -696,87 +696,25 @@
 this
-.name = name;%0A        this.signature = signature;%0A        this.requiredBlocks =
+(name, signature,
  Col
@@ -732,16 +732,17 @@
 PTY_LIST
+)
 ;%0A    %7D%0A
@@ -1392,33 +1392,33 @@
      return 
-this.n
+getN
 ame
+()
 ;%0A    %7D%0A%0A   
@@ -1735,8 +1735,9 @@
     %7D%0A%0A%7D
+%0A

Update FunctionInfo.java