$ cabal install shellcheck cabal: The program 'ghc' version >=6.4 is required but the version of /usr/local/bin/ghc could not be determined.
Trying to execute
$ /usr/local/bin/ghc /usr/local/haskell/ghc-8.0.1-x86_64/lib/ghc-8.0.1/bin/ghc: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
Which is interesting, considering it's not even a dynamic executable:
$ ldd /usr/local/bin/ghc not a dynamic executable
Anyway, the error can be fixed by symlinking ncurses library to the missing library (do as root):
ln -s /usr/lib64/libncurses.so.5 /usr/lib64/libtinfo.so.5
The command is for the 64-bit version. The 32-bit Slackware should have paths starting with
/usr/lib. Cabal started working after this fix and allowed to install ShellCheck successfully.