You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stack ghc is pretty much just an alias for stack exec ghc, with a bit of extra smarts to handle the --package flag. In other words, it does not use any cabal information at all, but will use the right GHC and package databases.
There's a PR in limbo state that tries adding something like this, see the discussion here - #1737 .
Anyway, the main problem is probably that your "foo.hs" is at the root dir of mwc-random and uses modules from it, and it lacks a src dir. This means that ghc will find these modules and try to compile them. Instead, put foo.hs in a subfolder. Then, you can do stack ghc foo.hs --package mwc-random (the --package part is only necessary if you don't want to first do a stack build)
Sorry, hit submit on accident... filling out details now
The text was updated successfully, but these errors were encountered: