Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-10 10:36:38 × domenkozar[m] quits (domenkozar@NixOS/user/domenkozar) (Quit: Bridge terminating on SIGTERM)
2021-03-10 10:36:38 × Pressyware[m] quits (pressyware@gateway/shell/matrix.org/x-plprftxrswzlfsuf) (Quit: Bridge terminating on SIGTERM)
2021-03-10 10:36:38 × a-tsioh[m] quits (a-tsiohmat@gateway/shell/matrix.org/x-uvugmgtwtycebrwk) (Quit: Bridge terminating on SIGTERM)
2021-03-10 10:36:38 × berberman[T] quits (berberma4@gateway/shell/matrix.org/x-vvymcwfscdivsdlx) (Quit: Bridge terminating on SIGTERM)
2021-03-10 10:36:38 × mud quits (kadobanmat@gateway/shell/matrix.org/x-qmcvpkrinjigllxf) (Quit: Bridge terminating on SIGTERM)
2021-03-10 10:36:38 × Haskman[m] quits (haskmanmat@gateway/shell/matrix.org/x-rskmegwndatuqvsm) (Quit: Bridge terminating on SIGTERM)
2021-03-10 10:36:38 × arcontethegreat[ quits (arcontethe@gateway/shell/matrix.org/x-tdaiuqgmbdibjmlc) (Quit: Bridge terminating on SIGTERM)
2021-03-10 10:36:39 × freeman42x[m]1 quits (freeman42x@gateway/shell/matrix.org/x-mjfaafbtrzhgydze) (Quit: Bridge terminating on SIGTERM)
2021-03-10 10:36:41 × boistordu quits (boistordum@gateway/shell/matrix.org/x-alsxfyrrkthoxfgo) (Quit: Bridge terminating on SIGTERM)
2021-03-10 10:36:41 × invent[m] quits (inventmatr@gateway/shell/matrix.org/x-acsaxyfzehsuqpnv) (Quit: Bridge terminating on SIGTERM)
2021-03-10 10:36:41 × AbtractSingleton quits (rasurumatr@gateway/shell/matrix.org/x-hsxpwrgsikiawcsr) (Quit: Bridge terminating on SIGTERM)
2021-03-10 10:36:41 × themsay[m] quits (themsaymat@gateway/shell/matrix.org/x-hriptenclfowxntk) (Quit: Bridge terminating on SIGTERM)
2021-03-10 10:37:38 <tomsmeding> mananamenos: kind of, yes
2021-03-10 10:37:52 <tomsmeding> but also that you can let functions work in a bigger monad stack than they were designed for
2021-03-10 10:38:43 polyrain joins (~polyrain@124.177.21.171)
2021-03-10 10:39:10 ph88^ joins (~ph88@2a02:8109:9e00:7e5c:5981:8991:829b:4f1d)
2021-03-10 10:39:14 <tomsmeding> for example, if a function 'foo' wants to run in a Reader Environment monad, but you're instead working in a ReaderT Environment WhateverM, then you you could write 'foo' to hvae signature foo :: MonadReader Environment m => m result instead of foo :: Reader Environment result
2021-03-10 10:39:55 <tomsmeding> then you could write instance Monad m => MonadReader e (ReaderT e m)
2021-03-10 10:40:24 <tomsmeding> but as I said, your problem is the other say round: not the result of a function that you want in a bigger monad, but an argument
2021-03-10 10:40:38 × LKoen quits (~LKoen@194.250.88.92.rev.sfr.net) (Read error: Connection reset by peer)
2021-03-10 10:40:55 <jacks2> ADG1089__, if it is something like foo :: IO SomeType, doing this will force deep evaluation of the SomeType object: x <- foo; evaluate (force x);
2021-03-10 10:41:02 <tomsmeding> which you can't do in general using the mtl approach I believe; you could of course write a get' :: String -> e -> ReaderT e HandlerM () -> AppM ()
2021-03-10 10:41:15 LKoen joins (~LKoen@194.250.88.92.rev.sfr.net)
2021-03-10 10:41:15 <tomsmeding> mananamenos: but I suppose you already thought of that :)
2021-03-10 10:41:47 <jacks2> ADG1089__, in that case, time both x <- foo and evaluate (force x)
2021-03-10 10:41:57 × ph88 quits (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de) (Ping timeout: 264 seconds)
2021-03-10 10:44:23 × stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds)
2021-03-10 10:45:22 blahblahblah joins (6719f216@103.25.242.22)
2021-03-10 10:46:50 <tomsmeding> ADG1089__: the 'force' is not necessary if evaluating the result to WHNF is sufficient
2021-03-10 10:48:49 Hanma[m] joins (hanmamatri@gateway/shell/matrix.org/x-efytsvxrhnkbgydz)
2021-03-10 10:49:13 <blahblahblah> cabal check gives me a warning about using a fixed version before 1.10, even though I'm not using 1.10. The problem is it exits with a nonzero exit code. Shouldn't cabal check only exit with error code for... errors?
2021-03-10 10:50:54 <tomsmeding> blahblahblah: 'cabal check --help' says 'If no errors and warnings are reported, Hackage will accept this package.'
2021-03-10 10:51:01 <tomsmeding> so I assume it's by design?
2021-03-10 10:51:49 <tomsmeding> also supporting cabal 1.8 sounds not very useful to me
2021-03-10 10:52:36 fendor joins (~fendor@178.165.128.28.wireless.dyn.drei.com)
2021-03-10 10:53:52 <mananamenos> tomsmeding, thanks!
2021-03-10 10:54:11 × xlei quits (znc@unaffiliated/xlei) (Quit: ZNC - https://znc.in)
2021-03-10 10:54:28 ubert joins (~Thunderbi@p200300ecdf25d90ce6b318fffe838f33.dip0.t-ipconnect.de)
2021-03-10 10:55:09 bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-10 10:56:57 × blahblahblah quits (6719f216@103.25.242.22) (Quit: Connection closed)
2021-03-10 10:57:27 stree joins (~stree@68.36.8.116)
2021-03-10 10:57:46 Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck)
2021-03-10 10:58:39 m2rrorbird joins (dwsjeid911@gateway/vpn/mullvad/dwsjeid911)
2021-03-10 10:59:56 × Raito_Bezarius quits (~Raito@unaffiliated/raito-bezarius/x-8764578) (Ping timeout: 240 seconds)
2021-03-10 11:00:29 × bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 268 seconds)
2021-03-10 11:00:37 × mirrorbird quits (~dwsjeid91@2a00:801:3f8:23a5:cea1:f987:d427:ba9b) (Read error: Connection reset by peer)
2021-03-10 11:02:07 mirrorb2rd joins (~dwsjeid91@2a00:801:3f8:23a5:cea1:f987:d427:ba9b)
2021-03-10 11:05:25 × m2rrorbird quits (dwsjeid911@gateway/vpn/mullvad/dwsjeid911) (Ping timeout: 268 seconds)
2021-03-10 11:06:46 zq joins (~zq@xorshift.org)
2021-03-10 11:06:57 <zq> :t 6
2021-03-10 11:06:58 <lambdabot> Num p => p
2021-03-10 11:07:58 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-03-10 11:08:03 xlei joins (znc@unaffiliated/xlei)
2021-03-10 11:08:04 <zq> how do i figure out which package typeclass Partial resides in?
2021-03-10 11:08:24 Aquazi joins (uid312403@gateway/web/irccloud.com/x-gbfjzprbmmawtnrl)
2021-03-10 11:08:46 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-10 11:10:08 heatsink joins (~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a)
2021-03-10 11:11:48 <[exa]> zq: you hoogle it on hoogle :]
2021-03-10 11:12:36 <[exa]> ...but not sure if there's the actual Partial typeclass: https://hoogle.haskell.org/?hoogle=Partial
2021-03-10 11:12:51 Raito_Bezarius joins (~Raito@unaffiliated/raito-bezarius/x-8764578)
2021-03-10 11:13:25 <[exa]> (perhaps it's the `type Partial=HasCallStack` from `safe` ?)
2021-03-10 11:15:02 <zq> [exa]: thanks, it's been a while since i've last haskelled and i forgot about the hoogle name
2021-03-10 11:15:02 × heatsink quits (~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a) (Ping timeout: 264 seconds)
2021-03-10 11:15:28 <zq> the one i'm looking at is from Control.Exception.Extra
2021-03-10 11:18:33 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-03-10 11:19:59 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-10 11:22:06 <ADG1089__> @pl \x -> f x && g x
2021-03-10 11:22:06 <lambdabot> liftM2 (&&) f g
2021-03-10 11:22:08 × sh91 quits (~sh9@softbank060116136158.bbtec.net) (Ping timeout: 256 seconds)
2021-03-10 11:22:41 <ADG1089__> :t \x -> (&&) <*> f <&> g
2021-03-10 11:22:42 <lambdabot> error:
2021-03-10 11:22:42 <lambdabot> • Could not deduce (FromExpr Bool) arising from a use of ‘f’
2021-03-10 11:22:43 <lambdabot> from the context: FromExpr b
2021-03-10 11:22:56 <ADG1089__> :t (&&) <*> f <&> g
2021-03-10 11:22:58 <lambdabot> error:
2021-03-10 11:22:58 <lambdabot> • Could not deduce (FromExpr Bool) arising from a use of ‘f’
2021-03-10 11:22:58 <lambdabot> from the context: FromExpr b
2021-03-10 11:24:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2021-03-10 11:25:17 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-10 11:26:16 sablib1 joins (~sablib@171.113.166.176)
2021-03-10 11:29:34 mouseghost joins (~draco@87-206-9-185.dynamic.chello.pl)
2021-03-10 11:29:34 × mouseghost quits (~draco@87-206-9-185.dynamic.chello.pl) (Changing host)
2021-03-10 11:29:34 mouseghost joins (~draco@wikipedia/desperek)
2021-03-10 11:29:44 <zq> really not a fan of type HasCallStack = ?callStack :: CallStack
2021-03-10 11:30:06 <zq> it completely obscures the variable that is in scope
2021-03-10 11:30:28 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
2021-03-10 11:31:10 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-10 11:32:20 <tomsmeding> :t \f g -> (&&) <$> f <*> g
2021-03-10 11:32:21 <lambdabot> Applicative f => f Bool -> f Bool -> f Bool
2021-03-10 11:32:25 <tomsmeding> ADG1089__: ^
2021-03-10 11:33:37 <tomsmeding> <$> = fmap takes (&&) :: Bool -> (Bool -> Bool) and f :: f Bool and applies (&&) under the applicative, producing f (Bool -> Bool)
2021-03-10 11:34:06 <tomsmeding> <*> takes f (Bool -> Bool) and f Bool and applies a function within the applicative to the argument, producing f Bool
2021-03-10 11:34:17 × ralu quits (~ralu@static.211.245.203.116.clients.your-server.de) (Quit: The Lounge - https://thelounge.chat)
2021-03-10 11:34:17 <tomsmeding> :t \f g -> pure (&&) <*> f <*> g
2021-03-10 11:34:19 <lambdabot> Applicative f => f Bool -> f Bool -> f Bool
2021-03-10 11:34:52 <tomsmeding> <*> is like <$> except it takes a function within the applicative instead a plain function
2021-03-10 11:35:38 <tomsmeding> <$> <*> is not just a magic pattern, it also means something :)
2021-03-10 11:35:42 × zceejkr quits (~wintermut@cpe-62-84-236-30.dynamic.amis.net) (Ping timeout: 260 seconds)
2021-03-10 11:36:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
2021-03-10 11:36:28 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)

All times are in UTC.