'Having trouble compiling with ghc (installed packages aren't found in path) with ghcup and cabal on Mac
I'm having trouble compiling my Hakyll site (I know it compiles; the issues is ghc can't find modules that I've installed via cabal (and both of these cleanly installed recently via ghcup). I'm on a new M1 MacBook Pro which I'm guessing is contributing to this problem.
The error upon ghc --make site.hs: Could not find module ‘Hakyll’ and the same for Pandoc and other modules.
More info:
I've installed ghc and cabal via ghcup, which are found at /Users/isaac/.ghcup/bin/ghc and /Users/isaac/.ghcup/bin/cabal. The Pandoc and Hakyll modules are found in ~/.cabal/packages/hackage.haskell.org.
ghc -v gives me the following:
isaac@machine notes % ghc -v
Glasgow Haskell Compiler, Version 8.10.7, stage 2 booted by GHC version 8.10.3
*** initializing package database:
Using binary package database: /Users/isaac/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/package.conf.d/package.cache
package flags []
loading package database /Users/isaac/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/package.conf.d
wired-in package ghc-prim mapped to ghc-prim-0.6.1
wired-in package integer-wired-in mapped to integer-gmp-1.0.3.0
wired-in package base mapped to base-4.14.3.0
wired-in package rts mapped to rts
wired-in package template-haskell mapped to template-haskell-2.16.0.0
wired-in package ghc mapped to ghc-8.10.7
!!! initializing package database: finished in 9.01 milliseconds, allocated 8.229 megabytes
*** Deleting temp files:
Deleting:
*** Deleting temp dirs:
Deleting:
ghc: no input files
Usage: For basic information, try the `--help' option.```
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
