I am linking to a similar question in which the person seemed to get it working. However, with the instructions I have followed nothing seems to work to get Haskell running.
System: Ubuntu 22.04
1) sudo apt install ghc
2) sudo apt install haskell-stack
3) sudo apt install cabal-install
4) stack new my-project
5) cd my-project
6) stack setup
7) stack build
8) stack exec my-project-exe
9) cabal init
10) cabal build
11) cabal run
I went into package.yaml and added genprog as a dependency:
dependencies:
- base >= 4.7 && < 5
- genprog
Ran
1) stack build
2) import GenProg
3) cabal init
4) cabal ucabal install --only-dependencies
pdate
5) stack build
However, I get this error:
stack build
Writing implicit global project config file to: /home/jonny/.stack/global-project/stack.yaml
Note: You can change the snapshot via the resolver field there.
HttpExceptionRequest Request {
host = "s3.amazonaws.com"
port = 443
secure = True
requestHeaders = [("Accept","application/json"),("User-Agent","The Haskell Stack")]
path = "/haddock.stackage.org/snapshots.json"
queryString = ""
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
(StatusCodeException (Response {responseStatus = Status {statusCode = 404, statusMessage = "Not Found"}, responseVersion = HTTP/1.1, responseHeaders = [("x-amz-request-id","S641EJDM5PG7K97D"),("x-amz-id-2","odmFBOYokfiL4Yv8ot2xUw4JWDdpEtjSQx8JzCZFgvbIzbZiH8kl4rJAUI3N7mOuTxIA9XqbcYk="),("Content-Type","application/xml"),("Transfer-Encoding","chunked"),("Date","Tue, 06 Aug 2024 04:15:23 GMT"),("Server","AmazonS3")], responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}) "<?xml version="1.0" encoding="UTF-8"?>n<Error><Code>NoSuchBucket</Code><Message>The specified bucket does not exist</Message><BucketName>haddock.stackage.org</BucketName><RequestId>S641EJDM5PG7K97D</RequestId><HostId>odmFBOYokfiL4Yv8ot2xUw4JWDdpEtjSQx8JzCZFgvbIzbZiH8kl4rJAUI3N7mOuTxIA9XqbcYk=</HostId></Error>")