Closed nrdmn closed 3 years ago
I've encountered an issue with haskeline on Apple Silicon Mac, where Ctrl-a (moveToStart) doesn't move the cursor properly. Fortunately, this PR seems to fix it, so I want this to be merged soon.
Great catch, @nrdmn!
@judah , it would be great to have this fixed soon so we can ship the fix with GHC 9.0.2 and 9.2.1.
@bgamari I've released this as terminfo-0.4.1.5.
Could someone summarize for mere mortals (who simply just use ghcup and expect things to work) how we can get this fix? It might be possible that upgrading GHC will cut it, but...
How can I install the new version of terminfo?
I tried cabal install terminfo-0.4.1.5
, which apparently succeeds, but checking cabal info terminfo
or ghc-pkg list
it still says my installed version is terminfo-0.4.1.4
...
@onnoeberhard
If you have a .cabal
file, you can add terminfo >= 0.4.1.5
to the build-depends
. If you don't actually need a direct dependency on terminfo
, you can add the constraint to your cabal.project
file, i.e.
constraints: terminfo >= 0.4.1.5
For cabal repl
, just add the option --constraint 'terminfo >= 0.4.1.5'
.
Thanks @sjakobi. I think I must be doing something wrong though. I tried cabal install terminfo --constraint 'terminfo >= 0.4.1.5'
, and it again "succeeded", but still cabal info terminfo
shows me only that version 0.4.1.4 is installed. I want to install the new version to fix a bug with ghci, but maybe that is not possible and I just have to update ghc itself..
@onnoeberhard Yeah, I think cabal info
simply shows the version that is bundled with your GHC installation.
To get a GHCi that is built with terminfo-0.4.1.5
, it's probably easiest to install a GHC that bundles this version, e.g. GHC 9.2.* or 9.0.2. See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history.
The ccall calling convention doesn't support varargs functions, so switch to capi instead. See https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/ffi.html#varargs-not-supported-by-ccall-calling-convention