Newest at the top
2025-03-12 05:35:46 +0100 | <euouae> | oh I see |
2025-03-12 05:35:09 +0100 | <EvanR> | ok nvm that |
2025-03-12 05:34:51 +0100 | <c_wraith> | and that's when things get fragile |
2025-03-12 05:34:45 +0100 | <c_wraith> | So then ghc is going to tell you to allow overlapping |
2025-03-12 05:34:37 +0100 | <c_wraith> | yeah, that example would trigger it, but that's not a problem. The problem is that that instance overlaps everything |
2025-03-12 05:34:32 +0100 | <EvanR> | does the implied kind expected by the hypothetical Foo class make sense there |
2025-03-12 05:34:24 +0100 | synchromesh | (~john@2406:5a00:24cf:bb00:98ab:59f5:dcb3:c8fc) synchromesh |
2025-03-12 05:34:04 +0100 | <euouae> | but I'm assuming you're saying that the more important/encountered issue is overlapping instances |
2025-03-12 05:33:15 +0100 | synchromesh | (~john@2406:5a00:24cf:bb00:c559:e625:333a:3d27) (Read error: Connection reset by peer) |
2025-03-12 05:33:15 +0100 | <euouae> | perhaps if I did `instance Foo (F x) => Foo x where ...`? |
2025-03-12 05:32:56 +0100 | <euouae> | I wasn't sure in what situation I'd run into undecidability with instance declarations |
2025-03-12 05:31:23 +0100 | <c_wraith> | UndecidableInstances is basically always fine to turn on. It's when you do and then GHC tells you the next thing to do is turn on overlapping, you know you're doing something wrong. |
2025-03-12 05:30:14 +0100 | mange | (~user@user/mange) mange |
2025-03-12 05:29:05 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-03-12 05:28:51 +0100 | <EvanR> | (unless you do overlapping instances and god help you) |
2025-03-12 05:28:35 +0100 | <EvanR> | typeclasses aren't built to do the sort of "overriding" that you see in prototypal OOP. Your type either has a single instance for the class, or it doesn't. Not competing instances with priority |
2025-03-12 05:27:16 +0100 | <EvanR> | it leads to overlapping instances |
2025-03-12 05:27:03 +0100 | <EvanR> | then ekmett gets to that in the response |
2025-03-12 05:26:51 +0100 | <EvanR> | the first thing I thought was "for some reason, this idea of default implementations that work for everything with a certain typeclass instance is frowned upon" and couldn't remember the reason |
2025-03-12 05:26:13 +0100 | infinity0 | (~infinity0@pwned.gg) (Ping timeout: 245 seconds) |
2025-03-12 05:24:40 +0100 | <euouae> | but at the same time it's fine because of the functional dependency | m -> s in the definition of MonadState in mtl |
2025-03-12 05:24:39 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-12 05:24:19 +0100 | <euouae> | what I gathered from the reddit post is that the 's' is not getting smaller and that is the issue |
2025-03-12 05:23:33 +0100 | <EvanR> | which these smaller conditions guarantee |
2025-03-12 05:23:16 +0100 | <EvanR> | it's really nice when the compiler knows that it will finish and not enter into an infinite loop |
2025-03-12 05:22:58 +0100 | JuanDaugherty | (~juan@user/JuanDaugherty) JuanDaugherty |
2025-03-12 05:22:52 +0100 | <EvanR> | The constraint ‘Monad (t n)’ is no smaller than the instance head (Use UndecidableInstances to permit this) |
2025-03-12 05:18:43 +0100 | <euouae> | This thread <https://www.reddit.com/r/haskell/comments/5zjwym/when_is_undecidableinstances_okay_to_use/> has good info on UndecidableInstances, the other two were easier to understand |
2025-03-12 05:13:39 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-03-12 05:06:58 +0100 | euouae | (~euouae@user/euouae) euouae |
2025-03-12 05:06:34 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-12 05:01:25 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 244 seconds) |
2025-03-12 05:00:29 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
2025-03-12 04:58:27 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Ping timeout: 252 seconds) |
2025-03-12 04:57:21 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-12 04:55:26 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-03-12 04:51:13 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-12 04:44:57 +0100 | izzyfalco | (~jake_pers@user/izzyfalco) (Ping timeout: 276 seconds) |
2025-03-12 04:43:31 +0100 | yegorc | (~yegorc@user/yegorc) (Quit: Leaving) |
2025-03-12 04:40:49 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-03-12 04:35:51 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-12 04:34:04 +0100 | Smiles | (uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2025-03-12 04:30:30 +0100 | enikar | (~enikar@user/enikar) (Quit: WeeChat 4.5.1) |
2025-03-12 04:24:44 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-03-12 04:20:29 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-12 04:16:39 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 265 seconds) |
2025-03-12 04:11:57 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-12 04:09:24 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-03-12 04:05:18 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-03-12 04:05:06 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |