2025/11/11

Newest at the top

2025-11-11 12:52:25 +0100__monty__(~toonn@user/toonn) toonn
2025-11-11 12:51:07 +0100chiselfuse(~chiselfus@user/chiselfuse) chiselfuse
2025-11-11 12:50:32 +0100chiselfuse(~chiselfus@user/chiselfuse) (Remote host closed the connection)
2025-11-11 12:49:55 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 240 seconds)
2025-11-11 12:48:28 +0100trickard_(~trickard@cpe-62-98-47-163.wireline.com.au)
2025-11-11 12:48:14 +0100trickard_(~trickard@cpe-62-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-11-11 12:47:28 +0100kuribas(~user@2a02-1810-2825-6000-c59e-d8f1-aea0-564e.ip6.access.telenet.be) (Remote host closed the connection)
2025-11-11 12:45:37 +0100merijn(~merijn@77.242.116.146) merijn
2025-11-11 12:44:47 +0100 <kuribas> It should not exist, because the few times you need it, you can just wrap ReaderT, and it will be also easier to understand the code.
2025-11-11 12:44:14 +0100 <kuribas> For example Monad and Applicative on (->)
2025-11-11 12:44:06 +0100 <kuribas> It's easy to get wrong behaviour, since it picks the wrong instance.
2025-11-11 12:43:50 +0100 <kuribas> loonycyborg: It's the same with putting type classes on every possible type.
2025-11-11 12:42:15 +0100dlock23(~dlock@user/dlock23) dlock23
2025-11-11 12:41:17 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 256 seconds)
2025-11-11 12:36:35 +0100merijn(~merijn@77.242.116.146) merijn
2025-11-11 12:33:03 +0100qqe(~qqq@185.54.21.203)
2025-11-11 12:31:40 +0100Square3(~Square@user/square) (Ping timeout: 256 seconds)
2025-11-11 12:29:27 +0100Ranhir(~Ranhir@157.97.53.139) Ranhir
2025-11-11 12:28:25 +0100 <haskellbridge> <loonycyborg> Row polymorphism sounds like really unsafe idea. Because you can't be really sure that doing something on a subset of rows of ANY record just because they have particular types will do anything useful.
2025-11-11 12:28:11 +0100 <mreh> the associated type is in the type signature already
2025-11-11 12:27:15 +0100 <mreh> but that's only when you have an exmplicit type signature
2025-11-11 12:27:07 +0100 <mreh> I guess because I'm used to supplying contraints when using type class methods
2025-11-11 12:26:46 +0100xff0x(~xff0x@2405:6580:b080:900:e7c9:4386:1015:3b04) (Client Quit)
2025-11-11 12:26:37 +0100 <kuribas> Everything inside the class definition implies the class constraints.
2025-11-11 12:26:33 +0100Square3(~Square@user/square) Square
2025-11-11 12:26:20 +0100 <kuribas> Why would that be surprising?
2025-11-11 12:25:53 +0100 <mreh> yup
2025-11-11 12:25:08 +0100 <kuribas> Well, if the type family is inside the class definition, the GHC will know it must be an instance.
2025-11-11 12:24:36 +0100 <mreh> to see GHC do that
2025-11-11 12:24:31 +0100 <mreh> it was just a little unexpected,
2025-11-11 12:24:01 +0100 <kuribas> idk
2025-11-11 12:23:43 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 256 seconds)
2025-11-11 12:23:06 +0100 <mreh> kuribas: yeah, isn't that called an "associated type"?
2025-11-11 12:22:53 +0100 <mreh> Is that what you thought I meant?
2025-11-11 12:22:53 +0100 <kuribas> mreh: You mean it's a type family inside a typeclass?
2025-11-11 12:22:40 +0100 <mreh> But I guess it works it out.
2025-11-11 12:22:36 +0100Googulator33(~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu)
2025-11-11 12:22:35 +0100xff0x(~xff0x@2405:6580:b080:900:e7c9:4386:1015:3b04)
2025-11-11 12:22:29 +0100 <mreh> I haven't told GHC to look for the typeclass that AssociatedType is from.
2025-11-11 12:22:20 +0100 <kuribas> What do you mean then?
2025-11-11 12:22:19 +0100Googulator33(~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Quit: Client closed)
2025-11-11 12:21:33 +0100 <mreh> I think you misunderstand.
2025-11-11 12:17:36 +0100 <kuribas> mreh: "Eq a" isn't even checked when resolving the instance, if it resolves to "Ord a", then "Eq a" must be met, or it is a type error.
2025-11-11 12:16:55 +0100Ranhir(~Ranhir@157.97.53.139) (Ping timeout: 240 seconds)
2025-11-11 12:16:29 +0100 <kuribas> mreh: so "class Eq a => Ord a", means everytime you use "Ord a", it implies "Eq a".
2025-11-11 12:15:15 +0100 <kuribas> in a class or instance definition I mean.
2025-11-11 12:14:30 +0100 <kuribas> mreh: constraints, are only checked after resolving the instances.
2025-11-11 12:14:04 +0100 <kuribas> mreh: yes
2025-11-11 12:13:43 +0100 <mreh> e.g. `Enum (AssociatedType t) => ...`
2025-11-11 12:12:47 +0100 <mreh> Do associated types in a Constraint also imply their typeclass? I guess they would have to.