Variable not in scope: defaultUserHooks :: UserHooks

Viewed 141

I am trying to install readline package in a stack project. I have installed ghc-8.10.4 in stack folder and in package.yaml i got 'readline' in dependencies and i got this error

 readline needed, but the stack configuration has no specified version  (latest matching version is 1.0.3.0)
needed since EasyTime is a build target.

Some different approaches to resolving this:

  * Recommended action: try adding the following to your extra-deps in /home/lucas/FACULTAD/ALP/DSLEasyTime/EasyTime/stack.yaml:

- readline-1.0.3.0@sha256:db011062b90fbfbbc8b02666d835742c1d4de1f990a89fc056ef8082f3e3cba0,912

So i added this recommendation in stack.yaml, in extra-deps and when stack builds the library it throws the following error

readline>   
readline> /tmp/stack-5e6b18c39fb4dc96/readline-1.0.3.0/Setup.hs:6:29: error:
readline>     Variable not in scope: defaultUserHooks :: UserHooks
readline>   |
readline> 6 | main = defaultMainWithHooks defaultUserHooks
readline>   |  

I don't have any idea what would be. I didn't find any solution on internet. Could you please help?

Thanks

1 Answers

The Haskell package "readline" is very very old (7 years) and not compatible with the current version of Cabal.

For similar functionality in a currently maintained package, check out "haskeline" instead.

Related