Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-03 05:31:11 <c_wraith> the value in a particular node is always the combination of that node and its children's monoids.
2021-03-03 05:31:18 × ddellacosta quits (~ddellacos@86.106.143.188) (Ping timeout: 245 seconds)
2021-03-03 05:31:34 <c_wraith> The association may change, but the order won't.
2021-03-03 05:33:15 sicklorkin joins (~adsf@s206-116-49-76.bc.hsia.telus.net)
2021-03-03 05:34:45 × Guest50271 quits (~textual@zrcout.mskcc.org) (Ping timeout: 264 seconds)
2021-03-03 05:35:36 <sicklorkin> I just updated a script that envokes stack i.e. -- stack -- resolver lts-17.4 script; and now I'm getting errors Module Foo.Bar appears in multiple packages: baz hoge and was wondering where I should start looking?
2021-03-03 05:37:05 <sicklorkin> I found a package imports propostal suggesting ` import "baz" Foo.Bar` but it didn't fix the issue
2021-03-03 05:37:54 × wmacmil quits (~wmacmil@c83-252-138-144.bredband.comhem.se) (Ping timeout: 246 seconds)
2021-03-03 05:37:57 <sicklorkin> import Foo.Bar from "containers" didn't work either
2021-03-03 05:38:50 <sicklorkin> https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/packages/package-imports-proposal
2021-03-03 05:39:50 <sicklorkin> nm.. i had a syntax issue
2021-03-03 05:40:12 dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2021-03-03 05:42:07 <sicklorkin> needed PackageImports
2021-03-03 05:57:01 × tsaka__ quits (~torstein@2a02:587:1b14:d00:5ec3:abec:812c:b3e2) (Ping timeout: 272 seconds)
2021-03-03 05:57:45 × vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving)
2021-03-03 05:59:51 × elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 256 seconds)
2021-03-03 06:00:13 michalz joins (~user@185.246.204.61)
2021-03-03 06:00:28 ddellacosta joins (~ddellacos@86.106.143.110)
2021-03-03 06:02:36 aqd joins (~aqd@84.20.147.33)
2021-03-03 06:02:57 × dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 264 seconds)
2021-03-03 06:03:27 × carlomagno1 quits (~cararell@148.87.23.10) (Quit: Leaving.)
2021-03-03 06:04:20 jamm_ joins (~jamm@unaffiliated/jamm)
2021-03-03 06:05:03 apache801 joins (~rishi@wsip-70-168-153-252.oc.oc.cox.net)
2021-03-03 06:05:43 × ddellacosta quits (~ddellacos@86.106.143.110) (Ping timeout: 276 seconds)
2021-03-03 06:08:26 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 240 seconds)
2021-03-03 06:12:00 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
2021-03-03 06:12:09 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Client Quit)
2021-03-03 06:15:43 × gioyik_ quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 268 seconds)
2021-03-03 06:18:05 sicklorkin parts (~adsf@s206-116-49-76.bc.hsia.telus.net) ()
2021-03-03 06:18:06 CMCDragonkai1 joins (~Thunderbi@60-242-118-130.tpgi.com.au)
2021-03-03 06:20:49 × sm2n quits (~sm2n@bras-base-hmtnon143hw-grc-15-70-54-78-219.dsl.bell.ca) (Ping timeout: 256 seconds)
2021-03-03 06:21:06 takuan joins (~takuan@178-116-218-225.access.telenet.be)
2021-03-03 06:23:05 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-03 06:25:31 sord937 joins (~sord937@gateway/tor-sasl/sord937)
2021-03-03 06:30:30 sm2n joins (~sm2n@bras-base-hmtnon143hw-grc-15-70-54-78-219.dsl.bell.ca)
2021-03-03 06:31:38 × Philonous quits (~Philonous@unaffiliated/philonous) (Ping timeout: 265 seconds)
2021-03-03 06:31:52 Philonous joins (~Philonous@unaffiliated/philonous)
2021-03-03 06:33:46 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-03-03 06:35:36 × forgottenone quits (~forgotten@176.42.24.53) (Ping timeout: 240 seconds)
2021-03-03 06:36:13 aggin joins (~ecm@103.88.87.46)
2021-03-03 06:38:24 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 245 seconds)
2021-03-03 06:39:27 forgottenone joins (~forgotten@176.42.25.89)
2021-03-03 06:40:44 sm2n_ joins (~sm2n@bras-base-hmtnon143hw-grc-15-70-54-78-219.dsl.bell.ca)
2021-03-03 06:41:18 × apache801 quits (~rishi@wsip-70-168-153-252.oc.oc.cox.net) (Ping timeout: 245 seconds)
2021-03-03 06:41:54 × ukboi quits (~ukboi@139.28.218.148) (Remote host closed the connection)
2021-03-03 06:41:56 × nineonine quits (~nineonine@50.216.62.2) (Ping timeout: 240 seconds)
2021-03-03 06:43:43 × sm2n quits (~sm2n@bras-base-hmtnon143hw-grc-15-70-54-78-219.dsl.bell.ca) (Ping timeout: 265 seconds)
2021-03-03 06:45:40 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
2021-03-03 06:46:09 danvet_ joins (~danvet@212-51-149-181.fiber7.init7.net)
2021-03-03 06:46:18 sm2n joins (~sm2n@bras-base-hmtnon143hw-grc-15-70-54-78-219.dsl.bell.ca)
2021-03-03 06:47:41 × sm2n_ quits (~sm2n@bras-base-hmtnon143hw-grc-15-70-54-78-219.dsl.bell.ca) (Ping timeout: 260 seconds)
2021-03-03 06:49:07 wmacmil joins (~wmacmil@c83-252-138-144.bredband.comhem.se)
2021-03-03 06:52:15 × Foritus quits (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) (Quit: ლ(ಠ益ಠლ) .:. <Ashley> my porn is hidden in a folder called "BBC Micro Emulator")
2021-03-03 06:53:24 Foritus joins (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net)
2021-03-03 06:54:41 Boomerang joins (~Boomerang@2a05:f6c7:2179:0:9428:7cc:4edb:1705)
2021-03-03 06:57:38 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-03-03 06:57:46 beng-nl1 joins (~beng-nl@217.146.82.202)
2021-03-03 07:01:33 mananamenos joins (~mananamen@193.red-88-11-66.dynamicip.rima-tde.net)
2021-03-03 07:04:13 × danvet_ quits (~danvet@212-51-149-181.fiber7.init7.net) (Ping timeout: 276 seconds)
2021-03-03 07:04:42 × forgottenone quits (~forgotten@176.42.25.89) (Quit: Konversation terminated!)
2021-03-03 07:05:11 <siraben> Why do I have instance Monoid s => Monad (State s) instead of `Monad (State s)` when the monad is derived? http://ix.io/2Rwb
2021-03-03 07:05:20 <siraben> As far as I can tell it's coming from the Applicative instance for `(,) s`
2021-03-03 07:06:42 <koz_> Compose of two Monads isn't a Monad.
2021-03-03 07:06:56 <koz_> Literally oldest trick in the book. :P
2021-03-03 07:07:00 <siraben> I know
2021-03-03 07:07:05 <siraben> I'm trying to derive the state monad from an adjunction
2021-03-03 07:07:30 <siraben> `newtype State s a = State (Compose ((->) s) ((,) s) a) deriving (Functor, Applicative, Monad)`
2021-03-03 07:07:34 <koz_> That's why your derivation fails.
2021-03-03 07:07:43 <koz_> It's also why you should _always_ explicitly derive.
2021-03-03 07:07:59 <koz_> If you'd written it using, say, DerivingVia, you'd have seen this much earlier.
2021-03-03 07:08:00 <siraben> It's worked before here: https://gist.github.com/siraben/9c4f5ec972d876f741210ae16ee82192#file-adjunctions-hs-L32
2021-03-03 07:08:07 <siraben> Yeah, how would I use deriving via?
2021-03-03 07:08:15 <siraben> I have `instance Adjoint f g => Monad (Compose g f) where`
2021-03-03 07:08:32 <siraben> it's worked before but I didn't like that instance I put in just to make GHC compile*
2021-03-03 07:09:32 <koz_> You'd need to have written 'deriving (Monad) via (Compose ...)
2021-03-03 07:09:34 <koz_> '.
2021-03-03 07:09:37 bitmagie joins (~Thunderbi@200116b80698c2004c47218aeec9552a.dip.versatel-1u1.de)
2021-03-03 07:10:08 <koz_> Although actually, I don't think that would have helped.
2021-03-03 07:10:16 <koz_> Ignore me, I dunno what I'm on about. :P
2021-03-03 07:10:56 <siraben> I tried looking online for examples of the state monad via the curry/uncurry adjunction, but to no avail
2021-03-03 07:11:35 ddellacosta joins (~ddellacos@86.106.143.201)
2021-03-03 07:11:41 <siraben> Hm, `Monad (State s)’ is not a unary constraint, as expected by a deriving clause`
2021-03-03 07:11:48 <siraben> added the line `deriving (Monad (State s)) via (Compose ((->) s) ((,) s) a)`
2021-03-03 07:12:33 × CMCDragonkai1 quits (~Thunderbi@60-242-118-130.tpgi.com.au) (Ping timeout: 245 seconds)
2021-03-03 07:13:03 × rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 268 seconds)
2021-03-03 07:13:10 nineonine joins (~nineonine@2604:3d08:7785:9600:2076:7626:28f5:58b2)
2021-03-03 07:13:29 × aggin quits (~ecm@103.88.87.46) (Quit: WeeChat 3.0.1)
2021-03-03 07:14:01 × nineonine quits (~nineonine@2604:3d08:7785:9600:2076:7626:28f5:58b2) (Remote host closed the connection)
2021-03-03 07:14:13 <koz_> Still get the same constraint problem?
2021-03-03 07:14:24 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
2021-03-03 07:14:44 <siraben> need to look into deriving via
2021-03-03 07:15:03 nineonine joins (~nineonine@2604:3d08:7785:9600:2076:7626:28f5:58b2)
2021-03-03 07:15:03 cfricke joins (~cfricke@unaffiliated/cfricke)
2021-03-03 07:15:17 <koz_> You don't need that 'a'
2021-03-03 07:15:19 <koz_> It'd be
2021-03-03 07:15:34 <siraben> This works,
2021-03-03 07:15:36 <siraben> newtype State s a = State (Compose ((->) s) ((,) s) a)
2021-03-03 07:15:36 <siraben> deriving (Functor, Applicative)
2021-03-03 07:15:36 <siraben> deriving Monad via (Compose ((->) s) ((,) s))
2021-03-03 07:15:41 <koz_> Yep.

All times are in UTC.