Closed JulianBirch closed 10 years ago
Oh dear. It seems you don't have documentation for base
installed. Unfortunately it seems that base
is a bit special and consequently will likely need special handling. It would be nice if GHC were always packaged with the textbase for base. Did you install GHC with apt
?
I did. Maybe I need ghc-doc. Let me try it.
Let me know if that helps. It seems like we should deal with this situation a bit more gracefully. Another option would be to download the textbase for base
from Hackage.
Realizing ghc-doc is a bad idea, since it's for 7,6 GHC. I'll see if I can figure out the hackage approach.
I believe that hoogle data base
will retrieve a database from Hackage for base
and pop it in Hoogle's database
directory (~/.cabal/share/$PLATFORM/hoogle*/databases
.
Looks like base is there now, but I'm still getting the same errors :(
julian@Plato:~$ ls ~/.cabal/share/x86_64-linux-ghc-7.8.2/hoogle-4.2.35/databases/
base.dep base.hoo base.txt default.hoo default.txt downloads platform.txt
julian@Plato:~$ sudo env "PATH=$PATH" /home/julian/local/bin/hoogle-index
cabal: There is no package named 'rts'.
You may need to run 'cabal update' to get the latest list of available
packages.
Looking for /opt/ghc/7.8.2/share/doc/ghc/html/libraries/ghc-prim-0.3.1.0/ghc-prim.txt
Converting /tmp/textbase7692.txt
Converting textbase7692... done
Skipped 62 warnings in textbase7692
Looking for /opt/ghc/7.8.2/share/doc/ghc/html/libraries/integer-gmp-0.5.1.0/integer-gmp.txt
Converting /tmp/textbase7692.txt
Converting textbase7692... done
Looking for /opt/ghc/7.8.2/share/doc/ghc/html/libraries/base-4.7.0.0/base.txt
Unpacking to base-4.7.0.0/
Resolving dependencies...
Configuring base-4.7.0.0...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for WINDOWS platform... NO
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for long long... yes
checking for ANSI C header files... (cached) yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/stat.h... (cached) yes
checking sys/syscall.h usability... yes
checking sys/syscall.h presence... yes
checking for sys/syscall.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking sys/timers.h usability... no
checking sys/timers.h presence... no
checking for sys/timers.h... no
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking for sys/types.h... (cached) yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for unistd.h... (cached) yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking winsock.h usability... no
checking winsock.h presence... no
checking for winsock.h... no
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking sys/epoll.h usability... yes
checking sys/epoll.h presence... yes
checking for sys/epoll.h... yes
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking sys/eventfd.h usability... yes
checking sys/eventfd.h presence... yes
checking for sys/eventfd.h... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking for iswspace... yes
checking for lstat... yes
checking for clock_gettime in -lrt... yes
checking for clock_gettime... yes
checking for getclock... no
checking for getrusage... yes
checking for times... yes
checking for _chsize... no
checking for ftruncate... yes
checking for epoll_ctl... yes
checking for eventfd... yes
checking for kevent... no
checking for kevent64... no
checking for kqueue... no
checking for poll... yes
checking for unsetenv... yes
checking return type of unsetenv... int
checking Haskell type for char... Int8
checking Haskell type for signed char... Int8
checking Haskell type for unsigned char... Word8
checking Haskell type for short... Int16
checking Haskell type for unsigned short... Word16
checking Haskell type for int... Int32
checking Haskell type for unsigned int... Word32
checking Haskell type for long... Int64
checking Haskell type for unsigned long... Word64
checking Haskell type for long long... Int64
checking Haskell type for unsigned long long... Word64
checking Haskell type for float... Float
checking Haskell type for double... Double
checking Haskell type for ptrdiff_t... Int64
checking Haskell type for size_t... Word64
checking Haskell type for wchar_t... Int32
checking Haskell type for sig_atomic_t... Int32
checking Haskell type for clock_t... Int64
checking Haskell type for time_t... Int64
checking Haskell type for useconds_t... Word32
checking Haskell type for suseconds_t... Int64
checking Haskell type for dev_t... Word64
checking Haskell type for ino_t... Word64
checking Haskell type for mode_t... Word32
checking Haskell type for off_t... Int64
checking Haskell type for pid_t... Int32
checking Haskell type for gid_t... Word32
checking Haskell type for uid_t... Word32
checking Haskell type for cc_t... Word8
checking Haskell type for speed_t... Word32
checking Haskell type for tcflag_t... Word32
checking Haskell type for nlink_t... Word64
checking Haskell type for ssize_t... Int64
checking Haskell type for rlim_t... Word64
checking Haskell type for intptr_t... Int64
checking Haskell type for uintptr_t... Word64
checking Haskell type for intmax_t... Int64
checking Haskell type for uintmax_t... Word64
checking value of E2BIG... 7
checking value of EACCES... 13
checking value of EADDRINUSE... 98
checking value of EADDRNOTAVAIL... 99
checking value of EADV... 68
checking value of EAFNOSUPPORT... 97
checking value of EAGAIN... 11
checking value of EALREADY... 114
checking value of EBADF... 9
checking value of EBADMSG... 74
checking value of EBADRPC... -1
checking value of EBUSY... 16
checking value of ECHILD... 10
checking value of ECOMM... 70
checking value of ECONNABORTED... 103
checking value of ECONNREFUSED... 111
checking value of ECONNRESET... 104
checking value of EDEADLK... 35
checking value of EDESTADDRREQ... 89
checking value of EDIRTY... -1
checking value of EDOM... 33
checking value of EDQUOT... 122
checking value of EEXIST... 17
checking value of EFAULT... 14
checking value of EFBIG... 27
checking value of EFTYPE... -1
checking value of EHOSTDOWN... 112
checking value of EHOSTUNREACH... 113
checking value of EIDRM... 43
checking value of EILSEQ... 84
checking value of EINPROGRESS... 115
checking value of EINTR... 4
checking value of EINVAL... 22
checking value of EIO... 5
checking value of EISCONN... 106
checking value of EISDIR... 21
checking value of ELOOP... 40
checking value of EMFILE... 24
checking value of EMLINK... 31
checking value of EMSGSIZE... 90
checking value of EMULTIHOP... 72
checking value of ENAMETOOLONG... 36
checking value of ENETDOWN... 100
checking value of ENETRESET... 102
checking value of ENETUNREACH... 101
checking value of ENFILE... 23
checking value of ENOBUFS... 105
checking value of ENODATA... 61
checking value of ENODEV... 19
checking value of ENOENT... 2
checking value of ENOEXEC... 8
checking value of ENOLCK... 37
checking value of ENOLINK... 67
checking value of ENOMEM... 12
checking value of ENOMSG... 42
checking value of ENONET... 64
checking value of ENOPROTOOPT... 92
checking value of ENOSPC... 28
checking value of ENOSR... 63
checking value of ENOSTR... 60
checking value of ENOSYS... 38
checking value of ENOTBLK... 15
checking value of ENOTCONN... 107
checking value of ENOTDIR... 20
checking value of ENOTEMPTY... 39
checking value of ENOTSOCK... 88
checking value of ENOTTY... 25
checking value of ENXIO... 6
checking value of EOPNOTSUPP... 95
checking value of EPERM... 1
checking value of EPFNOSUPPORT... 96
checking value of EPIPE... 32
checking value of EPROCLIM... -1
checking value of EPROCUNAVAIL... -1
checking value of EPROGMISMATCH... -1
checking value of EPROGUNAVAIL... -1
checking value of EPROTO... 71
checking value of EPROTONOSUPPORT... 93
checking value of EPROTOTYPE... 91
checking value of ERANGE... 34
checking value of EREMCHG... 78
checking value of EREMOTE... 66
checking value of EROFS... 30
checking value of ERPCMISMATCH... -1
checking value of ERREMOTE... -1
checking value of ESHUTDOWN... 108
checking value of ESOCKTNOSUPPORT... 94
checking value of ESPIPE... 29
checking value of ESRCH... 3
checking value of ESRMNT... 69
checking value of ESTALE... 116
checking value of ETIME... 62
checking value of ETIMEDOUT... 110
checking value of ETOOMANYREFS... 109
checking value of ETXTBSY... 26
checking value of EUSERS... 87
checking value of EWOULDBLOCK... 11
checking value of EXDEV... 18
checking value of ENOCIGAR... -1
checking value of ENOTSUP... 95
checking value of SIGINT... 2
checking value of O_BINARY... 0
checking for library containing iconv... none required
checking for library containing locale_charset... no
checking size of struct MD5Context... 0
configure: creating ./config.status
config.status: creating base.buildinfo
config.status: creating include/HsBaseConfig.h
config.status: creating include/EventConfig.h
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
Top level:
attempting to use module ‘Prelude’ (./Prelude.hs) which is not loaded
Looking for /home/julian/.cabal/share/doc/x86_64-linux-ghc-7.8.2/extensible-exceptions-0.1.1.4/html/extensible-exceptions.txt
Unpacking to extensible-exceptions-0.1.1.4/
Resolving dependencies...
Configuring extensible-exceptions-0.1.1.4...
Running Haddock for extensible-exceptions-0.1.1.4...
Preprocessing library extensible-exceptions-0.1.1.4...
Haddock coverage:
100% ( 2 / 2) in 'Control.Exception.Extensible'
Documentation created:
dist/doc/html/extensible-exceptions/extensible-exceptions.txt
Installing textbase to /home/julian/.cabal/share/doc/x86_64-linux-ghc-7.8.2/extensible-exceptions-0.1.1.4/html/extensible-exceptions.txt
hoogle-index: /home/julian/.cabal/share/doc/x86_64-linux-ghc-7.8.2/extensible-exceptions-0.1.1.4/html/extensible-exceptions.txt: openBinaryFile: does not exist (No such file or directory)
julian@Plato:~$ ls ~/.cabal/share/x86_64-linux-ghc-7.8.2/hoogle-4.2.35/databases/
base.dep base.hoo base.txt default.hoo default.txt downloads platform.txt
I believe this is now fixed as of 2038ee2af1bc269c0114c3a4dfa542a8610f9468. There are a few more things I want to do before pushing a new release but if you want to verify that this is fixed in HEAD it would be greatly appreciated.
Okay, that's fixed that. Now when I run it, it takes a good while before ending with
Converting textbase12482... hoogle: src/Hoogle/Language/Haskell.hs:(199,1)-(210,38): Non-exhaustive patterns in function transType
Error while indexing Cabal: callProcess: hoogle "convert" "/tmp/textbase12482.txt" "/tmp/db12571.hoo" (exit 1): failed
Looking for /opt/ghc/7.8.2/share/doc/ghc/html/libraries/bin-package-db-0.0.0.0/bin-package-db.txt
cabal: There is no package named 'bin-package-db'.
You may need to run 'cabal update' to get the latest list of available
packages.
Error while indexing bin-package-db: Process cabal failed with error 1
Looking for /opt/ghc/7.8.2/share/doc/ghc/html/libraries/ghc-7.8.2/ghc.txt
cabal: There is no package named 'ghc'.
You may need to run 'cabal update' to get the latest list of available
packages.
Error while indexing ghc: Process cabal failed with error 1
Failed to build the following indexes:
PackageName "rts" Can't build documentation for rts
PackageName "ghc-prim" Can't build documentation for ghc-prim
PackageName "integer-gmp" Can't build documentation for integer-gmp
PackageName "pretty" callProcess: hoogle "convert" "/tmp/textbase12462.txt" "/tmp/db12467.hoo" (exit 1): failed
PackageName "bytestring" callProcess: hoogle "convert" "/tmp/textbase12463.txt" "/tmp/db12483.hoo" (exit 1): failed
PackageName "cryptohash" callProcess: hoogle "convert" "/tmp/textbase12464.txt" "/tmp/db12486.hoo" (exit 1): failed
PackageName "zlib" callProcess: hoogle "convert" "/tmp/textbase12465.txt" "/tmp/db12490.hoo" (exit 1): failed
PackageName "binary" callProcess: hoogle "convert" "/tmp/textbase12466.txt" "/tmp/db12493.hoo" (exit 1): failed
PackageName "crypto-api" callProcess: hoogle "convert" "/tmp/textbase12467.txt" "/tmp/db12509.hoo" (exit 1): failed
PackageName "vector" callProcess: hoogle "convert" "/tmp/textbase12468.txt" "/tmp/db12515.hoo" (exit 1): failed
PackageName "text" callProcess: hoogle "convert" "/tmp/textbase12469.txt" "/tmp/db12529.hoo" (exit 1): failed
PackageName "blaze-builder" callProcess: hoogle "convert" "/tmp/textbase12470.txt" "/tmp/db12530.hoo" (exit 1): failed
PackageName "blaze-markup" callProcess: hoogle "convert" "/tmp/textbase12471.txt" "/tmp/db12531.hoo" (exit 1): failed
PackageName "parsec" callProcess: hoogle "convert" "/tmp/textbase12472.txt" "/tmp/db12540.hoo" (exit 1): failed
PackageName "attoparsec" callProcess: hoogle "convert" "/tmp/textbase12473.txt" "/tmp/db12543.hoo" (exit 1): failed
PackageName "lens" callProcess: hoogle "convert" "/tmp/textbase12474.txt" "/tmp/db12554.hoo" (exit 1): failed
PackageName "xmlhtml" callProcess: hoogle "convert" "/tmp/textbase12475.txt" "/tmp/db12555.hoo" (exit 1): failed
PackageName "ansi-wl-pprint" callProcess: hoogle "convert" "/tmp/textbase12476.txt" "/tmp/db12557.hoo" (exit 1): failed
PackageName "optparse-applicative" callProcess: hoogle "convert" "/tmp/textbase12477.txt" "/tmp/db12558.hoo" (exit 1): failed
PackageName "aeson" callProcess: hoogle "convert" "/tmp/textbase12478.txt" "/tmp/db12559.hoo" (exit 1): failed
PackageName "heist" callProcess: hoogle "convert" "/tmp/textbase12479.txt" "/tmp/db12564.hoo" (exit 1): failed
PackageName "snap-core" callProcess: hoogle "convert" "/tmp/textbase12480.txt" "/tmp/db12566.hoo" (exit 1): failed
PackageName "Cabal" callProcess: hoogle "convert" "/tmp/textbase12481.txt" "/tmp/db12570.hoo" (exit 1): failed
PackageName "Cabal" callProcess: hoogle "convert" "/tmp/textbase12482.txt" "/tmp/db12571.hoo" (exit 1): failed
PackageName "bin-package-db" Process cabal failed with error 1
PackageName "ghc" Process cabal failed with error 1
Combining 90 databases
Hoogle not installed
(I do in fact have hoogle installed, just in a sandbox).
However, after all of that when I boot up hoogle it still fails to be able to look up id
.
Is the sandbox in question in PATH
?
It is, but there's some stuff messed up on the PATH
, so I've patched that up and trying a re-run.
Didn't help
Error while indexing Cabal: callProcess: hoogle "convert" "/tmp/textbase31886.txt" "/tmp/db31975.hoo" (exit 1): failed
Looking for /opt/ghc/7.8.2/share/doc/ghc/html/libraries/bin-package-db-0.0.0.0/bin-package-db.txt
cabal: There is no package named 'bin-package-db'.
You may need to run 'cabal update' to get the latest list of available
packages.
Error while indexing bin-package-db: Process cabal failed with error 1
Looking for /opt/ghc/7.8.2/share/doc/ghc/html/libraries/ghc-7.8.2/ghc.txt
cabal: There is no package named 'ghc'.
You may need to run 'cabal update' to get the latest list of available
packages.
Error while indexing ghc: Process cabal failed with error 1
Failed to build the following indexes:
PackageName "rts" Can't build documentation for rts
PackageName "ghc-prim" Can't build documentation for ghc-prim
PackageName "integer-gmp" Can't build documentation for integer-gmp
PackageName "pretty" callProcess: hoogle "convert" "/tmp/textbase31866.txt" "/tmp/db31871.hoo" (exit 1): failed
PackageName "bytestring" callProcess: hoogle "convert" "/tmp/textbase31867.txt" "/tmp/db31887.hoo" (exit 1): failed
PackageName "cryptohash" callProcess: hoogle "convert" "/tmp/textbase31868.txt" "/tmp/db31890.hoo" (exit 1): failed
PackageName "zlib" callProcess: hoogle "convert" "/tmp/textbase31869.txt" "/tmp/db31894.hoo" (exit 1): failed
PackageName "binary" callProcess: hoogle "convert" "/tmp/textbase31870.txt" "/tmp/db31897.hoo" (exit 1): failed
PackageName "crypto-api" callProcess: hoogle "convert" "/tmp/textbase31871.txt" "/tmp/db31913.hoo" (exit 1): failed
PackageName "vector" callProcess: hoogle "convert" "/tmp/textbase31872.txt" "/tmp/db31919.hoo" (exit 1): failed
PackageName "text" callProcess: hoogle "convert" "/tmp/textbase31873.txt" "/tmp/db31933.hoo" (exit 1): failed
PackageName "blaze-builder" callProcess: hoogle "convert" "/tmp/textbase31874.txt" "/tmp/db31934.hoo" (exit 1): failed
PackageName "blaze-markup" callProcess: hoogle "convert" "/tmp/textbase31875.txt" "/tmp/db31935.hoo" (exit 1): failed
PackageName "parsec" callProcess: hoogle "convert" "/tmp/textbase31876.txt" "/tmp/db31944.hoo" (exit 1): failed
PackageName "attoparsec" callProcess: hoogle "convert" "/tmp/textbase31877.txt" "/tmp/db31947.hoo" (exit 1): failed
PackageName "lens" callProcess: hoogle "convert" "/tmp/textbase31878.txt" "/tmp/db31958.hoo" (exit 1): failed
PackageName "xmlhtml" callProcess: hoogle "convert" "/tmp/textbase31879.txt" "/tmp/db31959.hoo" (exit 1): failed
PackageName "ansi-wl-pprint" callProcess: hoogle "convert" "/tmp/textbase31880.txt" "/tmp/db31961.hoo" (exit 1): failed
PackageName "optparse-applicative" callProcess: hoogle "convert" "/tmp/textbase31881.txt" "/tmp/db31962.hoo" (exit 1): failed
PackageName "aeson" callProcess: hoogle "convert" "/tmp/textbase31882.txt" "/tmp/db31963.hoo" (exit 1): failed
PackageName "heist" callProcess: hoogle "convert" "/tmp/textbase31883.txt" "/tmp/db31968.hoo" (exit 1): failed
PackageName "snap-core" callProcess: hoogle "convert" "/tmp/textbase31884.txt" "/tmp/db31970.hoo" (exit 1): failed
PackageName "Cabal" callProcess: hoogle "convert" "/tmp/textbase31885.txt" "/tmp/db31974.hoo" (exit 1): failed
PackageName "Cabal" callProcess: hoogle "convert" "/tmp/textbase31886.txt" "/tmp/db31975.hoo" (exit 1): failed
PackageName "bin-package-db" Process cabal failed with error 1
PackageName "ghc" Process cabal failed with error 1
Combining 90 databases
Hoogle not installed
I tried running one of the lines, got this:
julian@Plato:~$ hoogle "convert" "/tmp/textbase31886.txt" "/tmp/db31975.hoo"
Converting /tmp/textbase31886.txt
Converting textbase31886... hoogle: src/Hoogle/Language/Haskell.hs:(199,1)-(210,38): Non-exhaustive patterns in function transType
Anyway, way past time I went to sleep.
@JulianBirch ahh, you need a newer hoogle. The latest hoogle release doesn't support some newer language constructs, hence the crash. I fixed this in https://github.com/ndmitchell/hoogle/pull/85. Unfortunately this hasn't made it into a release yet so you'll need to build from source. I mention this in passing in the README
although perhaps it should be more prominent.
I just released Hoogle 4.2.36 which includes the patch. If you ever find yourself suggesting people use the HEAD version, just let me know, and I'll release quickly.
Installing now :)
Sorry it's taken so long to get back, been cleaning stuff up as I encounter it, but I'm now stuck on this
Skipped 1 warnings in textbase1492
Looking for /opt/ghc/7.8.2/share/doc/ghc/html/libraries/bin-package-db-0.0.0.0/bin-package-db.txt
cabal: There is no package named 'bin-package-db'.
You may need to run 'cabal update' to get the latest list of available
packages.
Looking for /opt/ghc/7.8.2/share/doc/ghc/html/libraries/ghc-7.8.2/ghc.txt
cabal: There is no package named 'ghc'.
You may need to run 'cabal update' to get the latest list of available
packages.
Failed to build the following indexes:
PackageName "rts" Process cabal failed with error 1
PackageName "base" Process runghc failed with error 1
PackageName "haskell2010" Process runghc failed with error 1
PackageName "haskell98" Process runghc failed with error 1
PackageName "bin-package-db" Process cabal failed with error 1
PackageName "ghc" Process cabal failed with error 1
Combining 133 databases
hoogle-index: /home/julian/.cabal/share/x86_64-linux-ghc-7.8.2/hoogle-4.2.36/databases: copyFile: does not exist (No such file or directory)
Which looks like it's complaining about the version of hoogle I just installed?
@JulianBirch hmm, yes, I somewhat expected like this would happen eventually. Unfortunately there's no good way to find the hoogle databases directory. Could you try finding it manually and let me know where it is? I have a few ideas of what might be going on here.
C:\Neil>hoogle +notapackagethatcouldpossiblyexist
Could not find some databases: notapackagethatcouldpossiblyexist
Searching in:
.
C:\Program Files\Haskell\i386-windows-ghc-7.6.3\hoogle-4.2.34\databases
There are no available databases, generate them with: hoogle data
Not a great way, but it is a way... I'm happy to add some hoogle datadir
argument that prints out the databases.
If you use the API there is defaultDatabaseLocation.
Could not find some databases: x
Searching in:
.
/home/julian/.cabal/share/x86_64-linux-ghc-7.8.2/hoogle-4.2.36/databases
There are no available databases, generate them with: hoogle data
Which isn't what I was expecting...
Any ideas? :(
Hmm, I somehow missed your message.
Is there anything in that directory?
Just re-ran everything to make absolutely sure. Not only is there nothing in the directory, the directory doesn't even exist.
Failed to build the following indexes:
PackageName "rts" Process cabal failed with error 1
PackageName "base" Process runghc failed with error 1
PackageName "haskell2010" Process runghc failed with error 1
PackageName "haskell98" Process runghc failed with error 1
PackageName "bin-package-db" Process cabal failed with error 1
PackageName "ghc" Process cabal failed with error 1
Combining 133 databases
hoogle-index: /home/julian/.cabal/share/x86_64-linux-ghc-7.8.2/hoogle-4.2.36/databases: copyFile: does not exist (No such file or directory)
julian@Plato:~$ hoogle +x
Could not find some databases: x
Searching in:
.
/home/julian/.cabal/share/x86_64-linux-ghc-7.8.2/hoogle-4.2.36/databases
There are no available databases, generate them with: hoogle data
julian@Plato:~$ ls .cabal/share/x86_64-linux-ghc-7.8.2/hoogle-4.2.36
resources
julian@Plato:~$
Alright, well that explains it then. This should be fixed in the latest release (due to e0f837aa298a812e4d83cd003d497515908672fd)
Okay, I rebuilt hoogle-index, ran it and it now runs all the way through. However, it didn't create the databases directory and put the default.hoo
file one level up. So I created the databases directory and copied it down and now everything works!
I should say how much I appreciate the amount of work on this project and this issue in particular. As a beginner, not having a simple documentation story is pretty hostile.
Happy to help test a fix for the one remaining issue. :)
@JulianBirch yay! I see the issue with the databases directory. It seems that defaultDatabasesDirectory
points not to the databases/
directory but instead to it's parent. This is what I get for assuming without testing.
Whether that's a bug in Hoogle itself is somewhat unclear... I'll make sure that if I do change it upstream I'll let you know.
@ndmitchell thanks! For now I'll just uses fmap (</> "/databases") defaultDatabasesDirectory
. I've uploaded version 0.3.3 with this change.
@JulianBirch I'm going to close this under the expectation that this issue is at long last resolved. Feel free to reopen or open a new issue if there are further issues. Finally, thanks for taking the time to bring these issues to my attention!
Same result if I specify a specific directory or no parameter. Vanilla Ubuntu. And yes, I have run cabal update.