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

Add ob repl -c/--config option #1025

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

TravisCardwell
Copy link
Contributor

This option allows users to insert configuration into the .ghci file that is loaded by the REPL. It is up to the user to not insert commands that breaks things.

Example user .ghci file:

:set prompt      "\ESC[32;1mλ: \ESC[m"
:set prompt-cont "\ESC[32;1m : \ESC[m"
:set +t
:set +m
:set -XOverloadedStrings
:set -XScopedTypeVariables
:set -XTypeApplications

Example usage:

ob repl -c .ghci

I have:

  • Based work on latest develop branch
  • Followed the contribution guide
  • Looked for lint in my changes with hlint . (lint found code you did not write can be left alone)
  • Run the test suite: $(nix-build -A selftest --no-out-link) NOTE A number of tests fail in develop, before making changes. The ob repl tests do not, however, and these tests still pass with this commit.
    ob repl
      accepts stdin commands
      works with custom Prelude
    
  • Updated the changelog
  • (Optional) Run CI tests locally: nix-build release.nix -A build.x86_64-linux --no-out-link (or x86_64-darwin on macOS)

TravisCardwell and others added 2 commits March 22, 2023 15:51
This option allows users to insert configuration into the `.ghci` file
that is loaded by the REPL.  It is up to the user to not insert commands
that breaks things.

Example user `.ghci` file:

```
:set prompt      "\ESC[32;1mλ: \ESC[m"
:set prompt-cont "\ESC[32;1m : \ESC[m"
:set +t
:set +m
:set -XOverloadedStrings
:set -XScopedTypeVariables
:set -XTypeApplications
```

Example usage:

```
ob repl -c .ghci
```
@ali-abrar
Copy link
Member

Thanks

@ali-abrar ali-abrar merged commit 63824fc into obsidiansystems:develop Aug 3, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants