Logs: liberachat/#haskell
| 2021-07-20 11:58:56 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds) |
| 2021-07-20 11:59:44 | → | burnsidesLlama joins (~burnsides@dhcp168-011.wadham.ox.ac.uk) |
| 2021-07-20 12:00:10 | → | MidAutumnMoon90 joins (~MidAutumn@user/midautumnmoon) |
| 2021-07-20 12:00:53 | <mniip> | yin[m], yes |
| 2021-07-20 12:01:08 | <mniip> | unless LambdaCase |
| 2021-07-20 12:03:38 | → | jmorris joins (uid433911@id-433911.stonehaven.irccloud.com) |
| 2021-07-20 12:03:59 | → | wei2912 joins (~wei2912@112.199.250.21) |
| 2021-07-20 12:07:04 | <yin[m]> | hum... |
| 2021-07-20 12:07:32 | × | newtoliberachat quits (~xyz@49.206.29.212) (Ping timeout: 255 seconds) |
| 2021-07-20 12:07:35 | yin[m] | < https://libera.ems.host/_matrix/media/r0/download/libera.chat/428d266281b63163dc12428e334abb3fe82a9d3f/message.txt > |
| 2021-07-20 12:07:56 | <yin[m]> | does this this apply? |
| 2021-07-20 12:08:47 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 250 seconds) |
| 2021-07-20 12:10:37 | <dminuoso> | arahael: So best to talk about this when you need it then. |
| 2021-07-20 12:10:59 | <boxscape> | % (\(Just x) -> 4) Nothing |
| 2021-07-20 12:10:59 | <yahb> | boxscape: *** Exception: <interactive>:23:2-15: Non-exhaustive patterns in lambda |
| 2021-07-20 12:11:08 | <boxscape> | yin: I would say that qualifies as not irrefutable |
| 2021-07-20 12:11:19 | <dminuoso> | arahael: So a custom Setup.hs lets you hook into the build process, customize it, do things at various times. One thing you can do, for example, is simply call executables in a hook. |
| 2021-07-20 12:11:26 | <dminuoso> | This would then trigger each time you run `cabal build` |
| 2021-07-20 12:11:55 | <dminuoso> | The library I showed you provides exactly such a hook (it exposes it as a library, btw, such that other users can just import it, and use that) |
| 2021-07-20 12:12:00 | <arahael> | dminuoso: Yeah, I was just very confused to how the executables actually get downloaded and used. |
| 2021-07-20 12:12:10 | <dminuoso> | arahael: A setup has a defined api, which is `main :: IO ()` and this main is expected to do certain things. |
| 2021-07-20 12:12:24 | <dminuoso> | cabal brings some default things, like defaultMain |
| 2021-07-20 12:12:33 | <arahael> | Which is what I usually use. |
| 2021-07-20 12:13:08 | <dminuoso> | Right. https://github.com/google/proto-lens/blob/master/proto-lens-setup/src/Data/ProtoLens/Setup.hs#L149 |
| 2021-07-20 12:13:13 | <boxscape> | % (\~(Just 4) -> 4) Nothing -- yin compare with this |
| 2021-07-20 12:13:13 | <yahb> | boxscape: ; <interactive>:25:13: error: parse error on input `->' |
| 2021-07-20 12:13:16 | <dminuoso> | defaultMainWithHooks is also from Cabal |
| 2021-07-20 12:13:24 | <boxscape> | erm |
| 2021-07-20 12:13:48 | <dminuoso> | This is a bit more custom, since you say "dont change the build, but I want to do provide some hooks" |
| 2021-07-20 12:14:00 | <boxscape> | % (\(~(Just 4)) -> 4) Nothing |
| 2021-07-20 12:14:00 | <yahb> | boxscape: 4 |
| 2021-07-20 12:14:01 | → | favonia joins (~favonia@user/favonia) |
| 2021-07-20 12:14:06 | <dminuoso> | https://hackage.haskell.org/package/Cabal-3.4.0.0/docs/Distribution-Simple.html#v:defaultMainWithHooks |
| 2021-07-20 12:14:11 | <arahael> | dminuoso: Yeah, that bit makes sense actually. |
| 2021-07-20 12:14:13 | <dminuoso> | https://hackage.haskell.org/package/Cabal-3.4.0.0/docs/Distribution-Simple.html#t:UserHooks |
| 2021-07-20 12:14:20 | <dminuoso> | So here, you can provide hooks at various phases during theb uild |
| 2021-07-20 12:14:32 | <dminuoso> | And inside that hook, you just call something |
| 2021-07-20 12:15:33 | <dminuoso> | setup-depends then lets you specify things that must be available during setup such as libraries or executable packages |
| 2021-07-20 12:15:54 | <arahael> | dminuoso: Yeah - and I was thinking that maybe it's the build-tool-depends that actually makes the executable package available. |
| 2021-07-20 12:16:01 | <arahael> | dminuoso: Which sadly doesn't appear to wokr for me. |
| 2021-07-20 12:16:09 | <arahael> | *work |
| 2021-07-20 12:16:20 | <dminuoso> | arahael: I dont understand the details, but build-tool doesn't quite work here :( |
| 2021-07-20 12:16:38 | <arahael> | dminuoso: From what I read in the documentation, build-tool has actually been removed in cabal 3.0 |
| 2021-07-20 12:16:50 | <arahael> | dminuoso: Replaced by build-tool-depends, I think. |
| 2021-07-20 12:17:19 | <dminuoso> | Right |
| 2021-07-20 12:17:28 | <arahael> | https://cabal.readthedocs.io/en/3.4/cabal-package.html?highlight=custom-setup#pkg-field-build-tools |
| 2021-07-20 12:17:31 | <dminuoso> | `Cabal tries to make sure that all specified programs are atomically built and prepended on the $PATH shell variable before building the component in question, but can only do so for Nix-style builds. Specifically:` |
| 2021-07-20 12:17:33 | <dminuoso> | Mmm |
| 2021-07-20 12:17:37 | <dminuoso> | arahael: Are you sure it doesnt work? |
| 2021-07-20 12:17:42 | <dminuoso> | It sounds like it could, perhaps |
| 2021-07-20 12:18:02 | <dminuoso> | Ah, perhaps its not available during setup phase |
| 2021-07-20 12:18:11 | <dminuoso> | But you have setup-depends, which should suffice |
| 2021-07-20 12:18:31 | <arahael> | dminuoso: I get a pretty clear warning that 'build-tool-depends' is an unknown field. |
| 2021-07-20 12:19:22 | <dminuoso> | What cabal version have you set in your cabal file? |
| 2021-07-20 12:19:32 | <arahael> | dminuoso: I've provided the gist, one moment: |
| 2021-07-20 12:19:41 | <arahael> | https://gist.github.com/arafangion/4649c7ddaae805ff9f906107dc89d641 |
| 2021-07-20 12:19:50 | <arahael> | So that would be cabal version 2.4 |
| 2021-07-20 12:26:13 | × | azeem quits (~azeem@62.19.162.48) (Ping timeout: 246 seconds) |
| 2021-07-20 12:28:10 | <arahael> | dminuoso: I'm afraid I need to prepare for bed - thanks for your help - and also for pointing me to proto-lens. |
| 2021-07-20 12:28:27 | → | azeem joins (~azeem@62.19.162.48) |
| 2021-07-20 12:28:27 | × | sagax quits (~sagax@213.138.71.146) (Ping timeout: 258 seconds) |
| 2021-07-20 12:28:36 | × | awth13 quits (~user@user/awth13) (Read error: Connection reset by peer) |
| 2021-07-20 12:29:56 | × | uniproj quits (~textual@2a00:23c5:e702:3100:6917:5743:b08c:e939) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-07-20 12:30:18 | → | awth13 joins (~user@user/awth13) |
| 2021-07-20 12:32:27 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-07-20 12:34:51 | → | finsternis joins (~X@23.226.237.192) |
| 2021-07-20 12:36:52 | × | Axman6 quits (~Axman6@user/axman6) (Quit: Ping timeout (120 seconds)) |
| 2021-07-20 12:37:17 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds) |
| 2021-07-20 12:37:54 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 240 seconds) |
| 2021-07-20 12:38:48 | × | mikoto-chan quits (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) (Ping timeout: 258 seconds) |
| 2021-07-20 12:39:27 | → | favonia joins (~favonia@user/favonia) |
| 2021-07-20 12:39:34 | → | mikoto-chan joins (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) |
| 2021-07-20 12:40:34 | × | MQ-17J quits (~MQ-17J@8.21.10.15) (Ping timeout: 240 seconds) |
| 2021-07-20 12:42:46 | → | __monty__ joins (~toonn@user/toonn) |
| 2021-07-20 12:45:37 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 2021-07-20 12:46:54 | hololeap_ | is now known as hololeap |
| 2021-07-20 12:48:06 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 2021-07-20 12:49:55 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 258 seconds) |
| 2021-07-20 12:50:12 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 2021-07-20 12:52:43 | → | derelict joins (~derelict@user/derelict) |
| 2021-07-20 12:52:50 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-07-20 12:53:11 | → | acidjnk joins (~acidjnk@p200300d0c72b9575c508b842a8b97de2.dip0.t-ipconnect.de) |
| 2021-07-20 12:53:28 | → | benin03699 joins (~benin@183.82.205.42) |
| 2021-07-20 12:54:41 | × | azeem quits (~azeem@62.19.162.48) (Ping timeout: 265 seconds) |
| 2021-07-20 12:55:22 | × | yauhsien quits (~yauhsien@61-231-35-149.dynamic-ip.hinet.net) (Quit: Leaving...) |
| 2021-07-20 12:55:32 | × | benin0369 quits (~benin@183.82.176.216) (Ping timeout: 252 seconds) |
| 2021-07-20 12:55:32 | benin03699 | is now known as benin0369 |
| 2021-07-20 12:56:49 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 258 seconds) |
| 2021-07-20 12:57:15 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 2021-07-20 12:57:36 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
| 2021-07-20 12:57:39 | → | azeem joins (~azeem@62.19.104.241) |
| 2021-07-20 12:58:28 | × | dunkeln_ quits (~dunkeln@188.71.231.232) (Ping timeout: 252 seconds) |
| 2021-07-20 12:59:54 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 240 seconds) |
| 2021-07-20 13:00:40 | × | ukari quits (~ukari@user/ukari) (Ping timeout: 252 seconds) |
| 2021-07-20 13:01:07 | → | alx741 joins (~alx741@186.178.108.174) |
| 2021-07-20 13:01:47 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 2021-07-20 13:02:19 | → | favonia joins (~favonia@user/favonia) |
| 2021-07-20 13:03:01 | × | jneira quits (~jneira@212.8.115.226) (Quit: Client closed) |
| 2021-07-20 13:03:49 | → | xkuru joins (~xkuru@user/xkuru) |
| 2021-07-20 13:04:02 | → | uniproj joins (~textual@2a00:23c5:e702:3100:6917:5743:b08c:e939) |
All times are in UTC.