greatly simplified app
This commit is contained in:
parent
9c0c2dab90
commit
35d1034c67
8 changed files with 156 additions and 204 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import {getType, getInst, getSymbol, Double, Int, symbolFunction, symbolProduct, symbolSum, symbolDict, symbolSet, symbolList, eqType, match, getLeft, getRight, dict} from "dope2";
|
||||
import {getType, getInst, getSymbol, Double, Int, symbolFunction, symbolProduct, symbolSum, symbolDict, symbolSet, symbolList, eqType, match, getLeft, getRight, dict, Bool} from "dope2";
|
||||
|
||||
import "./Value.css";
|
||||
|
||||
|
|
@ -11,6 +11,9 @@ export function Value({dynamic}) {
|
|||
if (eqType(type)(Int)) {
|
||||
return <ValueInt val={inst}/>;
|
||||
}
|
||||
if (eqType(type)(Bool)) {
|
||||
return <ValueBool val={inst}/>;
|
||||
}
|
||||
|
||||
const symbol = getSymbol(type);
|
||||
switch (symbol) {
|
||||
|
|
@ -48,6 +51,9 @@ function ValueInt({val}) {
|
|||
function ValueFunction() {
|
||||
return <>𝑓𝑛 </>;
|
||||
}
|
||||
function ValueBool({val}) {
|
||||
return <span className="valuePrimitive">{val.toString()}</span>;
|
||||
}
|
||||
// function Sum({val, elemType}) {
|
||||
// return
|
||||
// }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue