Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 693 694 695 696 697 698 699 700 701 702 703 .. 5022
502,152 events total
2020-10-17 09:23:22 × Jonkimi727406120 quits (~Jonkimi@223.213.79.20) (Ping timeout: 256 seconds)
2020-10-17 09:24:57 invaser joins (~Thunderbi@31.148.23.125)
2020-10-17 09:25:46 Jonkimi727406120 joins (~Jonkimi@223.213.79.20)
2020-10-17 09:26:19 × thunderrd quits (~thunderrd@183.182.110.178) (Remote host closed the connection)
2020-10-17 09:26:21 <tomsmeding> okay this is a more minimal case: https://paste.tomsmeding.com/jvWCizUj
2020-10-17 09:26:26 jespada joins (~jespada@90.254.245.15)
2020-10-17 09:26:31 <tomsmeding> no deps
2020-10-17 09:26:59 <tomsmeding> do people agree that error is uninformative?
2020-10-17 09:27:38 × jespada quits (~jespada@90.254.245.15) (Client Quit)
2020-10-17 09:28:24 thir joins (~thir@pd9e1b01f.dip0.t-ipconnect.de)
2020-10-17 09:28:39 <tomsmeding> in particular: there are two Elt constraints around: one on map' and one on constant'. It's not indicating which is the problem; in this case it doesn't really matter, but in a more complex scenario that may be useful information
2020-10-17 09:29:04 × lemmih quits (~lemmih@2406:3003:2072:44:70c9:d5cf:dc27:2e6a) (Remote host closed the connection)
2020-10-17 09:29:26 <tomsmeding> "a40f = map' (constant' 2.0)" is a better replacement of the last two lines, no need for the "id" indirection
2020-10-17 09:29:29 lemmih joins (~lemmih@2406:3003:2072:44:70c9:d5cf:dc27:2e6a)
2020-10-17 09:30:18 × Randy quits (randy@freebsd/user/randy) (Quit: Out)
2020-10-17 09:30:34 Randy joins (randy@freebsd/user/randy)
2020-10-17 09:32:51 kenran joins (~maier@87.123.205.246)
2020-10-17 09:34:41 <Rembane> tomsmeding: In this case I can manage because I can see everything that creates this error, but in your earlier case I would've loved to have some more help from the compiler.
2020-10-17 09:35:32 <Rembane> tomsmeding: This all boils down to, post in on the issue tracker please. :)
2020-10-17 09:36:02 zebrag joins (~inkbottle@aaubervilliers-654-1-98-110.w86-212.abo.wanadoo.fr)
2020-10-17 09:36:53 × inkbottle quits (~inkbottle@aaubervilliers-654-1-104-11.w86-212.abo.wanadoo.fr) (Ping timeout: 260 seconds)
2020-10-17 09:38:39 <tomsmeding> I can post it; I feel uncertain whether there is an existing issue about it, given that there are 4k+ issues open :p
2020-10-17 09:38:50 knupfer joins (~Thunderbi@87.123.206.163)
2020-10-17 09:40:15 ensyde joins (~ensyde@2600:1702:2e30:1a40:584e:1c7e:e97b:16d2)
2020-10-17 09:40:15 <tomsmeding> this is a feature_request, isn't it?
2020-10-17 09:40:31 wei2912 joins (~wei2912@unaffiliated/wei2912)
2020-10-17 09:40:32 × jneira_ quits (~jneira@111.red-176-83-68.dynamicip.rima-tde.net) (Read error: Connection reset by peer)
2020-10-17 09:41:20 jneira_ joins (~jneira@80.30.100.250)
2020-10-17 09:41:42 <Rembane> tomsmeding: I think it is, blame me if it isn't. :)
2020-10-17 09:41:58 dcoutts_ joins (~duncan@33.14.75.194.dyn.plus.net)
2020-10-17 09:42:42 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-wfqfiwhdaazevkgj) (Quit: Connection closed for inactivity)
2020-10-17 09:44:09 <phadej> doesn't that error happen because 2.0 is arbitrary Fractional a => a
2020-10-17 09:44:23 <phadej> if you do (2.0 :: Double) it will "go away", or at least say Elt Double cosntraint?
2020-10-17 09:45:11 <phadej> I don't think its uninformative, it's a literal gotcha
2020-10-17 09:45:28 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-17 09:45:29 × ensyde quits (~ensyde@2600:1702:2e30:1a40:584e:1c7e:e97b:16d2) (Ping timeout: 272 seconds)
2020-10-17 09:45:36 × Jonkimi727406120 quits (~Jonkimi@223.213.79.20) (Ping timeout: 272 seconds)
2020-10-17 09:46:50 <phadej> in the minimal example, it's the same `Elt a` which is unsatisfied, i.e. it could come from either map' or constant'
2020-10-17 09:47:07 <phadej> as `a`s are unified
2020-10-17 09:47:21 × wei2912 quits (~wei2912@unaffiliated/wei2912) (Quit: leaving)
2020-10-17 09:47:24 <tomsmeding> phadej: true, it's about the literal, but it could equally be a variable with type Fractional a => a
2020-10-17 09:47:45 <phadej> tomsmeding: more concretely, what you think GHC should say
2020-10-17 09:48:02 <tomsmeding> the point is: what if there were a number of such literals, and most could be inferred based on external information except one. Which one is it? The error message doesn't tell.
2020-10-17 09:48:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-10-17 09:48:30 × invaser quits (~Thunderbi@31.148.23.125) (Quit: invaser)
2020-10-17 09:49:16 <tomsmeding> phadej: for errors reading "... (mentions type variable a0) ... arising from a use of ‘myFunction’, ...", I'd like to see the type of myFunction, that includes a0
2020-10-17 09:49:32 <tomsmeding> because presumably a0 is in there :p
2020-10-17 09:49:59 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
2020-10-17 09:50:05 × kenran quits (~maier@87.123.205.246) (Ping timeout: 240 seconds)
2020-10-17 09:50:47 invaser joins (~Thunderbi@31.148.23.125)
2020-10-17 09:53:14 <phadej> arising from a use of ‘a40f’ at type 'a40f :: (Elt a0, Fractional a0) => (Exp a0 -> Exp a0) -> ()'
2020-10-17 09:53:17 <phadej> ?
2020-10-17 09:53:45 <phadej> yes, that could be reasonable feature request
2020-10-17 09:54:25 <tomsmeding> yes that; I'll see if I can make a more compelling example
2020-10-17 09:54:28 <phadej> this example is a bit too minimal, as `a40f` has only one variable
2020-10-17 09:56:08 mterwoord joins (~mterwoord@178.162.204.238)
2020-10-17 09:56:28 <phadej> something with (Integral a, Integral b) => ...
2020-10-17 09:56:33 <phadej> and used so you flip arguments
2020-10-17 09:56:43 <phadej> so you aren't sure anymore whether a0 was actually b
2020-10-17 09:57:17 Jonkimi727406120 joins (~Jonkimi@223.213.79.20)
2020-10-17 09:58:52 <phadej> except integral will be defaulted :(
2020-10-17 09:59:46 <tomsmeding> that can be fixed with a custom class :p
2020-10-17 10:00:12 <tomsmeding> I had an example where the variable got an obscure name from somewhere, let me see if I can resurrect that one
2020-10-17 10:00:52 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
2020-10-17 10:02:33 × tito_04 quits (~taurux@net-93-144-13-212.cust.vodafonedsl.it) (Read error: Connection reset by peer)
2020-10-17 10:02:43 <phadej> https://gist.github.com/phadej/7b95d1876dd085d28f49bf4ebf349663
2020-10-17 10:03:02 × jneira_ quits (~jneira@80.30.100.250) (Ping timeout: 256 seconds)
2020-10-17 10:03:05 <phadej> here it's unclear is "MyIntegral b1" is from 1 or 2
2020-10-17 10:03:29 taurux joins (~taurux@net-188-216-43-120.cust.vodafonedsl.it)
2020-10-17 10:03:41 jneira_ joins (~jneira@111.red-176-83-68.dynamicip.rima-tde.net)
2020-10-17 10:03:46 × ephemera_ quits (~E@122.34.1.187) (Remote host closed the connection)
2020-10-17 10:03:47 <phadej> in fact, type of plus2 is
2020-10-17 10:03:48 <phadej> plus2 :: (MyIntegral b1, MyIntegral b2) => b2 -> b1 -> b1
2020-10-17 10:03:55 <tomsmeding> yes that's a neat one
2020-10-17 10:04:19 <phadej> tomsmeding: I have to admit, I have sometimes scratched my head what's wrong in similar-ish examples
2020-10-17 10:04:26 <phadej> and had to add extra type-signatures to figure out what
2020-10-17 10:04:32 × xerox_ quits (~xerox@unaffiliated/xerox) (Quit: leaving)
2020-10-17 10:04:43 <phadej> as here. The obvious solution is to add a type-signature to plus2
2020-10-17 10:04:52 <phadej> (with better type-variables)
2020-10-17 10:05:10 <phadej> but if you open an issue you have to argue why you cannot or don't want do that in non-minimal example :)
2020-10-17 10:05:14 ephemera_ joins (~E@122.34.1.187)
2020-10-17 10:05:46 <phadej> I guess saying that "annotating every auxiliary bindingin in accelerate code isn't acceptable, adds too much noise"
2020-10-17 10:06:26 <tomsmeding> that latter statement is certainly the case
2020-10-17 10:06:33 <phadej> in my case, when there are type-variables brought into the scope by pattern matching on GADTs, it was in fact very tricky to just add a type-signatures
2020-10-17 10:06:47 × Sgeo quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
2020-10-17 10:06:58 <phadej> as one had to re-arrange code to get this type-variables
2020-10-17 10:08:36 <phadej> (https://github.com/ghc-proposals/ghc-proposals/pull/126 would solve it, but I have no idea if anyone is working on it)
2020-10-17 10:09:51 <phadej> you concinced me there is a problem worth fixing :)
2020-10-17 10:10:01 × hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection)
2020-10-17 10:10:02 <phadej> go ahead, open an issue!
2020-10-17 10:10:19 <tomsmeding> :D
2020-10-17 10:10:41 × ephemera_ quits (~E@122.34.1.187) (Ping timeout: 258 seconds)
2020-10-17 10:11:47 ephemera_ joins (~E@122.34.1.187)
2020-10-17 10:13:25 × plast1k_ quits (~plast1k_@196.207.181.246) (Ping timeout: 264 seconds)
2020-10-17 10:13:35 da39a3ee5e6b4b0d joins (~textual@n11211935170.netvigator.com)
2020-10-17 10:13:40 × cdepillabout quits (~cdepillab@pl35600.ag1001.nttpc.ne.jp) (Ping timeout: 246 seconds)
2020-10-17 10:13:49 thunderrd joins (~thunderrd@183.182.110.178)
2020-10-17 10:14:01 xerox_ joins (~xerox@unaffiliated/xerox)
2020-10-17 10:15:17 <tomsmeding> phadej: https://gitlab.haskell.org/ghc/ghc/-/issues/18860
2020-10-17 10:15:42 <tomsmeding> probably could be worded better, so if you want to re-word stuff / tell me to re-word stuff, go ahead :p

All times are in UTC.