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

Idris shows "Can't find import Builtins/Prelude" #1

Open
ymtszw opened this issue Nov 2, 2017 · 2 comments
Open

Idris shows "Can't find import Builtins/Prelude" #1

ymtszw opened this issue Nov 2, 2017 · 2 comments

Comments

@ymtszw
Copy link

ymtszw commented Nov 2, 2017

$ asdf install idris 1.1.1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   339  100   339    0     0    729      0 --:--:-- --:--:-- --:--:--   730
100 69.0M  100 69.0M    0     0  2108k      0  0:00:33  0:00:33 --:--:-- 3197k
694129 blocks

$ idris
Can't find import Builtins
Can't find import Prelude
     ____    __     _
    /  _/___/ /____(_)____
    / // __  / ___/ / ___/     Version 1.1.1-git:5e0301c
  _/ // /_/ / /  / (__  )      http://www.idris-lang.org/
 /___/\__,_/_/  /_/____/       Type :? for help

Idris is free software with ABSOLUTELY NO WARRANTY.
For details type :warranty.

Cannot compile hello.idr from tutorial neither.

$ idris hello.idr -o hello
Can't find import Builtins
Can't find import Prelude
Can't find import Prelude

I am totally new to Idris so no clue around. Tell me if you need more info.

Eventually I just installed from homebrew and it just worked.

$ brew install idris
==> Downloading https://homebrew.bintray.com/bottles/idris-1.1.1.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring idris-1.1.1.sierra.bottle.tar.gz
🍺  /usr/local/Cellar/idris/1.1.1: 455 files, 228.6MB

$ idris
     ____    __     _
    /  _/___/ /____(_)____
    / // __  / ___/ / ___/     Version 1.1.1
  _/ // /_/ / /  / (__  )      http://www.idris-lang.org/
 /___/\__,_/_/  /_/____/       Type :? for help

Idris is free software with ABSOLUTELY NO WARRANTY.
For details type :warranty.
Idris>
Interrupt
Idris>
Bye bye

$ idris hello.idr -o hello

$ ./hello
Hello World!
@lpil
Copy link

lpil commented May 19, 2019

Is there no solution to this problem?

@chrrasmussen
Copy link

One workaround is to export an environment variable called IDRIS_LIBRARY_PATH (ref. https://github.com/idris-lang/Idris-dev/blob/9549d9cb9ac5922154f3a11504df7d2488f0cd72/src/IRTS/System.hs#L100).

On macOS and Idris 1.3.2 (released today) I added the following to my shell profile:

export IDRIS_LIBRARY_PATH="/Users/<user>/.asdf/installs/idris/1.3.2/share/x86_64-osx-ghc-8.6.3/idris-1.3.2/libs"

This solution is not ideal, especially if one wants to have multiple versions installed. In theory asdf could prepend this environment variable when executing the program, i.e. IDRIS_LIBRARY_PATH=<dynamically generated path> idris.

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

No branches or pull requests

3 participants