Newest at the top
2024-10-28 13:29:45 +0100 | <tomsmeding> | with the same syntax, except hs-source-dirs: instead of build-depends: in the `if` ;) |
2024-10-28 13:29:30 +0100 | <tomsmeding> | how are you switching the dependencies? |
2024-10-28 13:29:13 +0100 | <sinbad> | tomsmeding: haskellbridge" Okay, I thought of that. How to set up the related cabal fields src/ (the rest of my libs), src1/ and src2/? |
2024-10-28 13:29:11 +0100 | <haskellbridge> | <sm> ah, true |
2024-10-28 13:28:51 +0100 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 252 seconds) |
2024-10-28 13:28:42 +0100 | <tomsmeding> | so the paths are definitely connected, but you can have any number of "base directories" in which ghc can search for the proper paths |
2024-10-28 13:28:25 +0100 | <tomsmeding> | well, if the module is Foo.Bar, then it needs to be src1/Foo/Bar.hs and src2/Foo/Bar.hs |
2024-10-28 13:27:46 +0100 | <haskellbridge> | <sm> +are connected |
2024-10-28 13:26:48 +0100 | <haskellbridge> | <sm> Yes - file names and module names (except the main file). But not file paths, as tomsmeding says |
2024-10-28 13:26:36 +0100 | <tomsmeding> | then src1/Foo.hs and src2/Foo.hs are both independently valid, without any CPP |
2024-10-28 13:26:23 +0100 | <tomsmeding> | what I mean is, assuming your module is called Foo: * Put version 1 in src1/Foo.hs; * Put version 2 in src2/Foo.hs; * In your-lib.cabal, switch between `hs-source-dirs: src1` and `hs-source-dirs: src2` based on the flag |
2024-10-28 13:25:12 +0100 | <sinbad> | That is not changing the module name. To put in a different way, is there a strict mapping of source file names and module names? |
2024-10-28 13:24:44 +0100 | <tomsmeding> | alternatively, backpack can rename modules, I think |
2024-10-28 13:24:35 +0100 | <tomsmeding> | sinbad: good point. Put the two module versions in two separate source directories, and switch an additional hs-source-dirs: option instead? |
2024-10-28 13:23:51 +0100 | <sinbad> | tomsmeding: I know how to use cabal's flag. If the module name change I need CPP in the source. I want to do the switch without using CPP. |
2024-10-28 13:21:42 +0100 | Nixkernal | (~Nixkernal@52.131.63.188.dynamic.cust.swisscom.net) Nixkernal |
2024-10-28 13:21:17 +0100 | YoungFrog | (~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be) youngfrog |
2024-10-28 13:20:54 +0100 | YoungFrog | (~youngfrog@2a02:a03f:c9db:fc00:7868:ed54:6992:80f4) (Quit: ZNC 1.7.x-git-3-96481995 - https://znc.in) |
2024-10-28 13:19:28 +0100 | <tomsmeding> | better test all configurations of your package :) |
2024-10-28 13:19:13 +0100 | <tomsmeding> | yes |
2024-10-28 13:19:09 +0100 | <haskellbridge> | <sm> will it add complexity and hassles for packaging/building ? Probably |
2024-10-28 13:19:07 +0100 | <tomsmeding> | the same way you switch between dependency sets (with the `if` syntax in a .cabal file), you can also put exposed-modules: (and, indeed, other-modules:) in such an `if` |
2024-10-28 13:18:37 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) wootehfoot |
2024-10-28 13:18:22 +0100 | <tomsmeding> | sinbad: based on cabal flags you can expose or not expose certain modules |
2024-10-28 13:18:19 +0100 | <haskellbridge> | <sm> I think so? By selecting different deps and source files in the cabal file |
2024-10-28 13:17:54 +0100 | Smiles | (uid551636@id-551636.lymington.irccloud.com) Smiles |
2024-10-28 13:16:15 +0100 | <sinbad> | Let's say I have two different implementations of the function foo with two different sets of dependencies. Is it possible to switch between the too foo-s using only cabal's flags but not CPP in the source files? |
2024-10-28 13:13:24 +0100 | Nixkernal | (~Nixkernal@52.131.63.188.dynamic.cust.swisscom.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
2024-10-28 13:12:07 +0100 | sinbad | (~sinbad@user/sinbad) Sinbad |
2024-10-28 13:06:49 +0100 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 244 seconds) |
2024-10-28 13:02:35 +0100 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
2024-10-28 12:59:30 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2024-10-28 12:59:13 +0100 | euleritian | (~euleritia@dynamic-176-003-032-186.176.3.pool.telefonica.de) (Read error: Connection reset by peer) |
2024-10-28 12:55:26 +0100 | jespada | (~jespada@222.203-67-87.adsl-dyn.isp.belgacom.be) (Quit: My Mac has gone to sleep. ZZZzzz…) |
2024-10-28 12:53:35 +0100 | scaniatrucker | (~user@78.56.98.5) scaniatrucker |
2024-10-28 12:48:32 +0100 | zero | (~z@user/zero) zero |
2024-10-28 12:47:47 +0100 | zzz | (~z@user/zero) (Ping timeout: 252 seconds) |
2024-10-28 12:47:34 +0100 | SlackCoder | (~SlackCode@64-94-63-8.ip.weststar.net.ky) SlackCoder |
2024-10-28 12:44:59 +0100 | euleritian | (~euleritia@dynamic-176-003-032-186.176.3.pool.telefonica.de) |
2024-10-28 12:43:49 +0100 | rosco | (~rosco@60.53.5.183) rosco |
2024-10-28 12:43:46 +0100 | habib | (~habib@185.195.232.169) habib |
2024-10-28 12:42:18 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2024-10-28 12:41:09 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) lortabac |
2024-10-28 12:40:10 +0100 | mari-estel | (~mari-este@user/mari-estel) (Quit: shitty system) |
2024-10-28 12:35:58 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2024-10-28 12:35:32 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2024-10-28 12:33:08 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) lxsameer |
2024-10-28 12:30:10 +0100 | mari-estel | (~mari-este@user/mari-estel) mari-estel |
2024-10-28 12:19:39 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3406-c072-f489-680b-9cb7-dfd8.rev.sfr.net) alexherbo2 |
2024-10-28 12:17:43 +0100 | sawilagar | (~sawilagar@user/sawilagar) sawilagar |