dnf install ghcThis installs 70 packages! I also see ghc9.8 available in the fedora packages. After doing this, I type
ghci GHCi, version 9.6.6: https://www.haskell.org/ghc/ :? for help ghci>So, I have ghc 9.6.6. I wonder why Fedora is not offering 9.8 as the default. Almost certainly there is a good reason,
I find a file "fibs.hs" in my Haskell directory with the following contents:
#!/usr/bin/runghc -- fibs = 0:1: zipWith (+) fibs (tail fibs) fibs = [0,1] ++ zipWith (+) fibs (tail fibs) main = putStrLn $ show $ take 10 fibsI run it via:
./fibs.hs 0,1,1,2,3,5,8,13,21,34]This looks correct.
As one last thing I type "ghc fibs.hs" --
ghc fibs.hs [1 of 2] Compiling Main ( fibs.hs, fibs.o ) [2 of 2] Linking fibs tom@trona:/u1/Projects/Haskell/2022$ ls fibs fibs.hi fibs.hs fibs.o fsdir.hs tom@trona:/u1/Projects/Haskell/2022$ ./fibs [0,1,1,2,3,5,8,13,21,34]So my install seems to work just fine.
Tom's Computer Info / tom@mmto.org