Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown module Data.List in psci

Tags:

purescript

I installed purescript with brew

$ brew install purescript

No problems there. when i boot up the PSCI repl and do this:

import Data.List

I get

Error in module $PSCI:
Unknown module Data.List

What am i doing wrong?

UPDATE

I started up psci with pulp

$ pulp psci

Now when I try to import Data.List I get:

  Cannot unify type
    Control.Monad.Eff.Eff
  with type
    Prim.Function

Wtf?

UPDATE

Reinstalled purescript with npm

$ npm install -g purescript pulp

same problem. HELP.

like image 629
dopatraman Avatar asked Dec 14 '22 12:12

dopatraman


2 Answers

It seems you are missing the purescript-lists package.

Using pulp you can do the following:

mkdir myProject
cd myProject
pulp init
pulp dep install purescript-lists
pulp psci
> import Data.List
> toList [1,2,3]
Cons (1) (Cons (2) (Cons (3) (Nil)))
like image 175
Christoph Hegemann Avatar answered Feb 11 '23 19:02

Christoph Hegemann


bower install purescript-lists

This worked for me

like image 20
Vamshi Avatar answered Feb 11 '23 21:02

Vamshi