Logs: freenode/#haskell
| 2021-03-01 11:44:33 | <quackrabbit> | Version 8.10.4 |
| 2021-03-01 11:44:41 | <quackrabbit> | I just ran `ghcup` 5 minutes ago |
| 2021-03-01 11:44:52 | → | Pickchea joins (~private@unaffiliated/pickchea) |
| 2021-03-01 11:45:24 | → | danza joins (~francesco@151.44.192.103) |
| 2021-03-01 11:45:33 | <quackrabbit> | Thanks for the help btw |
| 2021-03-01 11:46:49 | <fendor> | ok, so, you see, base is coupled with the ghc version. The project you want to build seemingly forces wants ghc 8.8.* version, though, afaict |
| 2021-03-01 11:47:25 | <fendor> | *lambda cube seemingly only builds with ghc 8.8.* according to its version constraint on base |
| 2021-03-01 11:48:33 | <quackrabbit> | is there a way to change this? |
| 2021-03-01 11:48:43 | <fendor> | you would have to update the code in lambda cube |
| 2021-03-01 11:48:53 | <fendor> | which can be trivial, but can also be very tedious |
| 2021-03-01 11:48:55 | <quackrabbit> | The only edit I made in the cabal file is to add the dependency on QuickCheck |
| 2021-03-01 11:49:05 | <quackrabbit> | The code in my project is minimal I just started |
| 2021-03-01 11:49:34 | <fendor> | I dont think the dependency on QuickCheck has anything to do with it. |
| 2021-03-01 11:49:45 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 2021-03-01 11:49:54 | <quackrabbit> | Can I make a change in my cabal file to drop this depenency? |
| 2021-03-01 11:49:57 | <fendor> | you are experimenting with lambda cube? |
| 2021-03-01 11:50:06 | <quackrabbit> | Lamba cube is my own project I just started |
| 2021-03-01 11:50:10 | <fendor> | oh. |
| 2021-03-01 11:50:14 | <fendor> | I see, then it is quite trivial |
| 2021-03-01 11:50:22 | <quackrabbit> | as in `mkdir lambdacube; cd lambdacube; cabal init` |
| 2021-03-01 11:50:29 | × | APic quits (apic@apic.name) (Ping timeout: 245 seconds) |
| 2021-03-01 11:50:34 | <fendor> | open your .cabal file, and look for `base >= 4.13.0.0 && < 4.14.0.0` |
| 2021-03-01 11:50:35 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-03-01 11:50:43 | <quackrabbit> | yep |
| 2021-03-01 11:51:01 | → | APic joins (apic@apic.name) |
| 2021-03-01 11:51:07 | <fendor> | either remove the version constraint or relax it to `base >= 4.13.0.0 && < 4.15.0.0` |
| 2021-03-01 11:51:18 | <fendor> | then everything should be fine |
| 2021-03-01 11:52:16 | <quackrabbit> | ok it's building and passed the dependency check thanks a bunch |
| 2021-03-01 11:52:17 | <quackrabbit> | will the haskell language server pick up that Im in a cabal project and use the installed packages? |
| 2021-03-01 11:52:35 | <fendor> | yes |
| 2021-03-01 11:52:57 | <quackrabbit> | wonderful. thanks |
| 2021-03-01 11:53:08 | <fendor> | yes it will, but if you add dependencies, you might have to restart it to properly pick up the changes. (I am not sure, though, maybe it nowadays works without restarting) |
| 2021-03-01 11:53:58 | <quackrabbit> | Nope, restarted emacs and no luck. Still not says Module not found |
| 2021-03-01 11:54:06 | <quackrabbit> | Requiring the module in `cabal repl` works fine |
| 2021-03-01 11:54:43 | <quackrabbit> | Do I have to list all my source files in the cabal file somewhere |
| 2021-03-01 11:54:58 | <fendor> | yes, you have to! |
| 2021-03-01 11:55:14 | <fendor> | you are using a library or executable? |
| 2021-03-01 11:55:18 | <quackrabbit> | Executable |
| 2021-03-01 11:55:29 | <quackrabbit> | so I have a main and then a bunch of modules |
| 2021-03-01 11:55:35 | <quackrabbit> | (bunch = 2) |
| 2021-03-01 11:55:36 | <fendor> | maybe this is helpful: https://cabal.readthedocs.io/en/3.4/developing-packages.html#editing-the-cabal-file |
| 2021-03-01 11:55:53 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 2021-03-01 11:55:54 | <fendor> | then you have to add your modules to the `other-modules:` section of your executable section |
| 2021-03-01 11:56:20 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-03-01 11:57:24 | × | danza quits (~francesco@151.44.192.103) (Ping timeout: 260 seconds) |
| 2021-03-01 11:57:26 | <quackrabbit> | Aha! Adding that bings back the old problem |
| 2021-03-01 11:57:27 | <quackrabbit> | Could not load module ‘Control.Monad.Reader’ |
| 2021-03-01 11:57:28 | <quackrabbit> | It is a member of the hidden package ‘mtl-2.2.2’. |
| 2021-03-01 11:57:40 | → | Guest_58 joins (b0996fb4@176-153-111-180.abo.bbox.fr) |
| 2021-03-01 11:57:42 | <fendor> | did you add mtl to your build-depends section? |
| 2021-03-01 11:57:44 | <quackrabbit> | So relaxing the constraint on base didn't fix the issue |
| 2021-03-01 11:58:14 | <quackrabbit> | Ah, so mtl is not part of the stdlib? |
| 2021-03-01 11:58:24 | <quackrabbit> | Adding mtl fixed it thanks |
| 2021-03-01 11:58:57 | <fendor> | indeed, it is not |
| 2021-03-01 11:59:12 | → | geowiesnot_bis joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
| 2021-03-01 11:59:44 | <fendor> | I think it is a boot library, which means it is actually included in your normal ghci invocation, however in a project, you have to be a bit more explicit |
| 2021-03-01 12:00:06 | <quackrabbit> | gotcha. |
| 2021-03-01 12:00:27 | <quackrabbit> | Thanks you've been a huge help |
| 2021-03-01 12:00:40 | <quackrabbit> | lang server is still not seeing the new module? Any ideas? |
| 2021-03-01 12:00:40 | → | sQVe joins (~sQVe@unaffiliated/sqve) |
| 2021-03-01 12:00:52 | <fendor> | error messages pls, or logs |
| 2021-03-01 12:01:10 | <quackrabbit> | Could not find module Test.QuickCheck |
| 2021-03-01 12:01:15 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2021-03-01 12:01:30 | <fendor> | QuickCheck in the build-depends? |
| 2021-03-01 12:01:33 | <quackrabbit> | yep |
| 2021-03-01 12:01:42 | <quackrabbit> | it builds fine in `cabal build` |
| 2021-03-01 12:01:44 | <fendor> | error in the main module or one of the other-modules? |
| 2021-03-01 12:01:51 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-03-01 12:01:52 | <quackrabbit> | on of the other-modules |
| 2021-03-01 12:02:40 | <quackrabbit> | LSP log contains this: Command "hie-wrapper --lsp -d -l /tmp/hie.log" is not present on the path. |
| 2021-03-01 12:02:41 | <fendor> | are the other-modules in some sub-directory? E.g. do you have a hs-source-dirs in your executable section? |
| 2021-03-01 12:02:53 | <fendor> | hie? 0.o |
| 2021-03-01 12:02:56 | <quackrabbit> | no it's all in the top level directory |
| 2021-03-01 12:03:08 | <fendor> | is your config maybe old? |
| 2021-03-01 12:03:46 | → | mrioqueiroz joins (~mrioqueir@177.74.248.219) |
| 2021-03-01 12:04:05 | <quackrabbit> | I think doom emacs just checks for both |
| 2021-03-01 12:04:11 | <fendor> | ah, interesting. |
| 2021-03-01 12:04:25 | <fendor> | how did you install hls? |
| 2021-03-01 12:04:30 | <quackrabbit> | ghcup |
| 2021-03-01 12:05:22 | → | henninb joins (~henninb@63-228-50-251.mpls.qwest.net) |
| 2021-03-01 12:05:45 | <fendor> | hmpf... In the terminal, what is the output of `haskell-language-server-wrapper --debug Main.hs` ? |
| 2021-03-01 12:06:03 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) |
| 2021-03-01 12:06:09 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 2021-03-01 12:07:19 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 2021-03-01 12:07:38 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-03-01 12:07:40 | <quackrabbit> | https://paste.tomsmeding.com/RlUWnRd8 |
| 2021-03-01 12:08:05 | → | sm2n joins (~sm2n@bras-base-hmtnon143hw-grc-15-70-54-78-219.dsl.bell.ca) |
| 2021-03-01 12:08:47 | <fendor> | quackrabbit, you have a hie.yaml file? |
| 2021-03-01 12:08:52 | <quackrabbit> | nope |
| 2021-03-01 12:09:03 | <fendor> | interesting. |
| 2021-03-01 12:09:06 | <quackrabbit> | i agree |
| 2021-03-01 12:09:14 | <fendor> | Is the file that fails to load Lambda2? |
| 2021-03-01 12:09:53 | <quackrabbit> | no, it's SimplyTyped |
| 2021-03-01 12:10:01 | <quackrabbit> | Lambda2 isn't even in `other-modules` |
| 2021-03-01 12:10:10 | <quackrabbit> | (it is a file on disk though, hadn't added it yet) |
| 2021-03-01 12:10:15 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) (Ping timeout: 240 seconds) |
| 2021-03-01 12:10:16 | <quackrabbit> | It isn't required by Main either |
| 2021-03-01 12:10:16 | → | darjeeling_ joins (~darjeelin@122.245.218.150) |
| 2021-03-01 12:10:44 | <fendor> | ah, that's fine then, hls just tries to compile any hs file it finds |
| 2021-03-01 12:11:26 | → | danza joins (~francesco@151.53.76.37) |
All times are in UTC.