Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Show the rule/equation it will use for the next step #17

Open
anka-213 opened this issue Apr 3, 2021 · 1 comment
Open

Show the rule/equation it will use for the next step #17

anka-213 opened this issue Apr 3, 2021 · 1 comment

Comments

@anka-213
Copy link

anka-213 commented Apr 3, 2021

For example, in this example from the blog post

Prev Next (step 1, next step: apply enumFromTo)

case enumFromTo 1 3 of { 
      []    -> 0
      x:xs' -> length (1 + 0) xs'
}

It would be very neat to also see the definition of enumFromTo and a note of what the values are. Something like this:

Will apply enumFromTo, with n = 1 and m = 3:
enumFromTo = (\n -> \m ->
  if le n m then Cons n (@enumFromTo (add n 1) m)
            else Nil
)

This should probably be a separate feature request but it would also be very helpful to highlight the parts of the code where the rule will be applied. In particular when the next step is selecting a branch of a case expression. To be extra clear, we could highlight the parameters of the rule with different colours.

@edsko
Copy link
Collaborator

edsko commented Dec 20, 2023

#22 add highlighting of the term in the heap that will take a step (but not the exact rule).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants