Logs: freenode/#haskell
| 2020-11-17 09:10:16 | → | PacoV joins (~pcoves@16.194.31.93.rev.sfr.net) |
| 2020-11-17 09:10:18 | <PacoV> | Hi again. |
| 2020-11-17 09:10:39 | <PacoV> | I now have this code http://ix.io/2ErU/haskell and this error http://ix.io/2ErW |
| 2020-11-17 09:10:58 | <PacoV> | What does it mean `use a standalone 'deriving instance' declaration` here? |
| 2020-11-17 09:11:02 | <Netsu> | Hello. Are type constraint synonym and typeclass alias semantically the same? |
| 2020-11-17 09:11:29 | <PacoV> | As I now have a lazy Map String String, why can't it derive from Binary? |
| 2020-11-17 09:11:40 | <kuribas> | PacoV: it means it cannot derive the Binary instance |
| 2020-11-17 09:11:52 | <dminuoso> | PacoV: GND doesnt magically figure out things, it just "pierces the newtype wrapper" |
| 2020-11-17 09:11:56 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2020-11-17 09:12:04 | <kuribas> | PacoV: because LTranslation is not an instance of Binary |
| 2020-11-17 09:12:26 | <dminuoso> | So when "the thing contained has some instance" then GND lets you "copy" the instance for the newtype wrapper. But it requires the contained thing to already have that instance |
| 2020-11-17 09:12:34 | <dminuoso> | PacoV: At any rate. For binary, dont use typeclasses. |
| 2020-11-17 09:12:38 | <dminuoso> | Use put/get directly |
| 2020-11-17 09:12:59 | <dminuoso> | (It's the one big wart of the library) |
| 2020-11-17 09:13:07 | <PacoV> | dminuoso: But, Map String String derives from Binary. |
| 2020-11-17 09:13:15 | <Netsu> | like `type MyAlias m = (MonadA m, MonadB m)` and `class (MonadA m, MonadB m) => MyAlias m`. Is it the same, or second approach more nominal and require explicit instance declaration on the such constrained type? |
| 2020-11-17 09:13:25 | <kuribas> | PacoV: maybe you want this? http://hackage.haskell.org/package/binary-instances-1 |
| 2020-11-17 09:13:32 | × | Axman6 quits (~Axman6@pdpc/supporter/student/Axman6) (Remote host closed the connection) |
| 2020-11-17 09:13:37 | <dminuoso> | Netsu: They are not the same |
| 2020-11-17 09:13:40 | <Netsu> | Would instanced be resolved in same way in both cases |
| 2020-11-17 09:13:47 | → | Axman6 joins (~Axman6@pdpc/supporter/student/Axman6) |
| 2020-11-17 09:13:56 | <dminuoso> | Netsu: MyAlias *implies* MonadA and MonadB, so its stronger |
| 2020-11-17 09:14:05 | <dminuoso> | Say, there could be things MonadA and MonadB but not MyAlias |
| 2020-11-17 09:14:44 | <dminuoso> | And it does indeed require explicit instances |
| 2020-11-17 09:14:49 | → | enoq joins (~textual@194-208-146-143.lampert.tv) |
| 2020-11-17 09:15:07 | <dminuoso> | Even if MyAlias is empty, GHC couldnt magically just induce instances from that. What if MyAlias demands extra laws? |
| 2020-11-17 09:15:51 | <dminuoso> | Netsu: Also the superclass version is more composable |
| 2020-11-17 09:16:27 | <dminuoso> | Oh, it's not. Interesting TIL |
| 2020-11-17 09:16:39 | <PacoV> | kuribas: that looks good. I'll see how to use it. Simply import Data.Binary.Instances.UnorderedContainers ? |
| 2020-11-17 09:16:41 | <kuribas> | dminuoso: In my case, the difference on value level is that one will be that without the constraint, you can generate queries which will generate an error. However that is on the remote service, not in my program. |
| 2020-11-17 09:16:47 | <kuribas> | PacoV: yes |
| 2020-11-17 09:17:03 | <PacoV> | And, if I get you people right, |
| 2020-11-17 09:17:09 | → | christo joins (~chris@81.96.113.213) |
| 2020-11-17 09:17:09 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 2020-11-17 09:17:14 | <PacoV> | i've to remove the newtype wrapper. |
| 2020-11-17 09:17:45 | <Netsu> | dminuoso: thank you a lot! Could you describe in more details, please? So first case (type constraint alias) -- it equal. And second one (type class) -- it just implies? |
| 2020-11-17 09:18:05 | <kuribas> | dminuoso: if I fetch an attribute for an object of the wrong class, the remote server will return an error. |
| 2020-11-17 09:19:00 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 2020-11-17 09:19:01 | → | logicmoo joins (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) |
| 2020-11-17 09:19:08 | × | dmiles quits (dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Ping timeout: 256 seconds) |
| 2020-11-17 09:19:26 | → | sakirious2 joins (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) |
| 2020-11-17 09:20:34 | → | thc202 joins (~thc202@unaffiliated/thc202) |
| 2020-11-17 09:21:05 | → | pdxleif_ joins (~pdxleif@ec2-54-68-166-10.us-west-2.compute.amazonaws.com) |
| 2020-11-17 09:21:14 | × | pdxleif quits (~pdxleif@ec2-54-68-166-10.us-west-2.compute.amazonaws.com) (Ping timeout: 265 seconds) |
| 2020-11-17 09:21:30 | pdxleif_ | is now known as pdxleif |
| 2020-11-17 09:21:43 | × | christo quits (~chris@81.96.113.213) (Ping timeout: 265 seconds) |
| 2020-11-17 09:21:43 | × | sakirious quits (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) (Ping timeout: 265 seconds) |
| 2020-11-17 09:21:43 | sakirious2 | is now known as sakirious |
| 2020-11-17 09:22:12 | × | Rembane quits (~Rembane@li346-36.members.linode.com) (Ping timeout: 265 seconds) |
| 2020-11-17 09:22:37 | → | Rembane joins (~Rembane@li346-36.members.linode.com) |
| 2020-11-17 09:25:38 | × | PragCypher quits (~cypher@li1507-98.members.linode.com) (Quit: ZNC 1.7.5 - https://znc.in) |
| 2020-11-17 09:25:52 | → | PragCypher joins (~cypher@li1507-98.members.linode.com) |
| 2020-11-17 09:26:19 | → | petersen_ joins (~petersen@redhat/juhp) |
| 2020-11-17 09:26:49 | × | morbeus quits (vhamalai@gateway/shell/tkk.fi/x-ufpngpdloddgzoih) (Ping timeout: 246 seconds) |
| 2020-11-17 09:26:56 | → | morbeus joins (vhamalai@gateway/shell/tkk.fi/x-sygopmpjleahuvxk) |
| 2020-11-17 09:27:10 | × | petersen quits (~petersen@redhat/juhp) (Ping timeout: 246 seconds) |
| 2020-11-17 09:27:46 | → | mniip_ joins (~mniip@freenode/staff/mniip) |
| 2020-11-17 09:27:49 | petersen_ | is now known as petersen |
| 2020-11-17 09:28:04 | → | __monty__ joins (~toonn@unaffiliated/toonn) |
| 2020-11-17 09:31:52 | × | mniip quits (~mniip@freenode/staff/mniip) (Ping timeout: 619 seconds) |
| 2020-11-17 09:38:14 | <PacoV> | It works! |
| 2020-11-17 09:38:25 | <PacoV> | \o/ Yeah \o/ |
| 2020-11-17 09:38:29 | <PacoV> | Thanks all! |
| 2020-11-17 09:40:00 | <PacoV> | Damn... Same problem with Writable now... |
| 2020-11-17 09:40:33 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@cm-171-98-79-192.revip7.asianet.co.th) |
| 2020-11-17 09:40:34 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 2020-11-17 09:43:00 | <PacoV> | Wich was easy, it works. |
| 2020-11-17 09:43:12 | × | ArsenArsen quits (~Arsen@kshare/developer/ArsenArsen) (Changing host) |
| 2020-11-17 09:43:12 | → | ArsenArsen joins (~Arsen@fsf/member/ArsenArsen) |
| 2020-11-17 09:43:48 | × | berberman quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.7.5 - https://znc.in) |
| 2020-11-17 09:44:06 | × | xsperry quits (~as@unaffiliated/xsperry) () |
| 2020-11-17 09:44:28 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-11-17 09:44:31 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 2020-11-17 09:50:33 | <dminuoso> | Netsu: Right. If a class constraint is satisfied, that implies the superclass constraints. |
| 2020-11-17 09:50:37 | × | CindyLinz quits (~cindy_utf@112.121.78.20) (Ping timeout: 264 seconds) |
| 2020-11-17 09:50:46 | → | CindyLinz joins (~cindy_utf@112.121.78.20) |
| 2020-11-17 09:51:23 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 2020-11-17 09:51:44 | <Netsu> | thanks |
| 2020-11-17 09:52:15 | × | Netsu quits (5f84a760@96-167-132-95.pool.ukrtel.net) (Remote host closed the connection) |
| 2020-11-17 09:54:46 | × | codeAlways quits (uid272474@gateway/web/irccloud.com/x-dbuczpztyxqztxlt) (Quit: Connection closed for inactivity) |
| 2020-11-17 09:55:12 | → | xsperry joins (~as@unaffiliated/xsperry) |
| 2020-11-17 09:55:38 | → | oldsk00l joins (~znc@ec2-18-130-254-135.eu-west-2.compute.amazonaws.com) |
| 2020-11-17 09:56:07 | × | oldsk00l_ quits (~znc@ec2-18-130-254-135.eu-west-2.compute.amazonaws.com) (Ping timeout: 256 seconds) |
| 2020-11-17 09:56:40 | → | hardaker joins (~hardaker@193.56.252.12) |
| 2020-11-17 09:56:42 | × | Deewiant quits (~deewiant@de1.ut.deewiant.iki.fi) (Ping timeout: 256 seconds) |
| 2020-11-17 09:57:43 | → | Deewiant joins (~deewiant@de1.ut.deewiant.iki.fi) |
| 2020-11-17 09:57:51 | → | jollygood2 joins (~bc8165ab@217.29.117.252) |
| 2020-11-17 10:00:00 | → | gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh) |
| 2020-11-17 10:01:10 | → | oish joins (~charlie@228.25.169.217.in-addr.arpa) |
| 2020-11-17 10:03:46 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 265 seconds) |
| 2020-11-17 10:04:28 | → | Rudd0 joins (~Rudd0@185.189.115.108) |
| 2020-11-17 10:05:23 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 2020-11-17 10:10:17 | × | rprije quits (~rprije@124.148.131.132) (Ping timeout: 256 seconds) |
| 2020-11-17 10:11:23 | → | mniip joins (~mniip@freenode/staff/mniip) |
| 2020-11-17 10:15:22 | × | mniip_ quits (~mniip@freenode/staff/mniip) (Ping timeout: 619 seconds) |
| 2020-11-17 10:18:17 | × | invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 272 seconds) |
| 2020-11-17 10:18:38 | → | solonarv joins (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) |
| 2020-11-17 10:20:47 | × | jzl quits (~jzl@unaffiliated/jzl) (Ping timeout: 260 seconds) |
| 2020-11-17 10:23:19 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 2020-11-17 10:23:48 | × | sveit quits (~sveit@2001:19f0:ac01:247:5400:ff:fe5c:689f) (Quit: Bye) |
All times are in UTC.