use fnType everywhere to create function types
This commit is contained in:
parent
a8260f2afb
commit
6023efc295
10 changed files with 33 additions and 27 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { fnType } from "../function_registry.js";
|
||||
import {Type, Function} from "../metacircular.js";
|
||||
|
||||
import {Bool, Int} from "./symbols.js";
|
||||
|
|
@ -6,10 +7,10 @@ export const addInt = x => y => x + y;
|
|||
export const mulInt = x => y => x * y;
|
||||
export const eqInt = x => y => x === y;
|
||||
|
||||
const Int_to_Int = {in: Int, out: Int };
|
||||
const Int_to_Bool = {in: Int, out: Bool};
|
||||
export const Int_to_Int_to_Int = {in: Int, out: Int_to_Int};
|
||||
export const Int_to_Int_to_Bool = {in: Int, out: Int_to_Bool};
|
||||
const Int_to_Int = fnType({in: Int, out: Int });
|
||||
const Int_to_Bool = fnType({in: Int, out: Bool});
|
||||
export const Int_to_Int_to_Int = fnType({in: Int, out: Int_to_Int});
|
||||
export const Int_to_Int_to_Bool = fnType({in: Int, out: Int_to_Bool});
|
||||
|
||||
|
||||
export const ModuleInt = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue