I installed the MinGHC distribution but it did not solve the problem.
To install ghc-mod I had to:
1) cabal install ghc-mod
to install what cabal can build without errors.
2) Modify the cabal file of ansiterminal according to Roman's advice. It installed successfully.
3) Modify the cabal file of lifted-base where I removed the Include-dirs and Includes directives and all references to inlinable.h from the source files.
cabal reports that it can not find the header file or it is damaged.
The file exists in the include directory but even with