Logs: liberachat/#haskell
| 2021-07-05 10:09:12 | × | Codaraxis_ quits (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) (Ping timeout: 272 seconds) |
| 2021-07-05 10:09:52 | <hseg> | ffs that was the most obtuse way of saying "newtype F ... = F (G ...) deriving C via (F ...)" loops, you want to replace it with G |
| 2021-07-05 10:10:02 | × | GIANTWORLDKEEPR_ quits (~pjetcetal@128-71-13-182.broadband.corbina.ru) (Remote host closed the connection) |
| 2021-07-05 10:10:38 | <boxscape> | Yeah I had wondered at some point whether maybe there should be a warning/error if you try to derive an instance of a type via itself |
| 2021-07-05 10:10:52 | <boxscape> | though I can't quite see how it arises from the code you shared |
| 2021-07-05 10:11:08 | <hseg> | (missed this because I was mentally translating type synonyms) |
| 2021-07-05 10:11:24 | <hseg> | had defined type Map = CM, type Map' = HashMap |
| 2021-07-05 10:11:24 | <boxscape> | makes sense |
| 2021-07-05 10:11:29 | <boxscape> | ah |
| 2021-07-05 10:11:44 | <hseg> | so I could convenienly replace underlying maps |
| 2021-07-05 10:12:01 | × | dunkeln quits (~dunkeln@188.71.194.238) (Ping timeout: 246 seconds) |
| 2021-07-05 10:12:31 | <int-e> | How does DerivingVia deal with associated type families? Does it fill those in first? Because that might well explain why you get *that* particular error. |
| 2021-07-05 10:12:44 | <int-e> | type ContainerKey set |
| 2021-07-05 10:12:59 | <int-e> | because you'll get a recursive definition for that one |
| 2021-07-05 10:15:04 | <hseg> | seems it just sets type T Age = T Int |
| 2021-07-05 10:15:05 | <hseg> | https://ghc-proposals.readthedocs.io/en/latest/proposals/0120-deriving-via.html |
| 2021-07-05 10:15:13 | <hseg> | though this isn't specified in manual |
| 2021-07-05 10:15:54 | <hseg> | is specified in the docs for GND though |
| 2021-07-05 10:16:07 | <hseg> | 6.6.5.3 in latest manual |
| 2021-07-05 10:18:10 | → | NoName__ joins (~Username@8.20.126.178) |
| 2021-07-05 10:19:04 | → | Feuermagier_ joins (~Feuermagi@154.28.188.87) |
| 2021-07-05 10:20:44 | × | NoName__ quits (~Username@8.20.126.178) (Client Quit) |
| 2021-07-05 10:21:30 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 240 seconds) |
| 2021-07-05 10:24:11 | → | dunkeln_ joins (~dunkeln@188.71.194.238) |
| 2021-07-05 10:25:36 | → | Morrow joins (~MorrowM_@147.161.8.68) |
| 2021-07-05 10:27:24 | × | kammao quits (~kammao@188.27.129.10) (Quit: Client closed) |
| 2021-07-05 10:27:58 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 2021-07-05 10:28:38 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 2021-07-05 10:28:41 | → | neo1 joins (~neo3@cpe-292712.ip.primehome.com) |
| 2021-07-05 10:29:18 | × | dunkeln_ quits (~dunkeln@188.71.194.238) (Ping timeout: 252 seconds) |
| 2021-07-05 10:30:11 | × | amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection) |
| 2021-07-05 10:30:55 | → | dunkeln joins (~dunkeln@188.71.194.238) |
| 2021-07-05 10:32:02 | → | neceve joins (~quassel@2a02:c7f:607e:d600:f762:20dd:304e:4b1f) |
| 2021-07-05 10:32:34 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2021-07-05 10:33:02 | × | kuribas quits (~user@ptr-25vy0i8il7wpra64vcm.18120a2.ip6.access.telenet.be) (Remote host closed the connection) |
| 2021-07-05 10:33:08 | → | v01d4lph4 joins (~v01d4lph4@122.160.65.250) |
| 2021-07-05 10:33:08 | × | v01d4lph4 quits (~v01d4lph4@122.160.65.250) (Changing host) |
| 2021-07-05 10:33:08 | → | v01d4lph4 joins (~v01d4lph4@user/v01d4lph4) |
| 2021-07-05 10:33:15 | → | kuribas joins (~user@ptr-25vy0i8il7wpra64vcm.18120a2.ip6.access.telenet.be) |
| 2021-07-05 10:35:02 | <int-e> | hseg: you may have been lucky to get a compile time error: https://paste.tomsmeding.com/zaKD2gJs |
| 2021-07-05 10:36:19 | <hseg> | not lucky -- type-level may not loop, but int = coerce int is fine at term level |
| 2021-07-05 10:36:30 | <hseg> | just like int = int is fine |
| 2021-07-05 10:36:45 | <int-e> | But yeah for that toy example it says it's simplifying Value Age, so evidently it has defined type instance Value Age = Value Age at that point. |
| 2021-07-05 10:37:00 | <int-e> | hseg: Lucky that there is an associated type, I mean. |
| 2021-07-05 10:37:05 | <hseg> | yup |
| 2021-07-05 10:40:02 | <int-e> | And how did I end up indenting by three spaces... when the editor defaults to 4. |
| 2021-07-05 10:40:16 | <Rembane> | Taxes! |
| 2021-07-05 10:41:29 | → | NoName__ joins (~Username@8.20.126.178) |
| 2021-07-05 10:44:52 | × | bw_ quits (sid2730@id-2730.charlton.irccloud.com) (Changing host) |
| 2021-07-05 10:44:52 | → | bw_ joins (sid2730@user/betawaffle) |
| 2021-07-05 10:45:14 | bw_ | is now known as bw |
| 2021-07-05 10:46:14 | × | Morrow quits (~MorrowM_@147.161.8.68) (Ping timeout: 252 seconds) |
| 2021-07-05 10:50:14 | → | chris joins (~chris@81.96.113.213) |
| 2021-07-05 10:50:18 | chris | is now known as Guest7042 |
| 2021-07-05 10:50:24 | <hseg> | int-e: cited https://gitlab.haskell.org/ghc/ghc/-/issues/19465 |
| 2021-07-05 10:51:51 | × | azeem quits (~azeem@dynamic-adsl-84-220-226-129.clienti.tiscali.it) (Read error: Connection reset by peer) |
| 2021-07-05 10:55:36 | → | azeem joins (~azeem@dynamic-adsl-84-220-226-129.clienti.tiscali.it) |
| 2021-07-05 10:55:43 | × | NoName__ quits (~Username@8.20.126.178) (Quit: https://www.endfgm.eu/what-can-you-do/donate/) |
| 2021-07-05 10:58:32 | <haskl> | I love Haskell. It's such a fun language to work in. |
| 2021-07-05 10:59:05 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-07-05 11:00:53 | <zzz> | so I have some data T = T x y ... |
| 2021-07-05 11:01:33 | <hseg> | ok, so now I'm stuck with the fact that SetContainer s is underiveable since unions :: (MonoFoldable m, Element m ~ s) => m -> s |
| 2021-07-05 11:02:34 | → | laguneucl joins (~Pitsikoko@2a02:587:dc0b:0:d8f7:cdfe:4658:bec4) |
| 2021-07-05 11:02:55 | <hseg> | which would need to coerce m -> s to m -> s' (which is OK) and (Element m ~ s) to (Element m ~ s') (which is not) |
| 2021-07-05 11:02:59 | <int-e> | hah, ouch. |
| 2021-07-05 11:03:21 | <hseg> | though I wonder why they require MonoFoldable there |
| 2021-07-05 11:03:42 | <zzz> | if i have some `data T = T x y ...` and `f x y` is a useful computation I use in many places, is there any way to avoid calculating it repeatedly aside from storing it as `data T = T x y xy ...` ?` |
| 2021-07-05 11:03:50 | <hseg> | could just Foldable f => f s -> s |
| 2021-07-05 11:04:16 | <hseg> | and set ounions :: (MonoFoldable f, Element f ~ s) => f -> s |
| 2021-07-05 11:05:22 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-07-05 11:07:24 | <haskl> | why doesn't the ghc options for static compilation not actually work well, again? |
| 2021-07-05 11:07:28 | <int-e> | hseg: It's thematic, isn't it. And it's potentially useful; for example, you could implement Word16-indexed sets of Word16 entries as a single Word32-set. |
| 2021-07-05 11:08:19 | <hseg> | yup. or you might want to define a monoid on a map other than union |
| 2021-07-05 11:08:26 | <hseg> | e.g. a convolution product |
| 2021-07-05 11:08:44 | <hseg> | and then need to generalize everything |
| 2021-07-05 11:08:45 | <int-e> | hseg: But it's really bad that it interferes with GND like that. |
| 2021-07-05 11:08:53 | <haskl> | like why doesn't the flags for ghc-options, cc-options, and ld-options, and extra-lib-dirs work well? |
| 2021-07-05 11:09:03 | <hseg> | well, am using deriving via |
| 2021-07-05 11:09:18 | <int-e> | hseg: that's the same underlying mechanism |
| 2021-07-05 11:09:35 | <hseg> | because I use it elsewhere and am too lazy to spell out GND *w* |
| 2021-07-05 11:10:10 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2021-07-05 11:10:12 | <int-e> | "GND" is shorter than "deriving via" |
| 2021-07-05 11:10:38 | <hseg> | GHC doesn't accept {-# LANGUAGE GND #-} though? |
| 2021-07-05 11:10:50 | <hseg> | (that's the level of my laziness) |
| 2021-07-05 11:11:05 | <int-e> | I'm not writing code on IRC :P |
| 2021-07-05 11:11:14 | <hseg> | :-) |
| 2021-07-05 11:11:42 | <int-e> | Really, I wrote "GND" here because of laziness. Of course it backfired since this is the third message I'm writing *about* that choice :P |
| 2021-07-05 11:11:52 | <hseg> | :P |
| 2021-07-05 11:12:25 | <hseg> | should probably just add language extensions to my tags file to be able to autocomplete them |
| 2021-07-05 11:12:34 | <hseg> | eliminating my excuses |
| 2021-07-05 11:12:40 | <Hecate> | I found that there are situations where deriving via will warn you when the underlying representation changes for the worst, whereas deriving newtype will just happily derive it |
| 2021-07-05 11:12:48 | <Hecate> | so I'm just using deriving via now |
| 2021-07-05 11:12:49 | <hseg> | oh? |
| 2021-07-05 11:13:53 | <Hecate> | hseg: https://gist.github.com/kozross/961b0b84cce9d94e31a4ba60cc0109c9 |
| 2021-07-05 11:15:27 | → | hseg_ joins (~gesh@185.120.126.10) |
| 2021-07-05 11:16:03 | × | hseg quits (~gesh@185.120.126.10) (Killed (NickServ (GHOST command used by hseg_))) |
| 2021-07-05 11:16:07 | hseg_ | is now known as hseg |
| 2021-07-05 11:16:10 | <haskl> | has anyone ever released software for debian before? or manage software releases? i have been doing static binaries because the deployment and packaging is way easier to manage, but apparently that's a really bad practice. i'm not sure how to make reliable software with dependencies when it's all dynamically linked. can i include some of the dynamically linked files too which can be replaced by the user's dependencies? how does that work. i'm new to the |
| 2021-07-05 11:16:10 | <haskl> | concept of compiling, really. |
| 2021-07-05 11:16:25 | <int-e> | Hecate: so you want an explicit popup equivalent saying "do you really want to change the representation?!" |
All times are in UTC.