Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add :def command to REPL for Juvix term definitions #2072

Closed
jonaprieto opened this issue May 10, 2023 · 1 comment · Fixed by #2119
Closed

Add :def command to REPL for Juvix term definitions #2072

jonaprieto opened this issue May 10, 2023 · 1 comment · Fixed by #2119
Assignees
Labels
enhancement New feature or request repl
Milestone

Comments

@jonaprieto
Copy link
Collaborator

jonaprieto commented May 10, 2023

Introduce a new REPL command, :inspect, followed by a symbol name, allowing users to view and learn the actual Juvix term definition for the specified symbol, and possibly descovering nice treasures in the process. Feel free to suggest a better name for the command, perhaps :def, or :term.

A session might look like this:

Juvix REPL version 0.3.3
Stdlib.Prelude> 1
1
Stdlib.Prelude> :t 1
Nat
Stdlib.Prelude> :inspect Nat
builtin nat
type Nat :=
  | zero : Nat
  | suc : Nat → Nat;

Similarly as posted in:

We might want to consider adding this as a helper subcommand.

  • Name this :def
@jonaprieto jonaprieto added enhancement New feature or request repl labels May 10, 2023
@jonaprieto jonaprieto added this to the 0.4 - Prague milestone May 10, 2023
@janmasrovira janmasrovira self-assigned this May 23, 2023
@janmasrovira janmasrovira linked a pull request May 23, 2023 that will close this issue
@jonaprieto jonaprieto changed the title Add :inspect command to REPL for Juvix term definitions Add :def command to REPL for Juvix term definitions May 26, 2023
@jonaprieto jonaprieto linked a pull request Jun 1, 2023 that will close this issue
@jonaprieto
Copy link
Collaborator Author

Closed by

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request repl
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants