Logs: liberachat/#haskell
| 2021-06-05 19:14:02 | <Guest33> | OMG you are actully a god boxcape |
| 2021-06-05 19:14:04 | <Guest33> | thank you!!!!!!!!!!!!!!!! |
| 2021-06-05 19:14:11 | <boxscape> | you're welcome :) |
| 2021-06-05 19:15:03 | <_73> | boxscape: I was able to get it to work by adding FlexibleInstances |
| 2021-06-05 19:15:38 | → | wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com) |
| 2021-06-05 19:15:43 | <boxscape> | _73 it seems reasonable to me. A couple questions are 1. If you need the MyMemory type at all or if you can just directly make an instance for (Map.Map Integer String) or even (Map.Map k v) for any types k and v, and 2. perhaps your class would benefit from a functional dependency `class Memory mem k v | mem -> k, mem -> v where` to tell ghc that |
| 2021-06-05 19:15:43 | <boxscape> | mem uniquely determines k and v, which can help with type inference |
| 2021-06-05 19:15:50 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-06-05 19:16:22 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e061:bfad:5c85:da98) |
| 2021-06-05 19:18:27 | × | ddellacosta quits (~ddellacos@86.106.121.100) (Ping timeout: 265 seconds) |
| 2021-06-05 19:18:27 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 265 seconds) |
| 2021-06-05 19:18:58 | <_73> | ok I will go with this until something goes wrong. I have spent some time reading about functional dependencies, and I do recall that problems can arise with erroneous programs passing the typechecker with just MultiParamTypeClasses. I was never able to mentally figure out what is meant by `uniquely determines` though. |
| 2021-06-05 19:20:36 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds) |
| 2021-06-05 19:20:36 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 2021-06-05 19:20:40 | <boxscape> | if you have a `class C a b | a -> b`, you can't have two instances `instance C String A` and `instance C String B` if A and B are different. That is all that is meant by "a uniquely determines b`. So if ghc sees that the first parameter is String, it immediately knows what the second parameter must be, since there can only be one such instance |
| 2021-06-05 19:20:52 | → | MQ-17J joins (~MQ-17J@8.21.10.116) |
| 2021-06-05 19:23:19 | <_73> | boxscape: So with your suggestion I couldn't have both `MyMemory Integer String` and `MyMemory Float Double`? |
| 2021-06-05 19:23:26 | → | fendor joins (~fendor@91.141.0.144.wireless.dyn.drei.com) |
| 2021-06-05 19:23:51 | <boxscape> | right |
| 2021-06-05 19:23:56 | <_73> | couldn't have Memory instances for both those types I should say |
| 2021-06-05 19:24:13 | <boxscape> | you can |
| 2021-06-05 19:24:16 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-06-05 19:24:21 | × | sheepduck quits (~sheepduck@2607:fea8:2a60:b700::8a94) (Remote host closed the connection) |
| 2021-06-05 19:24:23 | <boxscape> | but it can't be that both use MyMemoty |
| 2021-06-05 19:24:26 | <boxscape> | s/t/s |
| 2021-06-05 19:24:29 | <boxscape> | err |
| 2021-06-05 19:24:30 | <boxscape> | s/t/r |
| 2021-06-05 19:25:13 | <boxscape> | oh, sorry, that's what you meant anyway |
| 2021-06-05 19:26:12 | → | sheepduck joins (~sheepduck@2607:fea8:2a60:b700::8a94) |
| 2021-06-05 19:26:21 | <_73> | I understand. I am going to revisit functional dependencies now. thanks |
| 2021-06-05 19:27:41 | → | pavonia joins (~user@user/siracusa) |
| 2021-06-05 19:29:02 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 244 seconds) |
| 2021-06-05 19:30:27 | → | ddellacosta joins (~ddellacos@86.106.143.144) |
| 2021-06-05 19:30:39 | × | xff0x quits (~xff0x@2001:1a81:53bd:ad00:82dd:e8fb:f0ad:2e66) (Quit: xff0x) |
| 2021-06-05 19:31:02 | → | ddellac__ joins (~ddellacos@86.106.121.57) |
| 2021-06-05 19:33:54 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-06-05 19:34:47 | × | ddellaco_ quits (~ddellacos@86.106.143.53) (Ping timeout: 268 seconds) |
| 2021-06-05 19:35:01 | <boxscape> | are the old tunes logs saved anywhere else? the site seems to be "down" (asking for username and password, http://tunes.org/~nef/logs/haskell/?C=M;O=D ) |
| 2021-06-05 19:35:08 | × | ddellac__ quits (~ddellacos@86.106.121.57) (Read error: Connection reset by peer) |
| 2021-06-05 19:36:35 | × | MQ-17J quits (~MQ-17J@8.21.10.116) (Ping timeout: 245 seconds) |
| 2021-06-05 19:37:47 | → | xff0x joins (~xff0x@2001:1a81:53bd:ad00:cace:1aaf:4d66:6b7f) |
| 2021-06-05 19:38:44 | × | Cale quits (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) (Remote host closed the connection) |
| 2021-06-05 19:42:37 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.0.1) |
| 2021-06-05 19:45:48 | → | malvo joins (~malvo@malvo.org) |
| 2021-06-05 19:46:32 | → | Cale joins (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) |
| 2021-06-05 19:46:35 | × | Cale quits (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) (Remote host closed the connection) |
| 2021-06-05 19:46:35 | × | mikoto-chan quits (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) (Ping timeout: 245 seconds) |
| 2021-06-05 19:46:52 | × | sheepduck quits (~sheepduck@2607:fea8:2a60:b700::8a94) (Remote host closed the connection) |
| 2021-06-05 19:46:53 | × | GuerrillaMonkey quits (~Jeanne-Ka@static-198-54-128-61.cust.tzulo.com) (Quit: Leaving) |
| 2021-06-05 19:47:02 | → | Cale joins (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) |
| 2021-06-05 19:47:03 | → | Jeanne-Kamikaze joins (~Jeanne-Ka@static-198-54-128-61.cust.tzulo.com) |
| 2021-06-05 19:47:53 | × | malvo quits (~malvo@malvo.org) (Remote host closed the connection) |
| 2021-06-05 19:48:00 | → | sheepduck joins (~sheepduck@2607:fea8:2a60:b700::8a94) |
| 2021-06-05 19:48:06 | → | malvo joins (~malvo@malvo.org) |
| 2021-06-05 19:48:33 | × | malvo quits (~malvo@malvo.org) (Remote host closed the connection) |
| 2021-06-05 19:48:59 | → | malvo joins (~malvo@malvo.org) |
| 2021-06-05 19:49:36 | → | river joins (~river@tilde.team/user/river) |
| 2021-06-05 19:52:13 | × | reumeth quits (~reumeth@user/reumeth) (Ping timeout: 272 seconds) |
| 2021-06-05 19:57:00 | × | ikex quits (~ash@user/ikex) (Ping timeout: 245 seconds) |
| 2021-06-05 19:57:05 | × | ddellacosta quits (~ddellacos@86.106.143.144) (Remote host closed the connection) |
| 2021-06-05 19:58:25 | ← | safinaskar parts (~user@109.252.90.89) () |
| 2021-06-05 19:59:12 | → | ikex joins (~ash@user/ikex) |
| 2021-06-05 20:01:24 | → | kubes joins (~kubes@188.120.84.109) |
| 2021-06-05 20:01:57 | × | azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Ping timeout: 265 seconds) |
| 2021-06-05 20:02:43 | × | kubes quits (~kubes@188.120.84.109) (Client Quit) |
| 2021-06-05 20:02:55 | → | kubes joins (~kubes@188.120.84.109) |
| 2021-06-05 20:05:30 | × | kubes quits (~kubes@188.120.84.109) (Client Quit) |
| 2021-06-05 20:05:42 | × | juhp quits (~juhp@128.106.188.199) (Ping timeout: 264 seconds) |
| 2021-06-05 20:06:25 | → | azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) |
| 2021-06-05 20:06:35 | × | Bartosz quits (~textual@24.35.90.211) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-06-05 20:07:38 | → | juhp joins (~juhp@128.106.188.199) |
| 2021-06-05 20:08:34 | → | dkeohane joins (~dkeohane@24.224.118.138) |
| 2021-06-05 20:10:00 | × | emliunix quits (~emliunix@103.138.74.59) (Remote host closed the connection) |
| 2021-06-05 20:10:17 | → | emliunix joins (~emliunix@103.138.74.59) |
| 2021-06-05 20:11:13 | → | ddellacosta joins (~ddellacos@86.106.121.209) |
| 2021-06-05 20:11:40 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 2021-06-05 20:12:28 | → | Heffalump joins (~ganesh@urchin.earth.li) |
| 2021-06-05 20:12:34 | ← | Heffalump parts (~ganesh@urchin.earth.li) () |
| 2021-06-05 20:12:35 | × | pritambaral quits (~pritam@user/pritambaral) (Ping timeout: 265 seconds) |
| 2021-06-05 20:13:09 | → | Heffalump joins (~ganesh@urchin.earth.li) |
| 2021-06-05 20:13:26 | ← | Heffalump parts (~ganesh@urchin.earth.li) () |
| 2021-06-05 20:17:54 | → | mc47 joins (~yecinem@89.246.239.190) |
| 2021-06-05 20:19:28 | × | ddellacosta quits (~ddellacos@86.106.121.209) (Remote host closed the connection) |
| 2021-06-05 20:19:38 | → | ddellacosta joins (~ddellacos@86.106.121.209) |
| 2021-06-05 20:20:58 | → | ddellaco_ joins (~ddellacos@86.106.121.170) |
| 2021-06-05 20:21:56 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 2021-06-05 20:24:05 | × | ddellacosta quits (~ddellacos@86.106.121.209) (Ping timeout: 245 seconds) |
| 2021-06-05 20:24:53 | <hololeap> | > So with your suggestion I couldn't have both `MyMemory Integer String` and `MyMemory Float Double`? -- No, having both of those would be fine, but you couldn't have, for instance, `MyMemory Integer String` and `MyMemory Integer Float`, since Integer uniquely determines what b will be. it says that if `a` is `Integer` then we know what `b` is since there can only be one instance for `a ~ Integer` |
| 2021-06-05 20:24:54 | <lambdabot> | <hint>:1:56: error: parse error on input ‘Integer’ |
| 2021-06-05 20:27:25 | × | sayola quits (~vekto@dslc-082-082-145-205.pools.arcor-ip.net) (Ping timeout: 245 seconds) |
| 2021-06-05 20:27:52 | <boxscape> | hololeap my original suggestion was having both mem -> k and mem -> v, so in `instance Memory MyMemory Integer String`, MyMemory would determine both Integer and String |
| 2021-06-05 20:28:51 | <hololeap> | ok, my bad |
| 2021-06-05 20:30:17 | × | ddellaco_ quits (~ddellacos@86.106.121.170) (Remote host closed the connection) |
| 2021-06-05 20:30:29 | → | Bartosz joins (~textual@24.35.90.211) |
| 2021-06-05 20:31:10 | × | dkeohane quits (~dkeohane@24.224.118.138) (Ping timeout: 245 seconds) |
| 2021-06-05 20:31:29 | → | sayola joins (~vekto@dslc-082-082-145-205.pools.arcor-ip.net) |
| 2021-06-05 20:32:16 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 2021-06-05 20:34:05 | × | fendor quits (~fendor@91.141.0.144.wireless.dyn.drei.com) (Read error: Connection reset by peer) |
| 2021-06-05 20:35:47 | × | azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Ping timeout: 252 seconds) |
| 2021-06-05 20:36:17 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e061:bfad:5c85:da98) (Remote host closed the connection) |
All times are in UTC.