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

Unknown module Data.Function, etc. #12

Closed
mationai opened this issue Jul 5, 2016 · 8 comments
Closed

Unknown module Data.Function, etc. #12

mationai opened this issue Jul 5, 2016 · 8 comments

Comments

@mationai
Copy link

mationai commented Jul 5, 2016

Getting 6 errors trying to compile fib.purs sample code.

I have created a proj dir, and created src/ and packages/ in there. git cloned all packages listed in https://github.com/andyarvanitis/pure11/wiki/Packages in projdir/packages/, where * packages are cloned from https://github.com/pure11. When I run make, I got:

Compiling Data.Validation.Semigroup
Compiling Data.Profunctor
Compiling Data.Profunctor.Closed
Compiling Data.Monoid
Compiling Data.Functor.Invariant
Compiling Data.Bifunctor
Compiling Control.Monad.ST
Compiling Test.Assert
Compiling Control.Lazy
Compiling Control.Extend
Compiling Control.Alt
Error 1 of 6:

  in module Data.Monoid
  at packages/purescript-monoid/src/Data/Monoid.purs line 6, column 1 - line 7, column 1

    Unknown module Data.Function


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

Error 2 of 6:

  in module Data.Functor.Invariant
  at packages/purescript-invariant/src/Data/Functor/Invariant.purs line 3, column 1 - line 4, column 1

    Unknown module Data.Function


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

Error 3 of 6:

  in module Data.Bifunctor
  at packages/purescript-bifunctors/src/Data/Bifunctor.purs line 3, column 1 - line 18, column 1

    Unknown module Control.Category


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

Error 4 of 6:

  in module Control.Lazy
  at packages/purescript-control/src/Control/Lazy.purs line 3, column 1 - line 10, column 1

    Unknown module Data.Unit


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

Error 5 of 6:

  in module Control.Extend
  at packages/purescript-control/src/Control/Extend.purs line 9, column 1 - line 11, column 1

    Unknown module Control.Category


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

Error 6 of 6:

  in module Control.Alt
  at packages/purescript-control/src/Control/Alt.purs line 6, column 1 - line 7, column 1

    Unknown module Data.Functor


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.


make: *** [codegen] Error 1

please advised, thanks.

@andyarvanitis
Copy link
Owner

Sorry, I should have specified in the docs that only the packages from the https://github.com/pure11 repos are guaranteed to work. The others (from the purescript or other repos) are changing at their own pace right now (since pure11 isn't officially part of purescript). Also, purescript-function was missing from the list, so I just added it now.

@mationai
Copy link
Author

mationai commented Jul 5, 2016

Adding purescript-functions changed error from "unknown module Data.Function" to "unknown module Data.Functor". I've added all remainding "functor" packages: functor-products, functor-coproducts and still the same. Here's the new error for reference:

Compiling Data.Function
Compiling Data.Profunctor
Compiling Data.Validation.Semigroup
Compiling Data.Bifunctor
Compiling Data.Profunctor.Closed
Compiling Data.Monoid
Compiling Data.Functor.Invariant
Compiling Control.Lazy
Compiling Control.Extend
Compiling Control.Alt
Error 1 of 6:

  in module Data.Functor.Invariant
  at packages/purescript-invariant/src/Data/Functor/Invariant.purs line 4, column 1 - line 15, column 1

    Unknown module Data.Functor


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

Error 2 of 6:

  in module Data.Monoid
  at packages/purescript-monoid/src/Data/Monoid.purs line 7, column 1 - line 8, column 1

    Unknown module Data.Semigroup


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

Error 3 of 6:

  in module Data.Bifunctor
  at packages/purescript-bifunctors/src/Data/Bifunctor.purs line 3, column 1 - line 18, column 1

    Unknown module Control.Category


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

Error 4 of 6:

  in module Control.Lazy
  at packages/purescript-control/src/Control/Lazy.purs line 3, column 1 - line 10, column 1

    Unknown module Data.Unit


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

Error 5 of 6:

  in module Control.Extend
  at packages/purescript-control/src/Control/Extend.purs line 9, column 1 - line 11, column 1

    Unknown module Control.Category


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

Error 6 of 6:

  in module Control.Alt
  at packages/purescript-control/src/Control/Alt.purs line 6, column 1 - line 7, column 1

    Unknown module Data.Functor

@andyarvanitis
Copy link
Owner

Unfortunately, adding more non-pure11 packages to your project will only make it worse. If you just want to try the basics (like the fib.purs sample), try using only these packages (from the pure11 repos):

  • purescript-eff
  • purescript-prelude
  • purescript-assert
  • purescript-st
  • purescript-console
  • purescript-functions

@mationai
Copy link
Author

mationai commented Jul 6, 2016

Ok, with only above packages, it compiles. So at this project's current state, must the user manually add and remove dependencies? If so, it will make it an unmanageable dev environment.

Also, say if dependencies are fixed so it's auto managed or no longer errors, the following simple print of concat array errored for me after adding -arrays and -maybe packages from pure11:

module Main where
  import Prelude
  import Data.Array
  import Control.Monad.Eff.Console

  main = do
    print (concat [[1, 2, 3], [4, 5], [6]])

Error message:

Compiling Prelude
Compiling Control.Lazy
Compiling Control.Extend
Compiling Control.Alt
Compiling Control.Monad.Eff
Compiling Data.Function
Compiling Control.Monad.Eff.Class
Compiling Control.Monad.Eff.Console
Compiling Control.Monad.Eff.Console.Unsafe
Compiling Control.Monad.Eff.Unsafe
Compiling Control.Monad.ST
Compiling Data.Array.ST
Error 1 of 4:

  in module Data.Array.ST
  at packages/purescript-arrays/src/Data/Array/ST.purs line 22, column 1 - line 31, column 1

    Unknown module Data.Maybe


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

Error 2 of 4:

  in module Control.Lazy
  at packages/purescript-control/src/Control/Lazy.purs line 3, column 1 - line 10, column 1

    Unknown module Data.Unit


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

Error 3 of 4:

  in module Control.Extend
  at packages/purescript-control/src/Control/Extend.purs line 9, column 1 - line 11, column 1

    Unknown module Control.Category


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

Error 4 of 4:

  in module Control.Alt
  at packages/purescript-control/src/Control/Alt.purs line 6, column 1 - line 7, column 1

    Unknown module Data.Functor


  See https://github.com/purescript/purescript/wiki/Error-Code-UnknownModule for more information,
  or to contribute content related to this error.

@andyarvanitis
Copy link
Owner

The goal is certainly to do much better than that for the end-user -- eventually the same facilities as regular PureScript. It's just not there yet; this backend is still experimental, and there were major breaking changes in PureScript 0.9 that it still needs to catch up to. Also, the pure11-specific packages should go away altogether once the baseline has its FFI portions merged into it.

@mationai
Copy link
Author

mationai commented Jul 6, 2016

Got it. Thank you so much for your help and pushing this project forward.

@andyarvanitis
Copy link
Owner

Thanks for checking it out!

@andyarvanitis
Copy link
Owner

The packages listed on the wiki are valid again (https://github.com/andyarvanitis/pure11/wiki/Packages), so closing this issue now.

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

2 participants