Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 612 613 614 615 616 617 618 619 620 621 622 .. 18010
1,800,966 events total
2021-06-24 02:18:40 <lambdabot> 5
2021-06-24 02:18:41 <c_wraith> > bar id
2021-06-24 02:18:43 <lambdabot> 5
2021-06-24 02:18:58 <c_wraith> you can pass a polymorphic argument to either foo or bar
2021-06-24 02:19:10 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 258 seconds)
2021-06-24 02:19:19 <c_wraith> you can only pass a non-polymorphic argument to bar
2021-06-24 02:20:28 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
2021-06-24 02:20:41 <qrpnxz> yeah that makes perfect sense, and the quote is saying you can pass a poly arg to a function that accepts a concrete parameter, it's saying the exact opposite of what you are demonstrating here
2021-06-24 02:21:02 <c_wraith> :t foo
2021-06-24 02:21:03 <lambdabot> (forall a. a -> a) -> Int
2021-06-24 02:21:06 <c_wraith> :t bar
2021-06-24 02:21:07 <lambdabot> (Int -> Int) -> Int
2021-06-24 02:21:08 <c_wraith> :t id
2021-06-24 02:21:09 <lambdabot> a -> a
2021-06-24 02:21:11 <c_wraith> > bar id
2021-06-24 02:21:13 <lambdabot> 5
2021-06-24 02:21:29 <c_wraith> I passed a polymorphic argument to a function that accepts a non-polymorphic value
2021-06-24 02:21:40 <c_wraith> That's exactly what I was demonstrating
2021-06-24 02:23:06 <qrpnxz> oh the forall is the problem
2021-06-24 02:23:09 <qrpnxz> i see
2021-06-24 02:23:25 <c_wraith> without the forall, the argument wouldn't be required to be polymorphic
2021-06-24 02:23:41 <c_wraith> it would just be some unknown type
2021-06-24 02:26:44 <qrpnxz> ok cool thanks for taking the time to beat that into me
2021-06-24 02:27:17 <c_wraith> it is a bit confusing - the rules reverse when something is an argument vs a return value
2021-06-24 02:27:42 <c_wraith> That's why a type variable in an argument is sometimes referred to as "in a negative position"
2021-06-24 02:27:50 <c_wraith> Because of that reversing of rules.
2021-06-24 02:29:08 <c_wraith> Note that this is essentially the same trick runST is based on
2021-06-24 02:29:26 <qrpnxz> oh wait, daaaang. The confusing part is that forall a. a -> a is the subtype of int->int. Flipped the tree on it's head.
2021-06-24 02:29:53 <c_wraith> Yes - but only in negative position :)
2021-06-24 02:30:41 <qrpnxz> no look, if i want a list of [int->int] i can take int->int or polymorphics, but if i want [forall a. a -> a] i can only take polymorphics. The poly is a subtype
2021-06-24 02:31:03 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 258 seconds)
2021-06-24 02:31:19 <c_wraith> when you're talking about arguments to a function (negative position), yes
2021-06-24 02:31:24 <qrpnxz> wait, but then in the negative position the generic one should be the one that takes the subtype
2021-06-24 02:31:27 <qrpnxz> ahhh wtf!
2021-06-24 02:31:41 <qrpnxz> no i was talking about a list
2021-06-24 02:31:46 <qrpnxz> with should be covariant
2021-06-24 02:32:10 <qrpnxz> *which
2021-06-24 02:33:06 <c_wraith> Watch out - polymorphism of limited scope is only created by forall
2021-06-24 02:33:37 hmmmas joins (~chenqisu1@183.217.200.246)
2021-06-24 02:33:46 <c_wraith> (a -> a) -> Int is very different from (forall a. a -> a) -> Int
2021-06-24 02:34:01 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
2021-06-24 02:34:01 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (lead.libera.chat (Nickname regained by services)))
2021-06-24 02:34:01 finn_elija is now known as FinnElija
2021-06-24 02:37:30 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 265 seconds)
2021-06-24 02:39:12 <qrpnxz> if i want a [int->int], i can also pass in a [forall a. a->a], if i want a (forall a. a->a) -> * i can also pass in a (int->int) -> *, hmm ok yes that check's out, because i will put into it a polymorphic and it will just use it as an (int->int). Alright, cool. So the warning is basically pointing out that poly is unintuitively a subtype of the concrete.
2021-06-24 02:39:12 justsomeguy joins (~justsomeg@user/justsomeguy)
2021-06-24 02:39:57 <qrpnxz> right, thanks
2021-06-24 02:44:20 × ec quits (~ec@gateway/tor-sasl/ec) (Quit: ec)
2021-06-24 02:45:42 GoodbyeVincent parts (~GoodbyeVi@55.15.95.92.rev.sfr.net) ()
2021-06-24 02:46:18 × sekun quits (~sekun@180.190.208.125) (Ping timeout: 250 seconds)
2021-06-24 02:47:03 myShoggoth joins (~myShoggot@75.164.29.44)
2021-06-24 02:47:11 shiraeeshi joins (~shiraeesh@109.166.56.14)
2021-06-24 02:54:49 × td_ quits (~td@muedsl-82-207-238-055.citykom.de) (Ping timeout: 258 seconds)
2021-06-24 02:54:58 × shapr quits (~user@2601:7c0:8180:89d0:ed87:906a:cd61:bb34) (Ping timeout: 250 seconds)
2021-06-24 02:56:27 td_ joins (~td@94.134.91.231)
2021-06-24 02:59:37 × hammock quits (~Hammock@2600:1700:19a1:3330::625) (Ping timeout: 246 seconds)
2021-06-24 02:59:58 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 246 seconds)
2021-06-24 03:00:16 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
2021-06-24 03:01:17 hughjfchen joins (~hughjfche@vmi556545.contaboserver.net)
2021-06-24 03:01:27 × Axman6 quits (~Axman6@user/axman6) (Ping timeout: 256 seconds)
2021-06-24 03:02:35 × hughjfchen quits (~hughjfche@vmi556545.contaboserver.net) (Client Quit)
2021-06-24 03:02:57 slack1256 joins (~slack1256@191.126.146.101)
2021-06-24 03:03:54 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.0.1)
2021-06-24 03:13:39 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
2021-06-24 03:13:58 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 246 seconds)
2021-06-24 03:14:19 × hmmmas quits (~chenqisu1@183.217.200.246) (Quit: Leaving.)
2021-06-24 03:17:23 hmmmas joins (~chenqisu1@183.217.200.246)
2021-06-24 03:19:50 × wei2912 quits (~wei2912@112.199.250.21) (Quit: Lost terminal)
2021-06-24 03:24:00 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 250 seconds)
2021-06-24 03:24:18 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
2021-06-24 03:26:37 × notzmv quits (~zmv@user/notzmv) (Read error: Connection reset by peer)
2021-06-24 03:26:42 × Scotty_Trees quits (~Scotty_Tr@162-234-179-169.lightspeed.brhmal.sbcglobal.net) (Quit: Leaving)
2021-06-24 03:28:14 jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net)
2021-06-24 03:30:16 notzmv joins (~zmv@user/notzmv)
2021-06-24 03:33:36 × jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
2021-06-24 03:33:52 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
2021-06-24 03:34:18 AgentM joins (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net)
2021-06-24 03:34:56 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
2021-06-24 03:35:16 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
2021-06-24 03:35:27 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-06-24 03:38:25 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
2021-06-24 03:38:36 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
2021-06-24 03:39:34 <Boarders> are there any alternatives to alex + happy that generate lexers + parsers via a yacc + bison style grammar in Haskell?
2021-06-24 03:39:39 Lord_of_Life_ is now known as Lord_of_Life
2021-06-24 03:40:10 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 244 seconds)
2021-06-24 03:41:04 <c_wraith> that's pretty much it for that style
2021-06-24 03:41:58 Axman6 joins (~Axman6@user/axman6)
2021-06-24 03:42:16 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 265 seconds)
2021-06-24 03:42:16 × shiraeeshi quits (~shiraeesh@109.166.56.14) (Ping timeout: 252 seconds)
2021-06-24 03:42:41 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
2021-06-24 03:43:58 shiraeeshi joins (~shiraeesh@109.166.56.14)
2021-06-24 03:45:25 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
2021-06-24 03:47:59 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
2021-06-24 03:49:58 × shiraeeshi quits (~shiraeesh@109.166.56.14) (Ping timeout: 252 seconds)
2021-06-24 03:50:33 Guest76 joins (~Guest76@x59cc8bb0.dyn.telefonica.de)
2021-06-24 03:52:04 Guest76 is now known as blueonyx
2021-06-24 03:54:46 × chaosite quits (~chaosite@user/chaosite) (Ping timeout: 250 seconds)
2021-06-24 03:56:04 × trent2 quits (~trent@2001:8003:340d:d00:b2de:b98:7a93:b0ea) (Ping timeout: 250 seconds)
2021-06-24 03:56:22 talismanick joins (~user@2601:644:8502:d700::5315)
2021-06-24 03:58:19 chaosite joins (~chaosite@user/chaosite)

All times are in UTC.