2025/02/23

Newest at the top

2025-02-23 11:47:05 +0100tnt2(~Thunderbi@user/tnt1) tnt1
2025-02-23 11:46:08 +0100Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) Tuplanolla
2025-02-23 11:45:22 +0100 <Noinia> c_wraith: Thanks! That'll do
2025-02-23 11:44:42 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-23 11:43:12 +0100tnt2tnt1
2025-02-23 11:43:12 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 244 seconds)
2025-02-23 11:42:33 +0100sprotte24(~sprotte24@p200300d16f2727003925c1dc90f00c62.dip0.t-ipconnect.de)
2025-02-23 11:42:33 +0100tnt2(~Thunderbi@user/tnt1) tnt1
2025-02-23 11:42:25 +0100 <haskellbridge> <ozkutuk> Liamzee: what do you mean by "optionally run on deriving"?
2025-02-23 11:40:17 +0100tnt2(~Thunderbi@user/tnt1) (Ping timeout: 248 seconds)
2025-02-23 11:39:11 +0100 <c_wraith> is that cheating too much?
2025-02-23 11:39:02 +0100 <lambdabot> APrism s t a b -> b -> t
2025-02-23 11:39:01 +0100 <c_wraith> :t \p -> withPrism p (\f _ -> f)
2025-02-23 11:38:46 +0100tnt1(~Thunderbi@user/tnt1) tnt1
2025-02-23 11:36:45 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 276 seconds)
2025-02-23 11:36:43 +0100 <haskellbridge> <Liamzee> are there any optic libraries that optionally run on deriving?
2025-02-23 11:35:45 +0100tnt2(~Thunderbi@user/tnt1) tnt1
2025-02-23 11:35:03 +0100 <Noinia> I would still expect to be able to write a function with the type signature I gave. (i.e. 'Prism s t a b -> b -> t'). But then I indeed have to dig a bit deeper in the internals
2025-02-23 11:33:53 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2025-02-23 11:33:24 +0100 <Noinia> that at least explains the type error.
2025-02-23 11:33:08 +0100 <Noinia> Ah thanks, well spotted.
2025-02-23 11:32:46 +0100 <haskellbridge> <ozkutuk> that's what I understood from the types anyway
2025-02-23 11:32:23 +0100 <haskellbridge> <ozkutuk> "Optic'" is defined as a "simple" optic, that is it would only work with prisms of type "Prism s s a a"
2025-02-23 11:32:23 +0100tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
2025-02-23 11:32:16 +0100atwm(~andrew@19-193-28-81.ftth.cust.kwaoo.net) (Ping timeout: 272 seconds)
2025-02-23 11:32:16 +0100 <haskellbridge> <ozkutuk> "re" is accepting "AReview", which is an alias of "Optic' ...".
2025-02-23 11:31:39 +0100tnt2tnt1
2025-02-23 11:31:38 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 245 seconds)
2025-02-23 11:30:25 +0100tnt2(~Thunderbi@user/tnt1) tnt1
2025-02-23 11:29:18 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-23 11:28:26 +0100misterfish(~misterfis@84.53.85.146) misterfish
2025-02-23 11:28:26 +0100 <Noinia> -> Data.Tagged.Tagged s (Identity t)
2025-02-23 11:28:25 +0100 <Noinia> Actual: Data.Tagged.Tagged a (Identity b)
2025-02-23 11:28:25 +0100 <Noinia> Expected: AReview t b
2025-02-23 11:28:25 +0100 <Noinia> • Couldn't match type ‘a’ with ‘b’
2025-02-23 11:28:25 +0100 <Noinia> Main.hs:7:14: error: [GHC-25897]
2025-02-23 11:27:30 +0100frontin(~newyear@2.219.56.221)
2025-02-23 11:27:21 +0100tnt1(~Thunderbi@user/tnt1) tnt1
2025-02-23 11:27:11 +0100 <c_wraith> I'm not seeing where it disagrees.
2025-02-23 11:27:03 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
2025-02-23 11:25:37 +0100 <Noinia> indeed, but the haddockss suggest that I should be able to use 're p' as if it is a Getter b t. The little code snippet I gave seems to disagree
2025-02-23 11:25:13 +0100 <c_wraith> So there will be a bunch of examples of types that it can be instantiated to
2025-02-23 11:24:31 +0100 <c_wraith> because the true type is significant more polymorphic, in a way that's hard to read
2025-02-23 11:24:14 +0100 <c_wraith> the lens haddocks often include sections with multiple types that something *acts* like it has
2025-02-23 11:21:34 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-23 11:20:24 +0100tnt1(~Thunderbi@user/tnt1) tnt1
2025-02-23 11:17:35 +0100 <Noinia> (in particular, somehow in my examples the type of 're p' (where p is some prism) seems to disagree with what the haddocks are promissing
2025-02-23 11:17:08 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-23 11:16:24 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 246 seconds)
2025-02-23 11:14:29 +0100 <Noinia> I'm trying to use a 'Prism s t a b' as a function 'b -> t'. If I understand the docs correctly that should simply be using 'review', but somehow that gives me a type error: https://play.haskell.org/saved/XKsuF05Q am I missing something obvious?