Why can't I compile with the -dynamic option?

Viewed 122

I am very much beginning with Haskell and, following a video, I tried the following:

stack ghc -- -dynamic test.hs

The following error message was generated:

test.hs:1:1: error:
    Failed to load interface for `Prelude'
    Perhaps you haven't installed the "dyn" libraries for package `base-4.9.1.0'?
    Use -v to see a list of the files searched for.

I tried to use -v as suggested but that did not help.

A similar command without -dynamic works fine but generates a much larger executable file:

stack ghc test.hs

Any suggestions on how to fix this?

(This is under Windows 10).

1 Answers
Related