2024/11/19

Newest at the top

2024-11-19 17:32:56 +0100 <droshux> Hi everyone :)
2024-11-19 17:32:41 +0100euleritian(~euleritia@dynamic-176-001-192-221.176.1.pool.telefonica.de) (Ping timeout: 252 seconds)
2024-11-19 17:31:18 +0100droshux(~droshux@147.188.245.217) droshux
2024-11-19 17:22:04 +0100Square2(~Square4@user/square) (Ping timeout: 252 seconds)
2024-11-19 17:18:38 +0100Square(~Square@user/square) Square
2024-11-19 17:11:24 +0100pabs3(~pabs3@user/pabs3) pabs3
2024-11-19 17:11:24 +0100 <Leary> bwe: Consider something like `type data AB = A | B`; `data Variant (ab :: AB) where { Variant1 :: Variant A; Variant2 :: Variant B }`.
2024-11-19 17:09:35 +0100 <Leary> bwe: The correct type signature would be `genProxy :: Variant -> exists a. HasFoo a *> Proxy a`, but haskell does not have an existential quantifier. In general you can encode existentials with universals, but that would be pointless with `Proxy` as the type cannot be recovered.
2024-11-19 17:09:22 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) ubert
2024-11-19 17:09:08 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Remote host closed the connection)
2024-11-19 17:07:30 +0100gentauro(~gentauro@user/gentauro) gentauro
2024-11-19 17:06:45 +0100pabs3(~pabs3@user/pabs3) (Ping timeout: 248 seconds)
2024-11-19 17:05:13 +0100 <bwe> Is this possible at all? My compiler complains: https://paste.tomsmeding.com/Yq5YBhtC
2024-11-19 17:05:00 +0100 <bwe> dminuoso: how about generating a Proxy from a sum type stored with db, that indicates the variant of an entry? Variant1 -> Proxy @A
2024-11-19 17:01:50 +0100gentauro(~gentauro@user/gentauro) (Read error: Connection reset by peer)
2024-11-19 16:56:02 +0100loonycyborg(loonycybor@wesnoth/developer/loonycyborg) (Ping timeout: 252 seconds)
2024-11-19 16:55:51 +0100loonycyborg_(loonycybor@chat.chantal.wesnoth.org)
2024-11-19 16:53:36 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-11-19 16:52:45 +0100notzmv(~daniel@user/notzmv) notzmv
2024-11-19 16:50:01 +0100 <hellwolf> (in theory, but I am not sure how to, in this case)
2024-11-19 16:49:32 +0100 <hellwolf> You somehow need to inject some how that a [b] -> c; you'd need a type family dependency to inject that.
2024-11-19 16:49:21 +0100notzmv(~daniel@user/notzmv) (Ping timeout: 276 seconds)
2024-11-19 16:48:16 +0100 <hellwolf> f-a: I see. I guess having a b -> c in the constraint, it does not infer a [b] -> c is the reason.
2024-11-19 16:47:33 +0100misterfish(~misterfis@31-161-39-137.biz.kpn.net) (Ping timeout: 248 seconds)
2024-11-19 16:45:05 +0100 <Leary> Unrelated TH question: we have `liftData :: (Data a, Quote q) => a -> q Exp` and `liftTyped :: (Lift a, Quote q) => a -> Code q a`. Why no `liftDataTyped :: (Data a, Quote q) => a -> Code q a`? I've written it myself, but I don't like that I had to use `unsafeCodeCoerce`.
2024-11-19 16:44:26 +0100 <f-a> hellwolf: if I add a signature to that function (`f :: Mul a [b] b => Bool -> a -> b -> b`) the program compiles. This is not a real program, it is an example taken from the GHC manual. I want to understand why GHC cannot infer `Mult [b] b`.
2024-11-19 16:42:43 +0100 <hellwolf> the instance you added was not workable, and signals something wrong. what do you want to achieve?
2024-11-19 16:40:30 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.4.2)
2024-11-19 16:37:01 +0100 <Leary> f-a: Guesswork: it does infer that much, but the constraint is not explicitly given so GHC tries to resolve it from top-level instances. `instance Mul a b c => Mul a [b] [c]` & `b ~ [c]` then put it into a loop.
2024-11-19 16:36:56 +0100 <f-a> adding f :: Mul a [b] b => Bool -> a -> b -> b
2024-11-19 16:36:11 +0100 <f-a> the example is take from the end of this paragraph, hellwolf https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/instances.html#instance-termination…
2024-11-19 16:35:57 +0100mari-estel(~mari-este@user/mari-estel) mari-estel
2024-11-19 16:35:47 +0100mari-estel(~mari-este@user/mari-estel) (Remote host closed the connection)
2024-11-19 16:35:26 +0100 <haskellbridge> <hellwolf> it seems a bottom is the only "valid" formular
2024-11-19 16:35:12 +0100 <haskellbridge> <hellwolf> Also, how "instance Mul a b c" can even have a parametric implementation? you know nothing about c
2024-11-19 16:34:17 +0100 <haskellbridge> <hellwolf> Perhaps removing the functional dependencies, since the first instance you have does not really comply with it?
2024-11-19 16:28:04 +0100weary-traveler(~user@user/user363627) user363627
2024-11-19 16:24:40 +0100son0p(~ff@2800:e6:4001:6cc3:2748:5c2a:65d9:57ac) son0p
2024-11-19 16:23:36 +0100 <f-a> https://pastebin.com/mzSwq1um UndecidableInstances question
2024-11-19 16:22:26 +0100alp(~alp@2001:861:8ca0:4940:789d:8e16:7be2:5e3) (Ping timeout: 248 seconds)
2024-11-19 16:21:15 +0100m5zs7k(aquares@web10.mydevil.net) m5zs7k
2024-11-19 16:21:14 +0100alp_(~alp@2001:861:8ca0:4940:483b:a21e:7fb4:76cd)
2024-11-19 16:20:51 +0100m5zs7k(aquares@web10.mydevil.net) (Read error: Connection reset by peer)
2024-11-19 16:18:26 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) ubert
2024-11-19 16:18:16 +0100f-a(ff2a@joined.irc.for-some.fun) f-a
2024-11-19 16:18:07 +0100ubert(~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Remote host closed the connection)
2024-11-19 16:18:00 +0100alp(~alp@2001:861:8ca0:4940:789d:8e16:7be2:5e3)
2024-11-19 16:17:37 +0100alp(~alp@2001:861:8ca0:4940:e2f7:5955:8ab2:2afc) (Remote host closed the connection)
2024-11-19 16:09:08 +0100divya`(~user@139.5.11.231) (Ping timeout: 244 seconds)
2024-11-19 16:00:08 +0100alexherbo2(~alexherbo@2a02-8440-3201-1725-d030-8edc-2b2b-9bf9.rev.sfr.net) (Remote host closed the connection)