package l3;



//
// Node -> Read -> ReadName \
//              -> Write    / WriteName
//      -> Apply

public interface Nodes {
    public interface Node {
        public interface App extends Node { }
        public interface Lam extends Node { }
        public interface Var extends Node { }
    }

    public interface Read { // as a namespace
        public interface App extends Node.App {
            Node getLeft();
            Node getRight();
        }
        public interface Lam extends Node.Lam {
            Node getBody();
        }
        public interface Var extends Node.Var {
        }
    }

    public interface ReadName {
        public interface App extends Read.App {
        }
        public interface Lam extends Read.Lam {
            String getParam();
        }
        public interface Var extends Read.Var {
            String getName();
        }
    }

    public interface Write {
        public interface App extends Read.App {
            void setLeft(Node node);
            void setRight(Node node);
        }
        public interface Lam extends Read.Lam {
            void setBody(Node node);
        }
        public interface Var extends Read.Var {
        }
    }

    public interface WriteName {
        public interface App extends ReadName.App, Write.App {
        }
        public interface Lam extends ReadName.Lam, Write.Lam {
            void setParam(String param);
        }
        public interface Var extends ReadName.Var, Write.Var {
            void setName(String name);
        }
    }

    public interface Apply {
        public interface App extends Node.App {
            Node apply();
        }
        public interface Lam extends Node.Lam {
            Node apply(Node arg);
        }
        public interface Var extends Node.Var {
        }
    }

    public interface Factory {
        public Read.App newApp(Node left, Node right);
        public Read.Lam newLam(String param, Node body);
        public Read.Var newVar(String name);
    }
}

@@ -124,31 +124,24 @@
 Nodes %7B%0A    
-public 
 interface No
@@ -145,39 +145,32 @@
  Node %7B%0A        
-public 
 interface App ex
@@ -184,39 +184,32 @@
 ode %7B %7D%0A        
-public 
 interface Lam ex
@@ -223,39 +223,32 @@
 ode %7B %7D%0A        
-public 
 interface Var ex
@@ -265,39 +265,32 @@
  %7B %7D%0A    %7D%0A%0A    
-public 
 interface Read %7B
@@ -308,39 +308,32 @@
 mespace%0A        
-public 
 interface App ex
@@ -416,39 +416,32 @@
       %7D%0A        
-public 
 interface Lam ex
@@ -495,39 +495,32 @@
       %7D%0A        
-public 
 interface Var ex
@@ -549,39 +549,32 @@
    %7D%0A    %7D%0A%0A    
-public 
 interface ReadNa
@@ -578,39 +578,32 @@
 dName %7B%0A        
-public 
 interface App ex
@@ -629,39 +629,32 @@
       %7D%0A        
-public 
 interface Lam ex
@@ -711,39 +711,32 @@
       %7D%0A        
-public 
 interface Var ex
@@ -795,39 +795,32 @@
    %7D%0A    %7D%0A%0A    
-public 
 interface Write 
@@ -821,39 +821,32 @@
 Write %7B%0A        
-public 
 interface App ex
@@ -947,39 +947,32 @@
       %7D%0A        
-public 
 interface Lam ex
@@ -1035,39 +1035,32 @@
       %7D%0A        
-public 
 interface Var ex
@@ -1089,39 +1089,32 @@
    %7D%0A    %7D%0A%0A    
-public 
 interface WriteN
@@ -1119,39 +1119,32 @@
 eName %7B%0A        
-public 
 interface App ex
@@ -1185,39 +1185,32 @@
       %7D%0A        
-public 
 interface Lam ex
@@ -1292,39 +1292,32 @@
       %7D%0A        
-public 
 interface Var ex
@@ -1400,39 +1400,32 @@
    %7D%0A    %7D%0A%0A    
-public 
 interface Apply 
@@ -1426,39 +1426,32 @@
 Apply %7B%0A        
-public 
 interface App ex
@@ -1503,39 +1503,32 @@
       %7D%0A        
-public 
 interface Lam ex
@@ -1592,31 +1592,24 @@
   %7D%0A        
-public 
 interface Va
@@ -1650,23 +1650,16 @@
  %7D%0A%0A    
-public 
 interfac
@@ -1674,31 +1674,24 @@
 y %7B%0A        
-public 
 Read.App new
@@ -1722,31 +1722,24 @@
 t);%0A        
-public 
 Read.Lam new
@@ -1776,23 +1776,16 @@
         
-public 
 Read.Var

remove "public" in interface declarations