Logs: freenode/#haskell
| 2020-10-07 16:07:17 | <dsal> | carbolymer: Are you saying you want to have a type constraint on a field, but you don't want to express it? |
| 2020-10-07 16:07:27 | <siraben> | carbolymer: looks like you're using https://wiki.haskell.org/Existential_type |
| 2020-10-07 16:07:42 | <monochrom> | pure (Foo print) |
| 2020-10-07 16:08:20 | <carbolymer> | siraben, yes, that's existential type |
| 2020-10-07 16:08:21 | × | jneira_ quits (~jneira@244.red-176-83-85.dynamicip.rima-tde.net) (Read error: Connection reset by peer) |
| 2020-10-07 16:08:33 | → | jneira_ joins (~jneira@80.30.101.206) |
| 2020-10-07 16:08:34 | <carbolymer> | dsal, `Show a` isn't enough? |
| 2020-10-07 16:08:39 | <monochrom> | https://repl.it/repls/MixedWealthyGraphs |
| 2020-10-07 16:08:52 | × | shatriff quits (~vitaliish@88.155.140.206) (Ping timeout: 246 seconds) |
| 2020-10-07 16:09:06 | <siraben> | carbolymer: I would caution against naming your constructor `mkFoo`, btw |
| 2020-10-07 16:09:25 | <carbolymer> | monochrom, wow thanks, I don't get it why brackets make difference |
| 2020-10-07 16:09:28 | hackage | indigo 0.3.0 - Convenient imperative eDSL over Lorentz. https://hackage.haskell.org/package/indigo-0.3.0 (gromak) |
| 2020-10-07 16:09:39 | <carbolymer> | siraben, that's minimal example from my real problem ;) |
| 2020-10-07 16:09:40 | <siraben> | nevermind, I saw that you have an IO action inside Foo, here |
| 2020-10-07 16:09:40 | <siraben> | heh* |
| 2020-10-07 16:09:52 | <monochrom> | Something about predicativity. |
| 2020-10-07 16:10:36 | × | jonatan quits (~nate@h77-53-70-163.cust.a3fiber.se) (Ping timeout: 256 seconds) |
| 2020-10-07 16:11:39 | → | jonatan joins (~nate@h77-53-70-163.cust.a3fiber.se) |
| 2020-10-07 16:13:10 | <monochrom> | that (.) monomorphizes, apposition (application as juxtaposition) preserves polymorphism, and you want polymorphism preserved in this case. |
| 2020-10-07 16:14:00 | <monochrom> | (.) monomorphizes its operands |
| 2020-10-07 16:14:54 | <dsal> | Oh that's weird. I didn't even notice the failure because I changed it to `pure $ Foo print` in my example when I was trying to run it because it was too much punctuation. |
| 2020-10-07 16:14:58 | hackage | Shpadoinkle-router 0.2.0.0 - A single page application rounter for Shpadoinkle based on Servant. https://hackage.haskell.org/package/Shpadoinkle-router-0.2.0.0 (fresheyeball) |
| 2020-10-07 16:15:44 | → | voyons_calisse joins (~dan@107-190-41-58.cpe.teksavvy.com) |
| 2020-10-07 16:15:48 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
| 2020-10-07 16:15:55 | → | Ariakenom joins (~Ariakenom@h-155-4-221-50.NA.cust.bahnhof.se) |
| 2020-10-07 16:17:25 | × | nyd quits (~nyd@unaffiliated/elysian) (Quit: nyd) |
| 2020-10-07 16:17:52 | × | jokester_ quits (~mono@2001:19f0:5:1e1d:5400:1ff:fe45:5877) (Quit: WeeChat 2.8) |
| 2020-10-07 16:17:52 | <monochrom> | A future GHC version will probably be happy with "(pure . Foo) print". Someone has figured out how to support impredicativity for the 3rd time. |
| 2020-10-07 16:18:14 | → | jokester joins (~mono@unaffiliated/jokester) |
| 2020-10-07 16:18:35 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 2020-10-07 16:18:37 | × | voyons_calice quits (~dan@162.246.216.28) (Ping timeout: 260 seconds) |
| 2020-10-07 16:18:51 | <siraben> | monochrom: What's difficult about impredicativity? I'm not familiar with the issue |
| 2020-10-07 16:21:57 | → | ahmr88 joins (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) |
| 2020-10-07 16:22:47 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 240 seconds) |
| 2020-10-07 16:22:59 | → | ixlun joins (~matthew@213.205.241.94) |
| 2020-10-07 16:24:32 | <ixlun> | Hi all, I was just wondering if there was a language extension that allowed trivially extractable typeclasses to be extracted in pattern matching. Suppose a :: Maybe A then: case a of Maybe -> lift . print |
| 2020-10-07 16:25:00 | <ixlun> | That way you can omit the variable name and tacking it on to the end of the pattern match |
| 2020-10-07 16:26:33 | × | ahmr88 quits (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) (Ping timeout: 260 seconds) |
| 2020-10-07 16:26:56 | → | GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) |
| 2020-10-07 16:26:56 | × | GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host) |
| 2020-10-07 16:26:56 | → | GyroW joins (~GyroW@unaffiliated/gyrow) |
| 2020-10-07 16:27:40 | × | GyroW_ quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 272 seconds) |
| 2020-10-07 16:28:19 | → | brandly joins (~brandly@c-73-68-15-46.hsd1.ma.comcast.net) |
| 2020-10-07 16:28:33 | <phadej> | the answer is traverse(_) |
| 2020-10-07 16:28:55 | <phadej> | :t traverse_ print :: Maybe a -> IO () |
| 2020-10-07 16:28:57 | <lambdabot> | error: |
| 2020-10-07 16:28:57 | <lambdabot> | • No instance for (Show a1) arising from a use of ‘print’ |
| 2020-10-07 16:28:57 | <lambdabot> | Possible fix: |
| 2020-10-07 16:29:00 | <phadej> | :t traverse_ print :: Show a => Maybe a -> IO () |
| 2020-10-07 16:29:02 | <lambdabot> | Show a => Maybe a -> IO () |
| 2020-10-07 16:29:11 | <phadej> | :t traverse_ print :: Show a => Either b a -> IO () |
| 2020-10-07 16:29:13 | <lambdabot> | Show a => Either b a -> IO () |
| 2020-10-07 16:29:57 | hackage | Shpadoinkle-widgets 0.1.0.0 - A collection of common reusable types and components. https://hackage.haskell.org/package/Shpadoinkle-widgets-0.1.0.0 (fresheyeball) |
| 2020-10-07 16:30:06 | <ixlun> | :t traverse_ |
| 2020-10-07 16:30:07 | <lambdabot> | (Foldable t, Applicative f) => (a -> f b) -> t a -> f () |
| 2020-10-07 16:30:48 | <ixlun> | Ahh, nice |
| 2020-10-07 16:32:42 | <phadej> | :t Data.Foldable.for_ |
| 2020-10-07 16:32:44 | <lambdabot> | (Foldable t, Applicative f) => t a -> (a -> f b) -> f () |
| 2020-10-07 16:32:50 | <phadej> | is nice too |
| 2020-10-07 16:32:58 | <phadej> | (it's just flipped traverse_) |
| 2020-10-07 16:34:25 | → | jchia_ joins (~jchia@58.32.35.239) |
| 2020-10-07 16:34:52 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 2020-10-07 16:35:50 | → | PerryThePlatypus joins (b644f401@182.68.244.1) |
| 2020-10-07 16:36:01 | <koz_> | phadej: The answer to everything. |
| 2020-10-07 16:36:17 | → | nineonine joins (~nineonine@216-19-190-182.dyn.novuscom.net) |
| 2020-10-07 16:36:22 | → | alp joins (~alp@2a01:e0a:58b:4920:88ef:76a6:5d73:1be6) |
| 2020-10-07 16:36:57 | hackage | Shpadoinkle-examples 0.0.0.2 - Example usages of Shpadoinkle https://hackage.haskell.org/package/Shpadoinkle-examples-0.0.0.2 (fresheyeball) |
| 2020-10-07 16:37:55 | × | shatriff_ quits (~vitaliish@128-124-197-175.mobile.vf-ua.net) (Ping timeout: 246 seconds) |
| 2020-10-07 16:39:09 | → | shatriff joins (~vitaliish@88.155.140.206) |
| 2020-10-07 16:41:25 | × | jneira_ quits (~jneira@80.30.101.206) (Ping timeout: 240 seconds) |
| 2020-10-07 16:42:05 | → | thir joins (~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) |
| 2020-10-07 16:42:05 | × | ralejs_ quits (~ralejs@2620:10d:c093:400::5:a494) (Read error: Connection reset by peer) |
| 2020-10-07 16:42:38 | → | ralejs joins (~ralejs@2620:10d:c093:400::5:a494) |
| 2020-10-07 16:44:07 | <frdg> | what is an example of a reflexive relation being used in haskell? |
| 2020-10-07 16:45:04 | <siraben> | frdg: type level equality |
| 2020-10-07 16:45:23 | <siraben> | https://hackage.haskell.org/package/base-4.9.1.0/docs/Data-Type-Equality.html |
| 2020-10-07 16:45:43 | <zincy_> | First class IO means you can pass IO values around like any other value right? In which cases doesn't any language that has promises/futures have first class IO? |
| 2020-10-07 16:46:22 | <frdg> | siraben: thanks I am looking at this |
| 2020-10-07 16:47:07 | × | thir quits (~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 2020-10-07 16:51:05 | <monochrom> | Even more relaxedly, every language that has higher-order functions. |
| 2020-10-07 16:51:21 | <monochrom> | or rather, higher-order procedures. |
| 2020-10-07 16:51:32 | × | shatriff quits (~vitaliish@88.155.140.206) (Remote host closed the connection) |
| 2020-10-07 16:51:39 | × | GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie) |
| 2020-10-07 16:51:54 | → | GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) |
| 2020-10-07 16:51:54 | × | GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host) |
| 2020-10-07 16:51:54 | → | GyroW joins (~GyroW@unaffiliated/gyrow) |
| 2020-10-07 16:51:58 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-10-07 16:52:09 | × | nineonine quits (~nineonine@216-19-190-182.dyn.novuscom.net) (Remote host closed the connection) |
| 2020-10-07 16:52:52 | <monochrom> | But that's too easy. |
| 2020-10-07 16:52:58 | <ixlun> | Does anyone know how I call a StateT S IO() monad? |
| 2020-10-07 16:53:51 | <ixlun> | I've tried: main = runState uciMain newGame |
| 2020-10-07 16:54:34 | <monochrom> | That looks right. |
| 2020-10-07 16:54:46 | <monochrom> | err, runStateT instead |
| 2020-10-07 16:55:06 | → | tomenos joins (bd0624fa@189.6.36.250) |
| 2020-10-07 16:55:16 | × | tomenos quits (bd0624fa@189.6.36.250) (Remote host closed the connection) |
| 2020-10-07 16:55:46 | <ixlun> | Ahh, didn't know there were transformer variations! |
| 2020-10-07 16:58:18 | <monochrom> | siraben: Impredicativity makes type inference more difficult. I also heard that the GHC devs couldn't fit it into the particular way GHC does type inference. (And that particular way is not to be thrown away lightly, it has been successful for basically everything else.) |
| 2020-10-07 16:58:53 | <monochrom> | But there is a recent paper that looks promising. |
| 2020-10-07 17:00:19 | <monochrom> | https://github.com/ghc-proposals/ghc-proposals/pull/274 |
| 2020-10-07 17:00:35 | → | macrover joins (~macrover@ip70-189-231-35.lv.lv.cox.net) |
All times are in UTC.