hakaru-dev / hakaru

A probabilistic programming language
BSD 3-Clause "New" or "Revised" License
309 stars 30 forks source link

Error in installing #207

Open PoorvaGarg opened 2 years ago

PoorvaGarg commented 2 years ago

I am trying to install hakaru using the steps described on the link: https://hakaru-dev.github.io/intro/installation/ I am facing the following issue

error:
        Not in scope: data constructor ‘ReplOpts’
        |
    134 |         $ evalReplOpts $ ReplOpts

hakaru/haskell/Language/Hakaru/Repl.hs:135:12: error:
        Not in scope: ‘banner’
        Perhaps you meant ‘binder’ (imported from Language.Hakaru.Syntax.ABT)
        |
    135 |          { banner           = const (pure ">>> ")
        |            ^^^^^^

Any help for resolving this would be appreciated

JacquesCarette commented 2 years ago

What version of Haskell are you using?

PoorvaGarg commented 2 years ago

I am using GHC 8.6.5

zaxtax commented 2 years ago

I actually suspect this is due to us having too loose bounds on the version of repline we install. @PoorvaGarg can you say which version of repline cabal is giving you?

PoorvaGarg commented 2 years ago

I am using repline 0.4.0.0

zaxtax commented 2 years ago

Alright, let me investigate this and follow-up

zaxtax commented 2 years ago

Oh @PoorvaGarg I forgot to ask. Did you use the stack or cabal instructions?

PoorvaGarg commented 2 years ago

I used stack instructions

zaxtax commented 2 years ago

Ok, I think this is due to the stack lts release in our config not having the latest version of repline. I got the following warning:

Downloaded ghc-tinfo6-8.6.4.
rts-1.0: Warning: .:464:1: The field "hugs-options" is deprecated. hugs isn't supported anymore Installed GHC.
WARNING: Ignoring hakaru's bounds on repline (>=0.4); using repline-0.2.0.0.

I just bumped stack.yaml to use the latest 8.x GHC release. Hopefully, it works now for you.

zaxtax commented 2 years ago

@PoorvaGarg Did that fix things?

PoorvaGarg commented 2 years ago

This did not work for me. I got the following output to stack install

Downloading lts-18.28 build plan ...
RedownloadInvalidResponse Request {
  host                 = "raw.githubusercontent.com"
  port                 = 443
  secure               = True
  requestHeaders       = []
  path                 = "/fpco/lts-haskell/master//lts-18.28.yaml"
  queryString          = ""
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}
zaxtax commented 2 years ago

@PoorvaGarg I think you tried to install this while Github was itself not working well. Did you try again later?