haskellghcchocolateyghcup# Replacing an old version of ghc (installed with choco) with the newest ghc (installed with ghcup)

I had ghc 8.10.1 (on Windows 10) that I installed back when choco was the recommended installation option. Now I wanted to update ghc and heard that ghcup is the new preferred way to install. I used ghcup according to the instructions and, as far as I can understand, the process concluded successfully without errors.

Here is a part of `ghcup list`

:

```
X ghc 8.10.1 base-4.14.0.0
X ghc 8.10.2 base-4.14.1.0
X ghc 8.10.3 base-4.14.1.0
X ghc 8.10.4 base-4.14.1.0
X ghc 8.10.5 base-4.14.2.0
X ghc 8.10.6 base-4.14.3.0
IS ghc 8.10.7 recommended,base-4.14.3.0
X ghc 9.0.1 base-4.15.0.0
X ghc 9.0.2 base-4.15.1.0
X ghc 9.2.1 base-4.16.0.0
X ghc 9.2.2 base-4.16.1.0
X ghc 9.2.3 latest,base-4.16.2.0
```

However, `ghc --version`

is still 8.10.1. Where might the installation have gone wrong and what can I do to get the newest versions of everything (including cabal and stack)?

Solution

The issue was fixed by adding `C:\ghcup\bin`

to Path and moving it to the top. It seems that I had everything installed - it just wasn't added to Path.

I suppose that instead of moving the new path to the top I could have removed the old path but I wasn't sure what needed to be removed and didn't want to risk removing anything useful.

- Comparing lists in Haskell
- Is there a non-identity monad morphism M ~> M that is monadically natural in M?
- Problem with loading module ‘Distribution.Simple’
- Improving efficiency in Stirling numbers calculation
- Does sequencing an infinite list of IO actions by definition result in a never-ending action? Or is there a way to bail out?
- How to call pgQuery from postgresql-query?
- How to avoid whitespace after a tag (link) in Hamlet templates?
- Understanding type-directed resolution in Haskell with existential types
- Why is seq bad?
- Understanding bind function in Haskell
- How to create route that will trigger on any path in Servant?
- How do I use a global state in WAI middleware?
- nixos 23.11 cabal install mysql-simple problem - "Missing (or bad) C libraries"
- Is there a way to kill all forked threads in a GHCi session without restarting it?
- Why can an invalid list expression such as 2:1 be assigned to a variable, but not printed?
- Iterate over a type level list and call a function based on each type in the list
- How does this solution of Project Euler Problem 27 in the Haskell Wiki work?
- Why `Monad` is required to use `pure`?
- Can't do partial function definitions in GHCi
- recommended way to convert Double -> Float in Haskell
- Haskell profiling understanding cost centre summary for anonymous lambda
- Why is Haskell fully declarative?
- GHC Generating Redundant Core Operations
- Question about Event firing in reflex-frp
- Using Haskell's "Maybe", type declarations
- How can I elegantly invert a Map's keys and values?
- Why there is no output for wrapped IO in Haskell?
- What are the definitions of Weather and Memory in xmobar repo?
- Serializing a Data.Text value to a ByteString without unnecessary \NUL bytes
- Using Haskell with VS Code