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

Create hnix-repl #164

Closed
jwiegley opened this issue Apr 10, 2018 · 2 comments
Closed

Create hnix-repl #164

jwiegley opened this issue Apr 10, 2018 · 2 comments
Assignees
Labels
enhancement Betterness, without new explicit feature possibilities help wanted When someone explicitly requests for help

Comments

@jwiegley
Copy link
Member

No description provided.

@jwiegley jwiegley added help wanted When someone explicitly requests for help challenging May require somewhat complex changes; not recommend if you aren't familiar with the codebase enhancement Betterness, without new explicit feature possibilities labels Apr 10, 2018
@jwiegley
Copy link
Member Author

I've added code for providing a repl in the file main/Repl.hs. This code was written by Stephen Diehl and Kwang Yul Seo, which they released under an MIT license as the project poly_constraints:

The code is being added to hnix right now as mainly a placeholder, as it will need to be modified before it can be used.

@jwiegley jwiegley removed the challenging May require somewhat complex changes; not recommend if you aren't familiar with the codebase label Apr 12, 2018
@jwiegley jwiegley self-assigned this Apr 12, 2018
@jwiegley
Copy link
Member Author

jwiegley commented Apr 12, 2018

The basic REPL now works. Here's what needs to happen next

  • Allow establishing "x = y" definitions, and then pushing a scope around subsequent evaluations (there's a note showing where to do this) that causes free references to 'x' to get bound to 'y'.

  • Define it to always be the last-thing-evaluted.

  • Allow loading in files, both from command-line and using :load, and using that thing -- if it evaluates to an attr set -- as the current scope.

  • Allow a mode where evaluations only force to HNF before printing. Right now they are forced to normal form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Betterness, without new explicit feature possibilities help wanted When someone explicitly requests for help
Projects
None yet
Development

No branches or pull requests

1 participant