haskell / haskell/haskell-language-server

evaluate plugin error hPutChar: invalid argument (cannot encode character '\8216') related to #3841

Open
#3,924 2 comments 0 reactions 0 assignees View on GitHub
component: hls-eval-plugin type: bug
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
2d 19h
Merged PRs (30d)
11

Description

## intro
so this issue was resolved in #3841 but came back after update using ghcup .
the global GHC_CHARENC=GHC_NO_UNICODE solution is stil active and I did verify using
`stack exec -- env | grep GHC_CHARENC
GHC_CHARENC=GHC_NO_UNICODE`
in both stack project that var is active .

## Issue description :
Your environment
Which OS do you use?
windows 10

Which version of GHC do you use and how did you install it?

`stack exec ghc -- --version`
The Glorious Glasgow Haskell Compilation System, version 9.6.3 ==> this version gives me the error

!! but #3841
`stack ghc -- --version`
The Glorious Glasgow Haskell Compilation System, version 9.4.7 and this was resolved and still works.

### How is your project built (alternative: link to the project)?
`stack build`

### Which LSP client (editor/plugin) do you use?

vscode latest + extension Haskell v2.4.2

### Which version of HLS do you use and how did you install it?
no idea but :
`hls --version`
bash: hls: command not found.

`ghcup list`
says it is installed

### Have you configured HLS in any way (especially: a hie.yaml file)?
no

## Steps to reproduce
### step 1

`stack new project`

the working stack.yaml :

``` text
# resolver: https://example.com/snapshots/2018-01-01.yaml
resolver:
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/15.yaml
```
-> stack.yaml : stack snapshot with the isseu is
```
# resolver: https://example.com/snapshots/2023-01-01.yaml
resolver:
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/4.yaml
```

### step 2 :
open lib.hs

add evaluation

-- >>> someFunc

Expected behaviour
-- >>> someFunc
-- someFunc

Actual behaviour
-- >>> someFunc
-- : hPutChar: invalid argument (cannot encode character '\8216')

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.