Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Purescript without Node" - purescript-prelude compilation error #14

Closed
rzetterberg opened this issue Dec 28, 2016 · 4 comments
Closed

Comments

@rzetterberg
Copy link

When following the Purescript without Node guide, I get a compilation error of one of the dependencies:

purescript-test/dependencies/purescript-prelude/src/Prelude.purs line 41, column 10 - line 41, column 10

  Unable to parse module:
  unexpected $
  expecting "type", qualifier, identifier or proper name

Using the following environment:

$ psc --version
0.9.3

$ cd ../purescript-prelude/
$ git log -n 1 --decorate=short
commit 5e1d34f6ee771a436286a0335c5de80343dfa6be (HEAD, tag: v0.1.0)
Merge: bfe859a f5d8b7c
Author: Gary Burgess <gary.burgess@gmail.com>
Date:   Sun Jun 14 12:46:33 2015 +0100

    Merge pull request #29 from hdgarrood/ord-docs

    Ord docs

$ cd dependencies/purescript-console/
$ git log -n 1 --decorate=short
commit d6654ac2b846982375c58d0b8829b495bc4d6b69 (HEAD, tag: v0.1.0-rc.1, tag: v0.1.0)
Author: Gary Burgess <gary.burgess@gmail.com>
Date:   Sat Jun 6 14:30:38 2015 +0100

    Updates for RC

$ cd ../purescript-eff/
$ git log -n 1 --decorate=short
commit df0abe075321c660321e6aefcdff53052ced620f (HEAD, tag: v0.1.0-rc.2, tag: v0.1.0)
Merge: 1f48316 5038b75
Author: Phil Freeman <paf31@cantab.net>
Date:   Tue Jun 9 11:38:44 2015 -0700

    Merge pull request #3 from purescript/class

    Move MonadEff over

I'm using the Main.purs from the guide:

module Main where

import Control.Monad.Eff.Console (log)

main = log "Hello, World!"

The reason I reported this bug here is because I suspect that the problem is merely a version mismatch between the compiler and the dependencies.

This is the first time I'm using purescript, so I thought you'd be interested in a use case where this problem is encountered, from a documentation point of view.

@hdgarrood
Copy link
Collaborator

You are correct, your version of psc is out of date and most likely that's what's causing the problem. Please install the compiler via one of the methods listed at http://www.purescript.org/download/ to ensure you get an up-to-date version. How did you install the compiler, incidentally?

@LiamGoodacre
Copy link
Member

Also the guide is specifying old library versions: v0.1.0. The libraries are currently on 2.x.x

@rzetterberg
Copy link
Author

rzetterberg commented Dec 29, 2016

@hdgarrood I'm using NixOS (unstable), so I installed the purescript haskell package.

The NixOS haskell package set is automatically generated from hackage. It's strange, because on hackage purescript is version 0.10.3 but in the NixOS package set the version is 0.9.3 (even though the set was updated 16 hours ago).

Anyway, I will get the latest version and try again. Thanks for the help!

@hdgarrood
Copy link
Collaborator

Ah, right. AFAIK NixOS follows Stackage LTS, which is a continuously updated series of sets of Haskell packages which are known to build together and therefore does not always have the latest versions of everything. At the moment, the version of PureScript in there is indeed 0.9.3 so I think that would explain it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants