kosmikus / lhs2tex

Preprocessor for typesetting Haskell sources with LaTeX
Other
99 stars 28 forks source link

Manifold installation woes #88

Closed goldfirere closed 10 months ago

goldfirere commented 2 years ago

I have found myself unable to install, despite lots of different approaches. I have GHC 8.10.5 and cabal-install 3.4.0.0.

This hums along for a bit, and then fails with a parse error in HsLexer:

src/HsLexer.lhs:75:39: error:
    parse error on input ‘-- |impossible "string"|’
   |
75 | > string (TeX _ _)              =  "" -- |impossible "string"|
   |      

The problem is that the comment looks like a Haddock comment, but isn't one.

This yields only

cabal: Error: Could not find module: Version with any suffix:
["gc","chs","hsc","x","y","ly","cpphs","hs","lhs","hsig","lhsig"]. If the
module is autogenerated it should be added to 'autogen-modules'.

which I have no idea what to do with.

I think the solution might simply be to get rid of comments that look Haddocky but aren't. Failing that, maybe increase the requirements on base so users know they need GHC 9?

anfelor commented 1 year ago

On my M1 Mac I got the current master branch (at commit 34301bed0a895691631ab3acd61808411fae0711) to build with:

> export C_INCLUDE_PATH="`xcrun --show-sdk-path`/usr/include/ffi"
> stack init
> stack build
> stack install

The first line is from https://gitlab.haskell.org/ghc/ghc/-/issues/20592#note_391266 stack init selected lts-19.26 which uses GHC 9.0.2

alexiscott commented 1 year ago

stack init stack build stack install

Using stack worked well for me. I wasn't able to get far with cabal install lhs2tex.

kosmikus commented 10 months ago

I've added working CI and made a new release officially compatible with various GHC versions. Sorry for the trouble all of you've had getting this to work in the past.

goldfirere commented 9 months ago

Thanks, Andres!