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 doesn't have Builtins or Prelude packages available #33994

Closed
changlinli opened this issue Jan 18, 2018 · 6 comments
Closed

Idris doesn't have Builtins or Prelude packages available #33994

changlinli opened this issue Jan 18, 2018 · 6 comments
Labels
0.kind: bug 0.kind: regression Something that worked before working no longer

Comments

@changlinli
Copy link
Contributor

Issue description

When I run idris I get the following message:

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

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

The crucial part is the first two lines, which means that I don't have the ability to actually use any of standard library (e.g. 1 + 1 fails out).

This appears to be something akin to #7014 popping up again.

It also looks like asking Idris to list the available libraries blows up.

idris --listlibs
Uncaught error: /nix/store/y75ay6zfi5l20zkqnld1q81zw0arsfbg-idris-1.2.0-data/share/ghc-8.2.2/x86_64-linux-ghc-8.2.2/idris-1.2.0/libs/: getDirectoryContents:openDirStream: does not exist (No such file or directory)

Steps to reproduce

Install the haskellPackages.idris package. Then run idris from the command line. You should see the Can't find import Builtins... message.

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

 - system: `"x86_64-linux"`
 - host os: `Linux 4.9.75, NixOS, 18.03.git.3a763b9 (Impala)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 1.11.16`
 - channels(root): `""`
 - nixpkgs: `/etc/nixos/nixpkgs`

Note that version of nixpkgs being used is in the host os name, 3a763b9

@MP2E MP2E added 0.kind: bug 0.kind: regression Something that worked before working no longer labels Jan 19, 2018
@MP2E
Copy link

MP2E commented Jan 19, 2018

Can confirm, same behavior on my machine, not sure on what causes this yet.

@pjgoodall
Copy link

pjgoodall commented Feb 20, 2018

This is a me-too

  • system: "x86_64-linux"
  • host os: Linux 4.4.0-112-generic, Ubuntu, 16.04.3 LTS (Xenial Xerus)
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 1.11.16
  • channels(ubuntu): "nixpkgs-18.03pre128510.c64639b54ca"
  • nixpkgs: /home/ubuntu/.nix-defexpr/channels/nixpkgs

@arianvp
Copy link
Member

arianvp commented Mar 29, 2018

I can confirm this as well. Anybody got an idea how we could go and fix this?

@tekul
Copy link

tekul commented Apr 1, 2018

I had this issue too. Just installing idris as a haskell package doesn't add the libraries - strace shows it checking for a lib directory which doesn't exist. I reinstalled my haskell packages without idris and then ran

nix-env -f "<nixpkgs>" -i idris

and it now works (it no longer gives that error message and I can see functions from the prelude in the repl). My nixpkgs is at 26db731.

I noticed there were some commits related to refactoring idris modules earlier this year, which may be related.

@changlinli
Copy link
Contributor Author

Oh that's interesting... so idris is now a top-level package? Yeah If just install idris instead of haskellPackages.idris everything works fine. I don't know if it's a priority to make haskellPackages.idris actually work, but just installing idris is fine for me, so I'm willing to close this issue if this is a known way of how haskellPackages is supposed to work.

@comonoid
Copy link

comonoid commented May 31, 2018

install idris instead of haskellPackages.idris

Works for me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 0.kind: regression Something that worked before working no longer
Projects
None yet
Development

No branches or pull requests

7 participants