Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-05-14 08:40:01 <boxscape> not sure if that's possible to define though
2021-05-14 08:40:46 johnnyboy[m] joins (gifumatrix@gateway/shell/matrix.org/x-ojhxzwohbdrmgjvq)
2021-05-14 08:40:47 Noughtmare[m] joins (naughtmare@gateway/shell/matrix.org/x-qigccbyaufimndlg)
2021-05-14 08:41:07 × _bin quits (~bin@2600:1700:10a1:38d0:4da3:c080:c26c:e9d4) (Quit: ZNC - https://znc.in)
2021-05-14 08:41:33 _bin joins (~bin@75-54-107-59.lightspeed.hstntx.sbcglobal.net)
2021-05-14 08:42:14 <boxscape> it should be possible, if this class has a `flip` method and a law that flip is an isomorphism, I guess
2021-05-14 08:43:09 × vk3wtf quits (~doc@61.68.250.44) (Quit: WeeChat 3.0.1)
2021-05-14 08:43:42 vk3wtf joins (~doc@61.68.250.44)
2021-05-14 08:43:43 berberman__ joins (berberma4@gateway/shell/matrix.org/x-smsbwwrsnfgurtng)
2021-05-14 08:44:09 ServerStatsDisco joins (serverstat@gateway/shell/matrix.org/x-miecketcbzzjnzas)
2021-05-14 08:44:52 ubert joins (~Thunderbi@p200300ecdf259d7bca5b76fffe29f233.dip0.t-ipconnect.de)
2021-05-14 08:45:27 l-as joins (lasmatrixo@gateway/shell/matrix.org/x-cxrmfjuikklcwojc)
2021-05-14 08:45:36 hsiktas[m] joins (hsiktasmat@gateway/shell/matrix.org/x-izewmwhjsrwvknuy)
2021-05-14 08:45:57 jespada_ joins (~jespada@87.74.38.78)
2021-05-14 08:47:33 JaakkoLuttinen[m joins (jluttinema@gateway/shell/matrix.org/x-btugkmuncsueyjng)
2021-05-14 08:47:44 jeffcasavant[m] joins (jeffcasava@gateway/shell/matrix.org/x-cgvaqqcpzrsthsqo)
2021-05-14 08:48:19 dyniec[m] joins (dyniecmatr@gateway/shell/matrix.org/x-xljgadiiftwikmko)
2021-05-14 08:48:29 maerwald[m] joins (maerwaldma@gateway/shell/matrix.org/x-eftsnltcljcrozqd)
2021-05-14 08:49:01 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2021-05-14 08:49:01 × jespada quits (~jespada@87.74.37.248) (Ping timeout: 260 seconds)
2021-05-14 08:51:50 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
2021-05-14 08:57:43 vilpan joins (~0@212.117.1.172)
2021-05-14 09:00:18 × jchia[m] quits (jchiamatri@gateway/shell/matrix.org/x-cnmbhrrzgpmynneo) (Quit: Idle for 30+ days)
2021-05-14 09:00:19 × Lurkki[m]1 quits (lurkkipriv@gateway/shell/matrix.org/x-cpeitjulibvdczps) (Quit: Idle for 30+ days)
2021-05-14 09:12:01 jespada joins (~jespada@87.74.38.81)
2021-05-14 09:12:47 <kingswim> it seems -> can apprear in lambda \x->x,and also can apprear in fff:: a->a->a,but donot know it can do like this : data Procedure = InitBoosters (controller->script)? where i can find the origin introduction of ->?
2021-05-14 09:13:56 <boxscape> kingswim the -> in the lambda syntax is a different -> than the (->) type constructor. They're both built into the language, though ghci will say something if you ask it about the type constructor with :i
2021-05-14 09:13:59 <boxscape> % :i (->)
2021-05-14 09:14:00 <yahb> boxscape: type (->) :: * -> * -> *; type (->) = FUN 'Many :: * -> * -> *; -- Defined in `GHC.Types'; infixr -1 ->; instance Applicative ((->) r) -- Defined in `GHC.Base'; instance Functor ((->) r) -- Defined in `GHC.Base'; instance Monad ((->) r) -- Defined in `GHC.Base'; instance Monoid b => Monoid (a -> b) -- Defined in `GHC.Base'; instance Semigroup b => Semigroup (a -> b) -- Defined in `GHC.Base'; instance [s
2021-05-14 09:14:06 × jespada_ quits (~jespada@87.74.38.78) (Ping timeout: 240 seconds)
2021-05-14 09:15:54 <boxscape> kingswim similar to how you can have `data A = A`, and overload A to be both a type and data constructor, -> is "overloaded" to be a type constructor for functions, so `a -> b` is the type of functions from a to b, but also as part of the syntax of the function data constructor, so that `\x -> y` is a function of type `a -> b` if (x :: a) and (y ::
2021-05-14 09:15:55 <boxscape> b)
2021-05-14 09:15:58 frozenErebus joins (~frozenEre@37.231.244.249)
2021-05-14 09:16:16 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
2021-05-14 09:16:22 <boxscape> (though it's a bit different because the `->`s are built into the language, whereas `A` is not.)
2021-05-14 09:17:01 × stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds)
2021-05-14 09:17:19 <boxscape> in `data Procedure = InitBoosters (controller -> script)`, you're using the type constructor version, to say that the argument to InitBoosters must be a function of type controller -> script
2021-05-14 09:18:43 <kingswim> i see,i will list diff and try find out the origin reason.
2021-05-14 09:21:19 × kingswim quits (~kevinying@197.210.65.220) (Read error: Connection reset by peer)
2021-05-14 09:21:23 admin__ joins (~kevinying@197.210.65.220)
2021-05-14 09:24:19 × tomsmeding quits (~tomsmedin@tomsmeding.com) (Quit: ZNC 1.8.2 - https://znc.in)
2021-05-14 09:24:20 × energizer quits (~energizer@unaffiliated/energizer) (Quit: ZNC 1.7.0+deb0+xenial1 - https://znc.in)
2021-05-14 09:24:20 × rkrishnan_ quits (~rkrishnan@rkrishnan.org) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
2021-05-14 09:24:28 × shapr quits (~shapr@haskell/developer/shapr) (Ping timeout: 268 seconds)
2021-05-14 09:24:40 energizer joins (~energizer@unaffiliated/energizer)
2021-05-14 09:24:44 tomsmeding joins (~tomsmedin@2a03:b0c0:0:1010::767:3001)
2021-05-14 09:25:31 rkrishnan joins (~rkrishnan@rkrishnan.org)
2021-05-14 09:25:44 <kuribas> why does applicativeDo not allow "do a <- x; let b = y; pure Foo x y"
2021-05-14 09:25:46 <kuribas> ?
2021-05-14 09:25:50 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-05-14 09:26:07 <kuribas> But it allows "do a <- x; b <- pure y; pure Foo x y"
2021-05-14 09:26:19 × arianvp quits (~weechat@arianvp.me) (Ping timeout: 268 seconds)
2021-05-14 09:26:33 shapr joins (~shapr@162.243.9.169)
2021-05-14 09:26:34 shapr is now known as Guest25767
2021-05-14 09:26:43 <kuribas> which is exactly the same
2021-05-14 09:26:53 arianvp joins (~weechat@arianvp.me)
2021-05-14 09:27:11 <kuribas> does ApplicativeDo doesn't do desugaring?
2021-05-14 09:29:52 stree joins (~stree@68.36.8.116)
2021-05-14 09:29:59 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 245 seconds)
2021-05-14 09:30:37 × wei2912 quits (~wei2912@unaffiliated/wei2912) (Remote host closed the connection)
2021-05-14 09:32:25 × chimera quits (~chimera@120-192-113-92.pool.ukrtel.net) (Quit: Konversation terminated!)
2021-05-14 09:33:07 × ubert quits (~Thunderbi@p200300ecdf259d7bca5b76fffe29f233.dip0.t-ipconnect.de) (Remote host closed the connection)
2021-05-14 09:33:19 × admin__ quits (~kevinying@197.210.65.220) (Ping timeout: 245 seconds)
2021-05-14 09:33:24 berberman_ joins (~berberman@unaffiliated/berberman)
2021-05-14 09:33:57 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 250 seconds)
2021-05-14 09:37:29 <boxscape> huh lambdabot's @undo doesn't support let
2021-05-14 09:38:40 × cyphase quits (~cyphase@unaffiliated/cyphase) (Ping timeout: 252 seconds)
2021-05-14 09:39:56 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-05-14 09:39:57 <boxscape> kuribas you can see the output with -ddump-ds, which might tell you why it doesn' work
2021-05-14 09:40:05 <enikar> kuribas: ApllicativeDo does desugaring, but with the rules of Applicative. And if you use a rule that involves Monad, then (>>=) is used, if possible.
2021-05-14 09:40:57 <kuribas> boxscape: so "let x = y;" cannot be desugared to "x <- pure y"?
2021-05-14 09:41:24 <boxscape> I think that was meant for enikar
2021-05-14 09:41:40 <kuribas> no
2021-05-14 09:41:42 <boxscape> hmm
2021-05-14 09:41:46 <boxscape> well, I don't know the answer
2021-05-14 09:41:49 × st8less quits (~st8less@inet-167-224-197-181.isp.ozarksgo.net) (Quit: WeeChat 2.9)
2021-05-14 09:42:22 <kuribas> even so if the bindings in the let don't depend on the previous bindings, the let can be floated up, and it should still work.
2021-05-14 09:44:30 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
2021-05-14 09:44:36 <kuribas> "do a <- x; let b = y; pure Foo x y" => (\a -> Foo a y) <$> x
2021-05-14 09:44:40 <kuribas> looks fine to me.
2021-05-14 09:45:17 <boxscape> that does look pretty applicative
2021-05-14 09:45:31 <boxscape> functorial even
2021-05-14 09:45:59 <kuribas> or better: (let b = y in \a -> Foo a y) <$> x
2021-05-14 09:46:31 × TK__ quits (~cinch@2601:1c0:5201:2100:9992:f75f:4988:2a3c) (Ping timeout: 250 seconds)
2021-05-14 09:46:33 × kristijonas quits (~kristijon@78-56-32-39.static.zebra.lt) (Remote host closed the connection)
2021-05-14 09:46:58 kristijonas joins (~kristijon@78-56-32-39.static.zebra.lt)
2021-05-14 09:48:08 <boxscape> (whoops lambdabot's @undo *does* support let, but the `b = y` needs to be surrounded by {})
2021-05-14 09:48:32 <kuribas> I don't see any lambdabot output
2021-05-14 09:48:48 <boxscape> I experimented in private messages
2021-05-14 09:48:54 <kuribas> @undo do a <- x; let b = y; pure $ Foo x y
2021-05-14 09:48:54 <lambdabot> <unknown>.hs:1:37:Parse error: EOF
2021-05-14 09:49:05 <kuribas> @undo do {a <- x; let b = y; pure $ Foo x y}
2021-05-14 09:49:06 <lambdabot> <unknown>.hs:1:38:Parse error: }
2021-05-14 09:49:08 <boxscape> @undo do a <- x; let {b = y}; pure $ Foo x y
2021-05-14 09:49:08 <lambdabot> x >>= \ a -> let { b = y} in pure $ Foo x y
2021-05-14 09:49:29 <boxscape> but that's without ApplicativeDo
2021-05-14 09:51:54 <kuribas> oh, this works: do a <- x; pure $ let {b = y} in Foo x y
2021-05-14 09:52:30 viluon joins (uid453725@gateway/web/irccloud.com/x-sfbwpdsukvhsninn)
2021-05-14 09:52:51 × Guest93721 quits (~alexander@2a02:587:dc01:3b00:38f4:60b0:4dbb:46) (Ping timeout: 260 seconds)
2021-05-14 09:53:33 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 240 seconds)

All times are in UTC.