]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/elaboration/constraints/Reduction.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / elaboration / constraints / Reduction.java
1 package org.simantics.scl.compiler.internal.elaboration.constraints;
2
3 import org.simantics.scl.compiler.elaboration.expressions.Expression;
4 import org.simantics.scl.compiler.top.SCLCompilerConfiguration;
5 import org.simantics.scl.compiler.types.TPred;
6 import org.simantics.scl.compiler.types.Type;
7
8 class Reduction {
9     Expression generator;
10     Type[] parameters;
11     TPred[] demands;
12     
13     public Reduction(Expression generator, Type[] parameters, TPred[] demands) {
14         if(SCLCompilerConfiguration.DEBUG) {
15             if(generator == null)
16                 throw new NullPointerException();
17             for(Type parameter : parameters)
18                 if(parameter == null)
19                     throw new NullPointerException();
20             for(Type demand : demands)
21                 if(demand == null)
22                     throw new NullPointerException();
23         }
24         this.generator = generator;
25         this.parameters = parameters;
26         this.demands = demands;
27     }
28 }