move 'env' from state to context
This commit is contained in:
parent
9ef160aeb7
commit
f09261df93
13 changed files with 178 additions and 148 deletions
9
src/EnvContext.ts
Normal file
9
src/EnvContext.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { createContext } from "react";
|
||||
import { getDefaultTypeParser, module2Env, ModuleStd } from "dope2";
|
||||
|
||||
const mkType = getDefaultTypeParser();
|
||||
export const extendedEnv = module2Env(ModuleStd.concat([
|
||||
["functionWith3Params", { i: i => j => k => i + j + k, t: mkType("Int->Int->Int->Int") }],
|
||||
]));
|
||||
|
||||
export const EnvContext = createContext(extendedEnv);
|
||||
Loading…
Add table
Add a link
Reference in a new issue