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

Problem using H in Emacs #403

Open
djsamperi opened this issue Mar 1, 2023 · 0 comments
Open

Problem using H in Emacs #403

djsamperi opened this issue Mar 1, 2023 · 0 comments
Assignees
Labels

Comments

@djsamperi
Copy link
Contributor

Describe the bug
With some hacking I managed to get H to start in GNU Emacs, but the output is
buffered, so not seen. A typical session in Emacs looks like this
x = [r|sqrt(1:5)|]
p x

:t x
x :: MonadR m => ...

So the output from the type query appears, but the output from the p command does not.
If the program is now terminated with Ctrl-C the lost output of the p command appears, so
it was clearly buffered when it shouldn't be.

To Reproduce
Under Windows, I put the following in .ghci
set -fno-ghci-sandbox
:set -XDataKinds
:set -XGADTs
:set -XPartialTypeSignatures
:set -XOverloadedLists
:set -XQuasiQuotes
:set -XScopedTypeVariables
:set -XTemplateHaskell
:set -XViewPatterns

:set -i/w/dev/github/HaskellR/H/.stack-work/dist/8a54c84f/build/H/autogen

The last set is needed to prevent Paths_H autogen module from not
being found.

Now cd to HaskellR, run some trivial command to get Emacs Haskell
mode to start, and type into Haskell mote prompte:

:m +Language.R.Instance
:m +H.Prelude.Interactive as H.Prelude

initialize defaultConfig

Expected behavior
H mode should work like ghci mode with extra features for R.

Environment

  • Windows 11
  • 1.0.0 of HaskellR

Additional context
Initially I tried using this in .emacs.d/init.el:
(setq haskell-program-name "stack exec H")

This didn't work, perhaps because none of the
expected output was reaching the terminal
because of buffering.

@ConnorBaker ConnorBaker self-assigned this Mar 4, 2023
@ConnorBaker ConnorBaker added the bug label Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants