2025/11/09

Newest at the top

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 -> () ?
2025-11-09 10:32:17 +0100califax(~califax@user/califx) (Remote host closed the connection)
2025-11-09 10:31:55 +0100 <kaol> Is there something like Void but that's * -> *? Sort of like Maybe that's guaranteed to always be Nothing.
2025-11-09 10:29:57 +0100trickard_(~trickard@cpe-62-98-47-163.wireline.com.au)
2025-11-09 10:29:43 +0100trickard(~trickard@cpe-62-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-11-09 10:24:55 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-11-09 10:20:57 +0100califax(~califax@user/califx) califx
2025-11-09 10:20:03 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-09 10:19:50 +0100califax(~califax@user/califx) (Remote host closed the connection)
2025-11-09 10:09:16 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2025-11-09 10:04:15 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-09 10:00:15 +0100trickard_trickard
2025-11-09 09:57:03 +0100fmlatghor(~lcoogan@user/fmlatghor) fmlatghor
2025-11-09 09:56:38 +0100fmlatghor(~lcoogan@user/fmlatghor) (Remote host closed the connection)
2025-11-09 09:55:36 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-11-09 09:51:27 +0100trickard_(~trickard@cpe-62-98-47-163.wireline.com.au)