Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrading problems with Cabal #245

Closed
rw111 opened this issue Jul 8, 2023 · 3 comments
Closed

upgrading problems with Cabal #245

rw111 opened this issue Jul 8, 2023 · 3 comments
Assignees
Labels
faq User question

Comments

@rw111
Copy link

rw111 commented Jul 8, 2023

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

  • alex (program)
    Synopsis: Alex is a tool for generating lexical analysers in Haskell
    Versions available: 2.2, 2.3.3, 2.3.4, 2.3.5, 3.1.7, 3.2.5, 3.2.6, 3.3.0.0,
    3.4.0.0 (and 27 others)
    Versions installed: [ Unknown ]
    Homepage: http://www.haskell.org/alex/
    Bug reports: https://github.com/haskell/alex/issues
    Description: Alex is a tool for generating lexical analysers in Haskell.
    It takes a description of tokens based on regular expressions
    and generates a Haskell module containing code for scanning
    text efficiently. It is similar to the tool lex or flex for
    C/C++.
    Category: Development
    License: BSD3
    Author: Chris Dornan and Simon Marlow
    Maintainer: https://github.com/haskell/alex
    Source repo: https://github.com/haskell/alex.git
    Executables: alex
    Dependencies: base >=2.1 && <5, array, containers, directory, base, process
    Cached: Yes

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
Copy link
Member

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.

@andreasabel andreasabel added the faq User question label Jul 9, 2023
@rw111
Copy link
Author

rw111 commented Jul 9, 2023

Yes, that was it. Thanks.

@andreasabel
Copy link
Member

Great!

@andreasabel andreasabel self-assigned this Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
faq User question
Projects
None yet
Development

No branches or pull requests

2 participants