Logs: liberachat/#haskell
| 2021-06-09 16:50:22 | → | azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) |
| 2021-06-09 16:50:34 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 2021-06-09 16:51:54 | → | ikex joins (~ash@user/ikex) |
| 2021-06-09 16:54:44 | <ski> | knu : huh ? |
| 2021-06-09 16:55:24 | <knu> | Jup, it's quite baffling to me |
| 2021-06-09 16:55:42 | → | wonko joins (~wjc@62.115.229.50) |
| 2021-06-09 16:55:46 | <monochrom> | No, I'm sure ski means no one understands your question, it's incoherent. |
| 2021-06-09 16:56:18 | <knu> | Oh, how could I clarify? |
| 2021-06-09 16:56:20 | <monochrom> | Well, OK, I'll just speak for myself, I find it incoherent. |
| 2021-06-09 16:56:27 | <monochrom> | Show actual code? |
| 2021-06-09 16:56:41 | → | wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com) |
| 2021-06-09 16:57:17 | × | ozzymcdu1f quits (~mathieu@81-234-151-21-no94.tbcn.telia.com) (Remote host closed the connection) |
| 2021-06-09 16:58:17 | <knu> | Hm, one moment, I'll upload a preview at hackage |
| 2021-06-09 16:58:46 | → | ozzymcduff joins (~mathieu@81-234-151-21-no94.tbcn.telia.com) |
| 2021-06-09 16:59:40 | × | renzhi quits (~xp@2607:fa49:6500:bc00::e7b) (Ping timeout: 268 seconds) |
| 2021-06-09 16:59:56 | × | Hecate quits (~mariposa@user/hecate) (Quit: PissNet) |
| 2021-06-09 17:02:02 | × | laguneucl quits (~Pitsikoko@2a02:587:dc02:b00:98b0:cd42:bd6f:8295) (Ping timeout: 265 seconds) |
| 2021-06-09 17:02:39 | → | Hecate joins (~mariposa@user/hecate) |
| 2021-06-09 17:03:23 | <knu> | https://codeshare.io/zydqkN |
| 2021-06-09 17:04:19 | <knu> | If I generate haddock for these three modules, in module A I'll see both instances, in module B I'll see nothing and in module C it says pattern Zonk :: Foo Bool |
| 2021-06-09 17:05:29 | <monochrom> | Interesting. |
| 2021-06-09 17:05:34 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:2121:a570:d35e:ba7a) |
| 2021-06-09 17:05:59 | <knu> | And with PatternSynonyms enabled, I can import C (pattern Zonk) |
| 2021-06-09 17:07:08 | <knu> | So I'm thinking, that in these cases, patterns and data family instances are the same |
| 2021-06-09 17:07:49 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 2021-06-09 17:09:23 | → | danidiaz joins (~ESDPC@static-35-0-85-188.ipcom.comunitel.net) |
| 2021-06-09 17:09:29 | → | fluffyballoon joins (~fluffybal@2620:72:0:6480::10f7) |
| 2021-06-09 17:09:47 | <knu> | It get's worse: |
| 2021-06-09 17:10:31 | → | econo joins (uid147250@user/econo) |
| 2021-06-09 17:10:38 | → | chexum joins (~chexum@gateway/tor-sasl/chexum) |
| 2021-06-09 17:10:40 | <monochrom> | They are certainly not the same. You can't use PatternSynonyms to define data family instances. |
| 2021-06-09 17:10:56 | <knu> | If I'm with ghci in module A, I can import B (Foo(Barf)) but I can not import C (Foo(Zonk)) |
| 2021-06-09 17:11:13 | × | danidiaz1 quits (~ESDPC@static-35-0-85-188.ipcom.comunitel.net) (Ping timeout: 265 seconds) |
| 2021-06-09 17:11:34 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (*.net *.split) |
| 2021-06-09 17:11:39 | <knu> | It'll say, that C doesn't export Foo, so I can import it only by importing all of C or make a pattern import |
| 2021-06-09 17:12:47 | <monochrom> | I agree with the compiler about "C doesn't export Foo". This one is basic. |
| 2021-06-09 17:13:26 | <knu> | yes, but why doesn't he complain about import B (Foo(Barf)) |
| 2021-06-09 17:14:04 | <knu> | also, I can't import C (Zonk) |
| 2021-06-09 17:14:47 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 2021-06-09 17:16:47 | <knu> | I'm writing a lib with a lot of data family instances, which I'd like to split in different modules to have a clean namespace. Now I'm forced to choose between modules without haddock, modules in which haddock claims are only patterns and which aren't easily individually importable. |
| 2021-06-09 17:17:28 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
| 2021-06-09 17:17:51 | × | infinisi1 quits (~infinisil@mail.infinisil.com) (Quit: Configuring ZNC, sorry for the joins/quits!) |
| 2021-06-09 17:18:27 | → | infinisil joins (~infinisil@mail.infinisil.com) |
| 2021-06-09 17:18:42 | <knu> | hm |
| 2021-06-09 17:19:03 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Read error: Connection reset by peer) |
| 2021-06-09 17:19:29 | <ski> | knu : i guess it might be implicitly defining a pattern synonym `Zonk' for `Foo Bool' ? |
| 2021-06-09 17:19:37 | <maerwald> | monochrom: did you follow the HasCallstack base/Data.List RFC? I'm wondering what you think about the `Partial` typeclass approach that was brought up (and is used by purescript it seems) |
| 2021-06-09 17:19:55 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds) |
| 2021-06-09 17:20:16 | <monochrom> | I didn't. |
| 2021-06-09 17:20:17 | <ski> | knu : try `module C (module A,module C) where ...' and then try `import C (Foo(Zonk))' ? |
| 2021-06-09 17:20:25 | spatchkaa__ | is now known as spatchkaa |
| 2021-06-09 17:20:52 | <maerwald> | https://mail.haskell.org/pipermail/libraries/2021-June/031292.html |
| 2021-06-09 17:21:00 | <monochrom> | What is the semantics of Partial? |
| 2021-06-09 17:21:11 | <maerwald> | I find it very foggy |
| 2021-06-09 17:21:24 | <maerwald> | something like "may call `error`... or not" |
| 2021-06-09 17:21:27 | × | spatchkaa quits (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) (Quit: Leaving) |
| 2021-06-09 17:21:32 | × | amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection) |
| 2021-06-09 17:21:38 | <knu> | @ski: Yes, I've tried that one. In this case the import works. In haddock I'll get the data family with both instances and additionally the pattern Zonk |
| 2021-06-09 17:21:38 | <lambdabot> | Unknown command, try @list |
| 2021-06-09 17:22:08 | → | amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) |
| 2021-06-09 17:22:32 | <ski> | knu : does that solve your problem ? |
| 2021-06-09 17:22:37 | <knu> | So this would be my third option, which would nuke my haddocks, because my data families have about 100 instances |
| 2021-06-09 17:22:50 | <ski> | knu : also, what if you try `module C (Foo,module C) where ...' ? |
| 2021-06-09 17:22:59 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 2021-06-09 17:23:00 | <knu> | Same result |
| 2021-06-09 17:23:05 | <monochrom> | This is deja vu. I think I saw this in a dream some years ago... |
| 2021-06-09 17:23:33 | <maerwald> | quite possible |
| 2021-06-09 17:24:09 | <monochrom> | Unlike IsPartial, HasCallBack does not automatically propagate. |
| 2021-06-09 17:24:43 | ski | . o O ( `promiseTotal :: (IsPartial => a) -> a' ) |
| 2021-06-09 17:25:00 | × | nschoe quits (~quassel@178.251.84.79) (Ping timeout: 252 seconds) |
| 2021-06-09 17:25:04 | <maerwald> | ski: yeah...which may completely lie |
| 2021-06-09 17:25:09 | <ski> | obviously |
| 2021-06-09 17:25:21 | <maerwald> | refactored out some stuff, forgot to remove it |
| 2021-06-09 17:25:23 | <maerwald> | oops |
| 2021-06-09 17:25:46 | <maerwald> | it's basically unsafePerformIO from a different angle |
| 2021-06-09 17:25:55 | → | fabfianda joins (~fabfianda@mob-5-90-243-109.net.vodafone.it) |
| 2021-06-09 17:26:11 | <maerwald> | you have to do proper local reasoning for it to be correct |
| 2021-06-09 17:26:23 | <monochrom> | I think I'm on the fence for this. And regardless of any detail refinement such as "does it propagate?" "does it have actual semantic behaviour?" "how annoying is it going to be?" |
| 2021-06-09 17:26:31 | ski | . o O ( "If you lie to the compiler, the compiler will get its revenge!" ) |
| 2021-06-09 17:26:46 | → | Morrow joins (~Morrow@37.142.145.18) |
| 2021-06-09 17:26:54 | <ski> | maerwald : except it's clearer on what the proof obligation is |
| 2021-06-09 17:27:05 | <maerwald> | ski: is it? |
| 2021-06-09 17:27:29 | <maerwald> | foo :: FilePath -> IO () -- what if this crashes on non-absolute paths? |
| 2021-06-09 17:27:33 | <maerwald> | does it make it partial? |
| 2021-06-09 17:28:10 | <maerwald> | wait... now, does it call `error` or `throwIO`, or... |
| 2021-06-09 17:28:14 | <maerwald> | and, does the user care? |
| 2021-06-09 17:28:17 | <monochrom> | "partial" is not a notion for effects. At least by my definitions. |
| 2021-06-09 17:28:23 | <ski> | insofar as the partiality of the relevant operation is specified, at least |
| 2021-06-09 17:28:31 | <maerwald> | monochrom: SPJ seemed to consider it an effect |
| 2021-06-09 17:28:32 | <ski> | maerwald : imho, no |
| 2021-06-09 17:28:45 | <ski> | partiality is a side-effect |
| 2021-06-09 17:28:57 | <maerwald> | uuuhm |
| 2021-06-09 17:28:59 | <ski> | ("no", to "does it make it partial?") |
| 2021-06-09 17:29:00 | × | Morrow quits (~Morrow@37.142.145.18) (Read error: Connection reset by peer) |
| 2021-06-09 17:29:30 | <monochrom> | Err wait, nevermind, foo can still be partial from the POV of math function X->Y under Y=IO() |
| 2021-06-09 17:29:36 | <ski> | (just like nontermination is a side-effect) |
| 2021-06-09 17:29:43 | <knu> | @ski: module C (module A, module C) where actually solves my issue in the prettiest way |
| 2021-06-09 17:29:43 | <lambdabot> | Unknown command, try @list |
| 2021-06-09 17:29:50 | <knu> | thanks |
| 2021-06-09 17:30:04 | <ski> | `foo undefined' would be partial, though |
All times are in UTC.