2025/11/09

Newest at the top

2025-11-09 11:39:06 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-09 11:37:45 +0100trickard_trickard
2025-11-09 11:33:43 +0100__monty__(~toonn@user/toonn) toonn
2025-11-09 11:31:57 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
2025-11-09 11:30:15 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2025-11-09 11:27:34 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2025-11-09 11:24:14 +0100Lycurgus(~juan@user/Lycurgus) Lycurgus
2025-11-09 11:21:02 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-09 11:16:44 +0100trickard_(~trickard@cpe-62-98-47-163.wireline.com.au)
2025-11-09 11:14:25 +0100Nachtgespenst(~user@user/siracusa) siracusa
2025-11-09 11:10:51 +0100 <kaol> It's a nice new angle to think of what it does.
2025-11-09 11:10:07 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-11-09 11:10:01 +0100 <kaol> Why didn't I think of that. Thanks.
2025-11-09 11:09:53 +0100tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
2025-11-09 11:07:31 +0100 <Leary> kaol: `Data.Proxy`
2025-11-09 11:05:19 +0100trickard_(~trickard@cpe-62-98-47-163.wireline.com.au) (Ping timeout: 260 seconds)
2025-11-09 11:05:15 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-09 11:04:57 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) humasect
2025-11-09 10:56:43 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-11-09 10:56:42 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
2025-11-09 10:55:04 +0100 <tomsmeding> fair
2025-11-09 10:54:01 +0100 <kaol> I may need the construct across multiple modules and then I'd be better off using the same data One a = One via an import and if I import then I could get it from a library as well.
2025-11-09 10:51:37 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-09 10:51:13 +0100 <tomsmeding> kaol: as dibblego mentioned, you don't need predefined types for this, and in fact it might be more intuitive to write your own; the "no values at all" is `data None a` (isomorphic to Const Void), and the "exactly one value" is `data One a = One` (isomorphic to Const ())
2025-11-09 10:49:10 +0100 <kaol> Neat. I'm not sure if I need it after all but I started still thinking that surely there's a Type -> Type for this case too.
2025-11-09 10:47:57 +0100Tuplanolla(~Tuplanoll@91-159-187-167.elisa-laajakaista.fi) Tuplanolla
2025-11-09 10:47:44 +0100 <tomsmeding> then Const () :)
2025-11-09 10:47:40 +0100 <tomsmeding> oh I see
2025-11-09 10:47:17 +0100 <kaol> I'm not sure if I can have any values having that type. I'd still like to have a record containing the other fields.
2025-11-09 10:46:28 +0100trickard_(~trickard@cpe-62-98-47-163.wireline.com.au)
2025-11-09 10:46:15 +0100trickard_(~trickard@cpe-62-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-11-09 10:43:24 +0100califax(~califax@user/califx) califx
2025-11-09 10:42:22 +0100califax(~califax@user/califx) (Remote host closed the connection)
2025-11-09 10:40:52 +0100 <tomsmeding> Const Void
2025-11-09 10:40:48 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-11-09 10:39:53 +0100 <kaol> I was thinking that if I have some data Foo a = { foo :: a Int } then I can have Foo Identity to have something that always has a foo and Foo Maybe that would optionally have a foo. I wondered whether there is some Foo X that would give me a data that'd have no foo.
2025-11-09 10:38:48 +0100 <tomsmeding> one of these, exercise for the reader to figure out which
2025-11-09 10:38:27 +0100 <tomsmeding> bah my brain this morning
2025-11-09 10:38:03 +0100 <tomsmeding> it's more like (), and either `data X a` indeed, or `Const ()`, works
2025-11-09 10:37:49 +0100 <tomsmeding> but then it's not like Void
2025-11-09 10:37:37 +0100 <dibblego> er, data
2025-11-09 10:37:33 +0100 <tomsmeding> a newtype must have one constructor
2025-11-09 10:37:20 +0100 <dibblego> I understand the question to mean: newtype X a;
2025-11-09 10:37:18 +0100 <tomsmeding> (Data.Functor.Const in base)
2025-11-09 10:37:08 +0100 <tomsmeding> If yes then `Const ()`; if no then `Const Void`
2025-11-09 10:36:19 +0100 <tomsmeding> kaol: should there be a value of this type or not? "Maybe that is always Nothing" has 1 value (Nothing); VOid has 0 values
2025-11-09 10:35:50 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-09 10:35:48 +0100 <tomsmeding> a -> Void, rather
2025-11-09 10:33:15 +0100califax(~califax@user/califx) califx
2025-11-09 10:33:00 +0100 <humasect> a -> () ?