This commit is contained in:
Joeri Exelmans 2025-05-28 11:27:04 +02:00
parent dcd213102f
commit 2d95fdf07a
2 changed files with 2 additions and 7 deletions

View file

@ -49,11 +49,8 @@ function nestedInputProperties({state, setState, score, typeInfo}: CallBlockProp
} }
export function CallBlock(props: CallBlockProps) { export function CallBlock(props: CallBlockProps) {
const env = useContext(EnvContext);
const globalContext = useContext(GlobalContext); const globalContext = useContext(GlobalContext);
const addParam = getActions(globalContext, props.setState).c; const addParam = getActions(globalContext, props.setState).c;
// const [resolved] = evalExprBlock(props.state, env);
// return <span className={"functionBlock" + ((resolved.kind === "error") ? " unifyError" : "")}>
return <span className={"functionBlock"}> return <span className={"functionBlock"}>
<CallContext value={{addParam}}> <CallContext value={{addParam}}>
<FunctionHeader {...props} addParam={addParam} /> <FunctionHeader {...props} addParam={addParam} />
@ -64,9 +61,6 @@ export function CallBlock(props: CallBlockProps) {
{...props} {...props}
addParam={addParam} addParam={addParam}
/> />
{/* { (resolved.kind === "error") && resolved.e.toString()
|| (resolved.kind === "value") && <Value dynamic={resolved} />
|| "unknown" } */}
:: <TypeInfoBlock typeInfo={props.typeInfo} /> :: <TypeInfoBlock typeInfo={props.typeInfo} />
</div> </div>
</div> </div>

View file

@ -1,9 +1,10 @@
import { getHumanReadableName, getSymbol, prettySS, symbolDict, symbolDictIterator, symbolFunction, symbolList, symbolProduct, symbolSet, symbolSetIterator, symbolSum } from "dope2"; import { getHumanReadableName, getSymbol, prettySS, symbolDict, symbolDictIterator, symbolFunction, symbolList, symbolProduct, symbolSet, symbolSetIterator, symbolSum } from "dope2";
import "./Type.css";
import { ValueUnknown } from "./Value"; import { ValueUnknown } from "./Value";
import type { TypeInfo } from "../../eval/infer_type"; import type { TypeInfo } from "../../eval/infer_type";
import "./Type.css";
export function TypeInfoBlock({typeInfo}: {typeInfo: TypeInfo}) { export function TypeInfoBlock({typeInfo}: {typeInfo: TypeInfo}) {
return <span className="typeSignature mouseOver dropdownContainer"> return <span className="typeSignature mouseOver dropdownContainer">
<Type type={typeInfo.type}/> <Type type={typeInfo.type}/>