Logs: freenode/#haskell
| 2020-09-29 15:18:22 | <turion> | ski: Yes |
| 2020-09-29 15:18:51 | <turion> | For your example it's not needed, right |
| 2020-09-29 15:18:54 | → | voyons_osti joins (~dan@107-190-41-58.cpe.teksavvy.com) |
| 2020-09-29 15:18:58 | <ski> | right |
| 2020-09-29 15:19:08 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-29 15:19:12 | <turion> | I was implicitly thinking about my use case, which is a kind of free arrow |
| 2020-09-29 15:19:16 | × | filwishe1 quits (~filwisher@cpc76738-dals23-2-0-cust186.20-2.cable.virginm.net) (Ping timeout: 246 seconds) |
| 2020-09-29 15:20:51 | → | zpao joins (~zpao@185.163.110.116) |
| 2020-09-29 15:21:43 | <turion> | This kind of problem sounds like something that someone has written a functional pearl about 10 years ago |
| 2020-09-29 15:22:52 | × | jespada quits (~jespada@90.254.241.6) (Ping timeout: 265 seconds) |
| 2020-09-29 15:23:43 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 2020-09-29 15:24:20 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 2020-09-29 15:25:02 | <Cale> | Ah, writing the instance, you end up wanting to know not only that there are instances of Arbitrary for (cat a String) and (cat String a) for example, but also for (cat String String) and all combinations of intermediate types you plan to use |
| 2020-09-29 15:25:07 | × | luke quits (~luke@bitnomial/staff/luke) (Quit: sleep) |
| 2020-09-29 15:25:13 | → | jespada joins (~jespada@90.254.241.6) |
| 2020-09-29 15:25:37 | → | knupfer joins (~Thunderbi@i5E86B4C1.versanet.de) |
| 2020-09-29 15:27:01 | <Cale> | So the instance head has O(n^2) constraints on it if you want n intermediate types :) |
| 2020-09-29 15:27:13 | × | koz quits (~koz@121.99.240.58) (Remote host closed the connection) |
| 2020-09-29 15:27:21 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-29 15:27:29 | → | koz joins (~koz@121.99.240.58) |
| 2020-09-29 15:27:33 | <ski> | yes, hence i wanted `someArbitrary :: Gen (exists b. SomeArbitrary (cat b) *> FreeCat cat a b)', for `instance SomeArbitrary (cat a) => SomeArbitrary (FreeCat cat a)' |
| 2020-09-29 15:27:48 | × | elliott_ quits (~elliott_@pool-100-36-54-163.washdc.fios.verizon.net) (Ping timeout: 272 seconds) |
| 2020-09-29 15:28:14 | <Cale> | tsk, wildcards not allowed in instance declarations |
| 2020-09-29 15:28:17 | <Cale> | annoying |
| 2020-09-29 15:28:33 | <ski> | so, when it's picking a new type for you, it should also give you an instance for how you could continue from that type |
| 2020-09-29 15:28:43 | <ski> | (this is very specific to `FreeCat', obviously) |
| 2020-09-29 15:29:01 | <Cale> | yeah |
| 2020-09-29 15:29:08 | → | bloodstalker joins (~bloodstal@46.166.187.188) |
| 2020-09-29 15:29:15 | <Cale> | You could also just demand everything you'll end up needing |
| 2020-09-29 15:29:20 | × | rslima____ quits (sid26145@gateway/web/irccloud.com/x-zjgqdcvtyayglqgm) (Ping timeout: 260 seconds) |
| 2020-09-29 15:29:35 | <Cale> | It's also probably sufficient just to have a single intermediate type, in practice. :P |
| 2020-09-29 15:29:48 | × | Herasmus quits (~mb@91-160-105-150.subs.proxad.net) (Quit: leaving) |
| 2020-09-29 15:29:58 | <ski> | you mean for other cases than `FreeCat' ? |
| 2020-09-29 15:30:07 | <Cale> | No |
| 2020-09-29 15:30:19 | <Squarism> | Cheery, thanks for the link. Thats exactly what I'm after |
| 2020-09-29 15:30:46 | → | rslima____ joins (sid26145@gateway/web/irccloud.com/x-nijwoaxwcetixacu) |
| 2020-09-29 15:31:38 | <ski> | hm, sorry. for some reason, i misread you as saying "insufficient", rather than "sufficient" |
| 2020-09-29 15:32:22 | <Cale> | https://dpaste.com/5DUQARMCK -- anyway, something like this works |
| 2020-09-29 15:32:49 | → | Tops2 joins (~Tobias@dyndsl-091-249-082-222.ewe-ip-backbone.de) |
| 2020-09-29 15:33:50 | → | bitmapper joins (uid464869@gateway/web/irccloud.com/x-jerhumioweuciiqb) |
| 2020-09-29 15:34:07 | <Cale> | Probably () would be a more useful choice than either Integer or String as a second type. Pick something with lots of values and something with few values :) |
| 2020-09-29 15:34:17 | <Cale> | Maybe throw in Void |
| 2020-09-29 15:34:27 | × | turion quits (~turion@ip1f10fe5a.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 2020-09-29 15:35:04 | <z0> | /quit |
| 2020-09-29 15:35:14 | × | z0 quits (~z0@bl17-251-27.dsl.telepac.pt) (Quit: leaving) |
| 2020-09-29 15:35:40 | <monochrom> | Nice, GHC 9.0.1 alpha1 was released yesterday |
| 2020-09-29 15:37:07 | <monochrom> | onoes, the GHC user's guide will use the readthedocs format :) |
| 2020-09-29 15:38:00 | → | turion joins (~turion@ip1f10fe5a.dynamic.kabel-deutschland.de) |
| 2020-09-29 15:38:35 | × | lagothrix quits (~lagothrix@unaffiliated/lagothrix) (Ping timeout: 258 seconds) |
| 2020-09-29 15:38:50 | → | lagothrix joins (~lagothrix@unaffiliated/lagothrix) |
| 2020-09-29 15:39:29 | <turion> | Ideally, have lots of different types, and ideally tweak the intermediate types depending over what we want the free category |
| 2020-09-29 15:40:28 | × | jgt quits (~jgt@46.250.27.223.pool.breezein.net) (Ping timeout: 272 seconds) |
| 2020-09-29 15:40:37 | <turion> | E.g. in FreeCat (->) a b we basically want everything we can think of that has (CoArbitrary a, Arbitrary b). In ski's example, we want just the types that occur in Fun |
| 2020-09-29 15:41:09 | × | jedws quits (~jedws@121.209.139.222) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-09-29 15:41:18 | → | solonarv joins (~solonarv@astrasbourg-653-1-252-112.w92-161.abo.wanadoo.fr) |
| 2020-09-29 15:43:31 | × | xerox_ quits (~xerox@unaffiliated/xerox) (Quit: leaving) |
| 2020-09-29 15:43:50 | <ski> | turion : could also allow other types to be used, with `Id' |
| 2020-09-29 15:44:16 | × | kritzefitz quits (~kritzefit@fw-front.credativ.com) (Ping timeout: 256 seconds) |
| 2020-09-29 15:44:47 | <Cale> | With newer GHCs, you could use QuantifiedConstraints to get the thing you want in the (->) case |
| 2020-09-29 15:45:24 | <Cale> | It's also probably possible to construct a type family that lets you turn a list of types into a list of all the needed Arbitrary constraints between them |
| 2020-09-29 15:45:37 | <turion> | ski: Hmm true. So maybe we always want as many types as possible. But sometimes we'll have to restrict to the ones that are specified in a constructor |
| 2020-09-29 15:45:42 | <Cale> | (rather, into the combination of those constraints directly |
| 2020-09-29 15:45:43 | <Cale> | ) |
| 2020-09-29 15:46:57 | <ski> | turion : perhaps there could be some way to "inject" which types one'd like it to consider for existentials .. not sure how one'd want that to work, though |
| 2020-09-29 15:47:17 | <turion> | ski: Like a list of proxies hidden in an existential type |
| 2020-09-29 15:47:26 | <Cale> | Also, note that you don't have to stick to a single Arbitrary instance. |
| 2020-09-29 15:48:03 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 2020-09-29 15:48:04 | <turion> | Cale: What do you mean? |
| 2020-09-29 15:48:29 | <Cale> | You can write a bunch of these Gen values for various circumstances, and use them via QuickCheck's forAll |
| 2020-09-29 15:48:35 | <Cale> | forAll :: (Show a, Testable prop) => Gen a -> (a -> prop) -> Property |
| 2020-09-29 15:48:49 | <turion> | Ah yes :) that will sometimes make it easier |
| 2020-09-29 15:48:52 | <monochrom> | Yikes, new extension LexicalNegation. If you turn it on, then "x -y" means "x (negate y)", and "(- b)" means the section "subtract b". |
| 2020-09-29 15:49:11 | × | DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection) |
| 2020-09-29 15:50:04 | → | DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
| 2020-09-29 15:50:18 | → | elliott_ joins (~elliott_@pool-100-36-54-163.washdc.fios.verizon.net) |
| 2020-09-29 15:50:19 | → | jb55 joins (~jb55@gateway/tor-sasl/jb55) |
| 2020-09-29 15:50:37 | <dolio> | Oh, it turns off unary minus with spaces? |
| 2020-09-29 15:50:39 | <Cale> | monochrom: I hate the direction that GHC's been going lately |
| 2020-09-29 15:51:03 | <ski> | Cale : syntactically ? |
| 2020-09-29 15:51:07 | <monochrom> | I have a conspiracy theory! LinearTypes was a smoke screen to distract people from noticing the really breaking changes like LexicalNegation and simplified subsumption. :) |
| 2020-09-29 15:51:18 | <Cale> | ski: Syntactically, semantically... |
| 2020-09-29 15:51:19 | × | nbloomf quits (~nbloomf@2600:1700:83e0:1f40:6d38:c363:743b:50e9) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-09-29 15:51:36 | <monochrom> | Yeah dolio, basically that. |
| 2020-09-29 15:52:25 | <Cale> | LinearTypes is a disaster unfolding in slow motion, then there's all these little stupid syntactic extensions that everyone's going to have to deal with. |
| 2020-09-29 15:52:36 | <dolio> | Simplified subsumption I can kind of get behind, if it's what I'm thinking of. |
| 2020-09-29 15:52:43 | <monochrom> | Well, also, "x -y" meaning "x (negate y)" is turning on unary minus with absence of spaces. :) |
| 2020-09-29 15:53:25 | <monochrom> | "\x -> sin x == sin -x" is now a valid property for quickcheck :) |
| 2020-09-29 15:53:40 | <monochrom> | err, s/sin/cos/ |
| 2020-09-29 15:53:58 | <dolio> | Right. I just thought it was adding the rule about -x, not taking away - x. |
| 2020-09-29 15:54:27 | <Cale> | I feel like RecordDotSyntax was the kind of thing that newbies would always ask for like a decade ago, but there were always good reasons not to do it. Now we've just gone ahead and ignored all those good reasons, and implemented something which makes it easy to write terms that nobody knows how to parse |
| 2020-09-29 15:55:07 | × | acidjnk_new quits (~acidjnk@p200300d0c72378745c7b1a0a573f1493.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 2020-09-29 15:55:11 | <Cale> | (there's a rule for disambiguation, but it's not obvious) |
| 2020-09-29 15:55:37 | <monochrom> | (basically using spaces again, yeah) |
| 2020-09-29 15:55:59 | <maerwald> | magical spaces |
| 2020-09-29 15:56:07 | <Cale> | It honestly makes me want to fork the entire language |
| 2020-09-29 15:56:31 | <maerwald> | reminds me of the `return foo;` vs `foo` syntax in rust, which is nonsense imo |
| 2020-09-29 15:56:34 | → | wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) |
| 2020-09-29 15:56:40 | <dolio> | Taking away spaced unary minus might actually be good in that situation, I guess, because it's one less complication. |
| 2020-09-29 15:56:51 | <Cale> | GHC doesn't need new language extensions, it needs to be simpler and produce better code in less time |
| 2020-09-29 15:56:52 | <dolio> | Like "-x `mod` y" vs "- x `mod` y". |
All times are in UTC.