Browse Source

removed old function that was not being used

pull/6/head
nisstyre56 11 years ago
parent
commit
0e1927705b
  1. 57
      representation.js

57
representation.js

@ -164,24 +164,16 @@ function If(condition, thenexp, elseexp) {
function TypeVar(name) { function TypeVar(name) {
this.name = name; this.name = name;
this.exprType = "TypeVariable";
return this; return this;
} }
function TypeOp(name) { function TypeOp(name, params, body) {
this.name = name; this.name = name;
this.val = name; this.params = params;
this.exprType = "TypeOperator" this.body = body;
return this; return this;
} }
//convenience function to construct binary operators
//assumes that the identifier refers to the name of a primitive
//operation
function makeBin(ident) {
return new OpT(new FuncT (new Name("a"), new FuncT(new Name("b"), new App(new App(ident, "a"), "b"))));
}
//Applies the function ``name'' to the list of parameters //Applies the function ``name'' to the list of parameters
function makeApp(name, parameters) { function makeApp(name, parameters) {
if (parameters) { if (parameters) {
@ -206,28 +198,27 @@ function makeGensym() {
var gensym = makeGensym(); var gensym = makeGensym();
OPInfo = {"+" : [4, "Left"], OPInfo = {"+" : [3, "Left"],
"-" : [4, "Left"], "-" : [3, "Left"],
"*" : [5, "Left"], "*" : [4, "Left"],
"/" : [5, "Left"], "/" : [4, "Left"],
"^" : [6, "Right"], "^" : [5, "Right"],
"++" : [4, "Left"], "++" : [3, "Left"],
"==" : [3, "Left"], "==" : [2, "Left"],
">" : [3, "Left"], ">" : [2, "Left"],
">=" : [3, "Left"], ">=" : [2, "Left"],
"<" : [3, "Left"], "<" : [2, "Left"],
"<=" : [3, "Left"], "<=" : [2, "Left"],
"&&" : [3, "Left"], "&&" : [2, "Left"],
"||" : [3, "Left"], "||" : [2, "Left"],
"::" : [1, "Left"], "::" : [2, "Left"],
":" : [2, "Left"], ":" : [1, "Left"],
"$" : [2, "Left"], "$" : [1, "Left"],
">>" : [2, "Left"], ">>" : [1, "Left"],
">>=" : [2, "Left"], ">>=" : [1, "Left"],
"<$>" : [2, "Left"], "<$>" : [1, "Left"],
"." : [2, "Left"], "." : [1, "Left"],
"," : [2, "Left"], "," : [1, "Left"]};
"->" : [2, "Right"]}
module.exports = module.exports =
{ IntT : IntT, { IntT : IntT,

Loading…
Cancel
Save