Logs: freenode/#haskell
| 2020-11-05 21:15:22 | → | alp joins (~alp@2a01:e0a:58b:4920:b090:7fae:5afc:83b5) |
| 2020-11-05 21:19:00 | → | ransom joins (~c4264035@undergraduate-jvossen-9690.mines.edu) |
| 2020-11-05 21:19:48 | × | jakob_ quits (~textual@p200300f49f162200708c4f4194f529b6.dip0.t-ipconnect.de) (Quit: My Laptop has gone to sleep. ZZZzzz…) |
| 2020-11-05 21:21:27 | → | jakob_ joins (~textual@p200300f49f162200ac46a31c3038c656.dip0.t-ipconnect.de) |
| 2020-11-05 21:21:46 | → | mathepauker joins (~mathepauk@s91904426.blix.com) |
| 2020-11-05 21:24:45 | × | geekosaur quits (ac3a5323@172.58.83.35) (Remote host closed the connection) |
| 2020-11-05 21:27:03 | × | jakob_ quits (~textual@p200300f49f162200ac46a31c3038c656.dip0.t-ipconnect.de) (Quit: My Laptop has gone to sleep. ZZZzzz…) |
| 2020-11-05 21:27:22 | × | invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 256 seconds) |
| 2020-11-05 21:27:53 | → | jbox joins (~atlas@unaffiliated/jbox) |
| 2020-11-05 21:27:55 | × | ransom quits (~c4264035@undergraduate-jvossen-9690.mines.edu) (Quit: Textual IRC Client: www.textualapp.com) |
| 2020-11-05 21:34:01 | hackage | compdoc 0.2.0.0 - Parse a Pandoc to a composite value. https://hackage.haskell.org/package/compdoc-0.2.0.0 (locallycompact) |
| 2020-11-05 21:34:12 | × | mdunnio quits (~mdunnio@208.59.170.5) (Remote host closed the connection) |
| 2020-11-05 21:34:21 | × | chaosmasttter quits (~chaosmast@p200300c4a7117c01e8fd3775638e9554.dip0.t-ipconnect.de) (Quit: WeeChat 2.9) |
| 2020-11-05 21:34:42 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Ping timeout: 244 seconds) |
| 2020-11-05 21:34:47 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2020-11-05 21:35:03 | × | todda7 quits (~torstein@ppp-2-84-30-242.home.otenet.gr) (Ping timeout: 260 seconds) |
| 2020-11-05 21:35:31 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 2.9) |
| 2020-11-05 21:37:25 | → | jakob_ joins (~textual@p200300f49f162200657391ee70880d24.dip0.t-ipconnect.de) |
| 2020-11-05 21:39:18 | → | thir joins (~thir@p200300f27f0b7e00f4e9381c2bf90854.dip0.t-ipconnect.de) |
| 2020-11-05 21:43:55 | → | todda7 joins (~torstein@ppp-2-84-30-242.home.otenet.gr) |
| 2020-11-05 21:44:20 | → | mdunnio joins (~mdunnio@208.59.170.5) |
| 2020-11-05 21:44:26 | × | thir quits (~thir@p200300f27f0b7e00f4e9381c2bf90854.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 2020-11-05 21:45:14 | → | grepcake joins (~artyom@77.234.203.49) |
| 2020-11-05 21:45:57 | → | christo joins (~chris@81.96.113.213) |
| 2020-11-05 21:47:52 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 2020-11-05 21:48:39 | <grepcake> | Hi! Suppose, I have constraints on an existential type parameter and this parameter is not otherwise used in the constructor. How do I bind that type parameter when pattern-matchin? https://gist.github.com/grepcake/141d8f06e4328f3582371f5906eab243 |
| 2020-11-05 21:49:23 | <grepcake> | One way would be to add a dummy parameter to the constructor (Proxy, I guess?), but there a way to do it without adding parameters? |
| 2020-11-05 21:51:14 | <merijn> | Not any ways that I'd recommend |
| 2020-11-05 21:53:02 | <dminuoso> | grepcake: There is an alternate option, but that's still in a language proposal |
| 2020-11-05 21:53:28 | <grepcake> | dminuoso: out of curiosity, what is it? |
| 2020-11-05 21:53:28 | <dminuoso> | (And Im not sure whether you could actually bind that one there) |
| 2020-11-05 21:53:55 | <grepcake> | merijn: is doing things like this a bad practice in general? |
| 2020-11-05 21:54:09 | <grepcake> | Should I pass Dict on the value level instead? |
| 2020-11-05 21:54:41 | <dminuoso> | grepcake: https://github.com/ghc-proposals/ghc-proposals/blob/type-applications-in-patterns/proposals/type-applications-in-patterns.rst |
| 2020-11-05 21:54:50 | <dminuoso> | grepcake: Dict is the only other option that I can see, yes. |
| 2020-11-05 21:55:55 | × | tomboy64 quits (~tomboy64@gateway/tor-sasl/tomboy64) (Remote host closed the connection) |
| 2020-11-05 21:56:25 | <solonarv> | ah, I was thinking about typeapps in patterns but couldn't remember if they were already in the language |
| 2020-11-05 21:56:36 | <grepcake> | dminuoso: thanks, pretty interesting. examples seem to imply that it would be possible to bind param in my case |
| 2020-11-05 21:56:48 | → | tomboy64 joins (~tomboy64@gateway/tor-sasl/tomboy64) |
| 2020-11-05 21:56:53 | → | conal joins (~conal@107.181.166.217) |
| 2020-11-05 21:57:00 | [[[]]] | is now known as vevercak |
| 2020-11-05 21:57:03 | <dminuoso> | grepcake: right, Im just not 100% confident about interaction with GADTs and constriants |
| 2020-11-05 21:57:10 | → | nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 2020-11-05 21:57:22 | <dminuoso> | (but the `constraints` library is definitely an option) |
| 2020-11-05 21:57:51 | <grepcake> | Yep, appparently I'll stick with it |
| 2020-11-05 21:57:56 | <dminuoso> | Also, since you seem to be meddling with constraints, you could be interested in this: https://hackage.haskell.org/package/constraints-extras-0.3.0.2/docs/Data-Constraint-Extras.html |
| 2020-11-05 21:58:11 | <dminuoso> | (*GADTs) |
| 2020-11-05 21:58:37 | <dminuoso> | Just something to be aware of, I dont know your code whether its useful to you. |
| 2020-11-05 21:58:53 | × | conal quits (~conal@107.181.166.217) (Client Quit) |
| 2020-11-05 21:59:24 | <dminuoso> | Cale described it best as Pi for constraints. |
| 2020-11-05 22:00:31 | × | knupfer quits (~Thunderbi@i59F7FF32.versanet.de) (Ping timeout: 246 seconds) |
| 2020-11-05 22:01:34 | × | u0_a298 quits (~user@47.206.148.226) (Ping timeout: 246 seconds) |
| 2020-11-05 22:01:34 | <grepcake> | dminuoso: I'll definitely look into it, thanks! |
| 2020-11-05 22:02:19 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 2020-11-05 22:04:20 | → | Rudd0 joins (~Rudd0@185.189.115.98) |
| 2020-11-05 22:05:23 | × | todda7 quits (~torstein@ppp-2-84-30-242.home.otenet.gr) (Ping timeout: 260 seconds) |
| 2020-11-05 22:07:25 | × | hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 240 seconds) |
| 2020-11-05 22:07:52 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds) |
| 2020-11-05 22:09:52 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2020-11-05 22:10:38 | → | todda7 joins (~torstein@ppp-2-84-30-242.home.otenet.gr) |
| 2020-11-05 22:13:27 | × | jbox quits (~atlas@unaffiliated/jbox) (Ping timeout: 272 seconds) |
| 2020-11-05 22:13:34 | × | grepcake quits (~artyom@77.234.203.49) (Quit: Konversation terminated!) |
| 2020-11-05 22:17:28 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2020-11-05 22:19:35 | → | ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) |
| 2020-11-05 22:21:07 | → | justanotheruser joins (~justanoth@unaffiliated/justanotheruser) |
| 2020-11-05 22:21:22 | × | twopoint718 quits (~cjw@fsf/member/twopoint718) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-11-05 22:21:26 | <bqv> | folks, a question |
| 2020-11-05 22:22:33 | <bqv> | would it be possible, through type magic, to have a way of working out what function arity a type has, and then transforming the result of that function type? |
| 2020-11-05 22:22:53 | → | dbmikus__ joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 2020-11-05 22:23:02 | <bqv> | i.e composing a function to that function regardless of arity |
| 2020-11-05 22:23:06 | × | dbmikus_ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Read error: Connection reset by peer) |
| 2020-11-05 22:24:08 | <Ariakenom> | well i can call id |
| 2020-11-05 22:24:11 | <Ariakenom> | :t id |
| 2020-11-05 22:24:13 | <lambdabot> | a -> a |
| 2020-11-05 22:24:14 | <Ariakenom> | 3 times |
| 2020-11-05 22:24:20 | <Ariakenom> | > id id id 1 |
| 2020-11-05 22:24:23 | <lambdabot> | 1 |
| 2020-11-05 22:24:38 | <Ariakenom> | not 3 times. I meant with 3 arguments |
| 2020-11-05 22:24:57 | <bqv> | of course, but id is a special case |
| 2020-11-05 22:25:10 | <bqv> | it's possible to detect arity through type magic, but it won't work with id-like types |
| 2020-11-05 22:25:21 | <bqv> | so i wonder if the rest is possible with that qualification too |
| 2020-11-05 22:25:28 | <glguy> | It's not particularly special, no. functions don't have arity in general |
| 2020-11-05 22:25:46 | <bqv> | ok say the result is an IO type |
| 2020-11-05 22:25:46 | <glguy> | they always take one argument |
| 2020-11-05 22:25:52 | <bqv> | does that help? |
| 2020-11-05 22:26:17 | <bqv> | can't type-recursion use that as an terminating case? |
| 2020-11-05 22:26:25 | <glguy> | If you restrict yourself to types of a form like that then you can do it with a typeclass |
| 2020-11-05 22:26:52 | <glguy> | class Thing a; instance Thing b => Thing (a -> b); instance Thing (IO a) |
| 2020-11-05 22:28:08 | <bqv> | neato |
| 2020-11-05 22:28:10 | <bqv> | yeah, ok |
| 2020-11-05 22:29:17 | → | fendor joins (~fendor@178.115.129.187.wireless.dyn.drei.com) |
| 2020-11-05 22:29:21 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 2020-11-05 22:30:16 | × | todda7 quits (~torstein@ppp-2-84-30-242.home.otenet.gr) (Quit: Konversation terminated!) |
| 2020-11-05 22:30:31 | → | todda7 joins (~torstein@ppp-2-84-30-242.home.otenet.gr) |
| 2020-11-05 22:32:32 | <merijn> | glguy: Sure they do |
| 2020-11-05 22:32:40 | <merijn> | glguy: Functions have arity 1 :p |
| 2020-11-05 22:33:01 | → | twopoint718 joins (~cjw@fsf/member/twopoint718) |
| 2020-11-05 22:34:29 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-11-05 22:34:46 | → | Tario joins (~Tario@201.192.165.173) |
| 2020-11-05 22:34:48 | → | erisco joins (~erisco@d24-57-249-233.home.cgocable.net) |
All times are in UTC.