haskell / alex

A lexical analyser generator for Haskell
https://hackage.haskell.org/package/alex
BSD 3-Clause "New" or "Revised" License
297 stars 82 forks source link

upgrading problems with Cabal #245

Closed rw111 closed 1 year ago

rw111 commented 1 year ago

The following command line conversation with Cabal shows that I can't use it to upgrade Alex. I don't use Haskell very often and need it only to install other software for which Alex is a dependency, so apologies if I have missed something that is obvious. As I see it it just doesn't succeed in upgrading Alex.

robert@robert-HP:~$ cabal --version cabal-install version 3.10.1.0 compiled using version 3.10.1.0 of the Cabal library

robert@robert-HP:~$ cabal info alex

robert@robert-HP:~$ alex --version Alex version 3.2.5, (c) 2003 Chris Dornan and Simon Marlow

robert@robert-HP:~$ cabal install alex-3.4.0.0 --overwrite-policy=always Resolving dependencies... Symlinking 'alex' to '/home/robert/.cabal/bin/alex'

robert@robert-HP:~$ alex --version Alex version 3.2.5, (c) 2003 Chris Dornan and Simon Marlow

andreasabel commented 1 year ago

This looks like a PATH problem. Have you tried which alex? You need ~/.cabal/bin in your PATH before the entry that supplies the ghc-shipped alex.

rw111 commented 1 year ago

Yes, that was it. Thanks.

andreasabel commented 1 year ago

Great!