File from assignment has import Haskell stack does not recognize

80 Views Asked by At

I got a download file from my University for one of my assignments, it has an import Criterion.Main that my version of stack does not recognize

I tried updating my Stack and cabal, added

#!/usr/bin/env stack

to the beginning of my file, and tried running stack fib2.hs (the name of the file with the problematic import), but this only got me these error messages:

stack: WARNING! Expecting stack options comment at line 1, column 1
stack: WARNING! Missing or unusable Stack options specification
stack: WARNING! Using runghc without any additional Stack options
Executable named sh not found on path: [Path]

the file itself had

stack --resolver lts-11.10 script --optimize

put in there by my uni, but when I try to run this I get another error:

Missing: FILE

Usage: stack.exe script [--package PACKAGE] FILE
                    [-- ARGUMENT(S) (e.g. stack script X.hs -- argument(s) to program).]
                    [--compile | --optimize] [--[no-]use-root]
                    [--ghc-options OPTIONS] [--extra-dep PACKAGE-VERSION]
                    [--no-run] [--setup-info-yaml URL]
                    [--snapshot-location-base URL] [--help]

Run a Stack script

What am I doing wrong?

0

There are 0 best solutions below