Skip to content

There's no way to evaluate defs for q::lastTrace in the REPL #544

Open
@bugarela

Description

@bugarela

The REPL is great for doing trace evaluation at low implementation cost. I was trying it out yesterday and I found it frustrating that I couldn't get the value of my defs and vals over the trace.

I wrote:

q::lastTrace.foldl(List(), (acc, state) => acc.append(projectState(state)))

but projectState has to be a pure operator that manipulates the state record, since it has no actual access to read the variables from each state.

It would be great to have a more user-friendly way of evaluating/projecting traces (that is, without requiring foldl) that allows projecting the values of defs and vals

Workaround

I can rewrite any def operator as a pure def operator that receives the state (or part of it) as a parameter, and then use the pure def in the projection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions