Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 14 15 16 17 18 19 20 21 22 23 24 .. 5022
502,152 events total
2020-09-17 07:32:42 <kenran> ah thanks. I can't try it out right now, but couldn't one have: instance Storable a => Foldable (Storable.Vector a)?
2020-09-17 07:33:13 raichoo joins (~raichoo@dslb-178-001-022-071.178.001.pools.vodafone-ip.de)
2020-09-17 07:33:32 <dminuoso> kenran: Correct.
2020-09-17 07:33:41 <dminuoso> Multiple reasons
2020-09-17 07:33:46 <dminuoso> a) Wont kind check
2020-09-17 07:33:50 <dminuoso> % :k Foldable
2020-09-17 07:33:50 <yahb> dminuoso: (* -> *) -> Constraint
2020-09-17 07:34:09 stiell joins (~stian@fsf/member/stiell)
2020-09-17 07:34:12 <dminuoso> b) The constraint would have to on the class method (something like quantified constraints would be needed)
2020-09-17 07:34:48 <dminuoso> And in addition c) *instance selection* does not consider any constraint on the instance declaration.
2020-09-17 07:35:08 shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:c058:b9a7:8857:8837)
2020-09-17 07:35:14 <kenran> ahh of course, I forgot that one doesn't do `instance Foldable (Foo a)` but `instance Foldable Foo)
2020-09-17 07:35:26 <kenran> thanks, very interesting!
2020-09-17 07:35:28 <nshepperd> i don't think b and c are really problems
2020-09-17 07:38:40 <nshepperd> yeah Foldable is meant to be applied to the, uh, generic container type
2020-09-17 07:38:45 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
2020-09-17 07:39:22 <Unhammer> https://i.imgur.com/kyFW9B9.png duckduckgo found me an actual stack of haddocks =D
2020-09-17 07:40:24 × stiell quits (~stian@fsf/member/stiell) (Ping timeout: 256 seconds)
2020-09-17 07:41:10 <dminuoso> Unhammer: It wasnt until I visited scotland and england that I understood the reference. The brits do seem to eat a lot of haddock.
2020-09-17 07:41:36 × xlei quits (~akans@unaffiliated/xlei) (Quit: ZNC - https://znc.in)
2020-09-17 07:43:05 gestone joins (~gestone@c-73-97-137-216.hsd1.wa.comcast.net)
2020-09-17 07:43:10 <Unhammer> well, it's yummy :) though I've never had it stacked before
2020-09-17 07:43:21 <Unhammer> `alias stack=smoke`
2020-09-17 07:43:25 <Unhammer> therewego
2020-09-17 07:43:44 cfricke joins (~cfricke@unaffiliated/cfricke)
2020-09-17 07:44:10 <dminuoso> Oh haha I didn't get the joke until you mentioned that.
2020-09-17 07:44:18 <dminuoso> Cheeky
2020-09-17 07:46:07 <nshepperd> There's a different type class called MonoFoldable that you could give instances for Storable a => MonoFoldable (Vector a)
2020-09-17 07:46:49 <nshepperd> but defining MonoFoldable and using it requires extensions (type families) and is less convenient, so i don't think it's really commonly used
2020-09-17 07:47:48 × gestone quits (~gestone@c-73-97-137-216.hsd1.wa.comcast.net) (Ping timeout: 260 seconds)
2020-09-17 07:54:16 × Sgeo quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
2020-09-17 07:54:40 × mmohammadi9812 quits (~mmohammad@5.238.164.128) (Quit: I quit (╯°□°)╯︵ ┻━┻)
2020-09-17 07:56:24 mmohammadi9812 joins (~mmohammad@5.238.164.128)
2020-09-17 07:56:40 × pera quits (~pera@unaffiliated/pera) (Ping timeout: 260 seconds)
2020-09-17 07:56:53 rapskalian joins (~user@2601:804:8400:5750:6d07:cb01:64a9:36bb)
2020-09-17 07:57:31 × mmohammadi9812 quits (~mmohammad@5.238.164.128) (Client Quit)
2020-09-17 07:59:37 mmohammadi9812 joins (~mmohammad@5.238.164.128)
2020-09-17 08:01:08 × nfd quits (~nfd9001@c-67-183-38-33.hsd1.wa.comcast.net) (Quit: Leaving)
2020-09-17 08:01:57 × rapskalian quits (~user@2601:804:8400:5750:6d07:cb01:64a9:36bb) (Ping timeout: 272 seconds)
2020-09-17 08:03:53 × dansho quits (~dansho@ip68-108-167-185.lv.lv.cox.net) (Quit: Leaving)
2020-09-17 08:03:57 gestone joins (~gestone@c-73-97-137-216.hsd1.wa.comcast.net)
2020-09-17 08:05:53 xlei joins (znc@unaffiliated/xlei)
2020-09-17 08:06:23 × revprez_anzio quits (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net) (Ping timeout: 272 seconds)
2020-09-17 08:06:52 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
2020-09-17 08:06:57 bahamas joins (~lucian@188.24.158.21)
2020-09-17 08:06:57 × bahamas quits (~lucian@188.24.158.21) (Changing host)
2020-09-17 08:06:58 bahamas joins (~lucian@unaffiliated/bahamas)
2020-09-17 08:07:47 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Quit: Goodbye)
2020-09-17 08:08:06 revprez_anzio joins (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net)
2020-09-17 08:08:22 supercoven joins (~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi)
2020-09-17 08:08:35 <dminuoso> Is there a reason to use `cabal v2-test` over `cabal v2-run test:foo`?
2020-09-17 08:08:36 nan` joins (~nan`@unaffiliated/nan/x-5405850)
2020-09-17 08:08:51 <dminuoso> The latter seems universally powerful since you can pass arguments to the testsuite
2020-09-17 08:08:53 × gestone quits (~gestone@c-73-97-137-216.hsd1.wa.comcast.net) (Ping timeout: 260 seconds)
2020-09-17 08:09:04 <phadej> former runs multiple tests, changes to package directory, ...
2020-09-17 08:09:07 <phadej> is a bit different
2020-09-17 08:10:23 <dminuoso> Mmm, what kind of changes to the package directory?
2020-09-17 08:10:35 <dminuoso> Oh, you mean like the cwd?
2020-09-17 08:11:42 oxide joins (~lambda@unaffiliated/mclaren)
2020-09-17 08:13:34 × nan` quits (~nan`@unaffiliated/nan/x-5405850) (Ping timeout: 260 seconds)
2020-09-17 08:13:50 <dminuoso> But I see what you mean, it is different. In case of hspec, v2-run can detect the interactive terminal properly, with v2-test it seems not
2020-09-17 08:20:03 × cantstanya quits (~chatting@gateway/tor-sasl/cantstanya) (Ping timeout: 240 seconds)
2020-09-17 08:20:20 heatsink joins (~heatsink@2600:1700:bef1:5e10:b0dc:6c54:247b:ece)
2020-09-17 08:24:07 cantstanya joins (~chatting@gateway/tor-sasl/cantstanya)
2020-09-17 08:24:35 × heatsink quits (~heatsink@2600:1700:bef1:5e10:b0dc:6c54:247b:ece) (Ping timeout: 244 seconds)
2020-09-17 08:24:49 gestone joins (~gestone@c-73-97-137-216.hsd1.wa.comcast.net)
2020-09-17 08:26:26 × mmohammadi9812 quits (~mmohammad@5.238.164.128) (Quit: I quit (╯°□°)╯︵ ┻━┻)
2020-09-17 08:26:56 thc202 joins (~thc202@unaffiliated/thc202)
2020-09-17 08:26:59 × raichoo quits (~raichoo@dslb-178-001-022-071.178.001.pools.vodafone-ip.de) (Quit: Lost terminal)
2020-09-17 08:27:12 kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be)
2020-09-17 08:28:09 × z0 quits (~z0@bl15-162-186.dsl.telepac.pt) (Remote host closed the connection)
2020-09-17 08:28:19 mmohammadi9812 joins (~mmohammad@5.238.164.128)
2020-09-17 08:29:49 × gestone quits (~gestone@c-73-97-137-216.hsd1.wa.comcast.net) (Ping timeout: 272 seconds)
2020-09-17 08:30:27 vicfred_ joins (~vicfred@unaffiliated/vicfred)
2020-09-17 08:31:10 × lemmih quits (~lemmih@2406:3003:2072:44:c9d8:3b2b:ae18:24e9) (Remote host closed the connection)
2020-09-17 08:31:32 lemmih joins (~lemmih@2406:3003:2072:44:251c:6ccc:226:e43d)
2020-09-17 08:32:25 × s00pcan quits (~chris@075-133-056-178.res.spectrum.com) (Ping timeout: 240 seconds)
2020-09-17 08:33:03 × mmohammadi9812 quits (~mmohammad@5.238.164.128) (Client Quit)
2020-09-17 08:33:37 × vicfred quits (~vicfred@unaffiliated/vicfred) (Ping timeout: 272 seconds)
2020-09-17 08:34:15 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2020-09-17 08:34:37 <kuribas> How do you solve the problem of having different types for a resource in a rest API? I came up with this solution: data Person read update extra = Person { age :: read Int , name :: update String, job :: extra String}
2020-09-17 08:34:38 s00pcan joins (~chris@107.181.165.217)
2020-09-17 08:34:42 mmohammadi9812 joins (~mmohammad@5.238.164.128)
2020-09-17 08:35:38 × jneira quits (501e65ce@gateway/web/cgi-irc/kiwiirc.com/ip.80.30.101.206) (Ping timeout: 272 seconds)
2020-09-17 08:36:16 <kuribas> then type family Id where Id a = a; type family Null where Null a = Maybe Void
2020-09-17 08:37:22 <kuribas> Then I can do type ReadPerson = Person Id Id Id
2020-09-17 08:37:41 <kuribas> and type UpdatePerson = Person Null Id Null
2020-09-17 08:40:16 <kuribas> or the alternative is just to define three types ReadPerson, UpdatePerson, ShortReadPerson
2020-09-17 08:40:45 <kuribas> which uses simpler haskell, but doesn't ensure the consistency of the resource.
2020-09-17 08:42:50 <bahamas> I'm working on making a haskell quick reference and I'm reading through the haskell report. one thing confuses me. in what way are variables and constructors expressions? https://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-240003.2
2020-09-17 08:43:06 <bahamas> is it the fact that identifiers are expressions because they "return" a value?
2020-09-17 08:43:27 <kuribas> bahamas: haskell doesn't have the concept of return
2020-09-17 08:43:49 <kuribas> bahamas: variables are expressions in other language as while
2020-09-17 08:43:57 <kuribas> and Constructors in haskell or just functions
2020-09-17 08:43:59 <kuribas> :t Just
2020-09-17 08:44:01 <lambdabot> a -> Maybe a
2020-09-17 08:44:27 × Katarushisu quits (~Katarushi@cpc149712-finc20-2-0-cust535.4-2.cable.virginm.net) (Ping timeout: 256 seconds)
2020-09-17 08:44:37 <kuribas> s/as while/as well
2020-09-17 08:44:42 <bahamas> kuribas: I know
2020-09-17 08:44:44 × asan quits (~yan4138@61.170.146.94) (Ping timeout: 260 seconds)
←Prev  Next→
Page 1 .. 14 15 16 17 18 19 20 21 22 23 24 .. 5022

All times are in UTC.