Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,312 events total
2021-08-22 20:13:27 × fendor_ quits (~fendor@91.141.64.241.wireless.dyn.drei.com) (Remote host closed the connection)
2021-08-22 20:16:59 azeem joins (~azeem@176.200.243.28)
2021-08-22 20:23:46 × azeem quits (~azeem@176.200.243.28) (Ping timeout: 252 seconds)
2021-08-22 20:25:52 × benin036932 quits (~benin@183.82.178.142) (Ping timeout: 250 seconds)
2021-08-22 20:28:11 azeem joins (~azeem@176.200.243.28)
2021-08-22 20:31:14 × Xnuk quits (~xnuk@vultr.xnu.kr) (Quit: ZNC - https://znc.in)
2021-08-22 20:35:35 Xnuk joins (~xnuk@45.76.202.58)
2021-08-22 20:35:36 × Xnuk quits (~xnuk@45.76.202.58) (Remote host closed the connection)
2021-08-22 20:36:25 × azeem quits (~azeem@176.200.243.28) (Ping timeout: 252 seconds)
2021-08-22 20:37:58 azeem joins (~azeem@176.200.243.28)
2021-08-22 20:40:19 junkicide joins (~user@2a01cb0001f4f500f106e9e16d7acd2d.ipv6.abo.wanadoo.fr)
2021-08-22 20:40:52 <junkicide> what is wrong with the following version of the "all" function?
2021-08-22 20:40:55 <junkicide> all' :: (a -> Bool) -> [a]-> Bool
2021-08-22 20:40:55 <junkicide> all' f l = foldl (\x y -> f $ x) True l
2021-08-22 20:41:19 <junkicide> error: …
2021-08-22 20:41:19 <junkicide> • Couldn't match expected type ‘a’ with actual type ‘Bool’
2021-08-22 20:41:19 <junkicide> ‘a’ is a rigid type variable bound by
2021-08-22 20:41:19 <junkicide> the type signature for:
2021-08-22 20:41:22 <junkicide> all' :: forall a. (a -> Bool) -> [a] -> Bool
2021-08-22 20:41:25 <junkicide> at /home/akulkarni/haskell/hutton/chp7.hs:5:1-33
2021-08-22 20:41:28 <junkicide> • In the expression: f $ x
2021-08-22 20:41:32 <junkicide> In the first argument of ‘foldl’, namely ‘(\ x y -> f $ x)’
2021-08-22 20:41:35 <junkicide> In the expression: foldl (\ x y -> f $ x) True l
2021-08-22 20:41:36 <c_wraith> well, I'd argue that you never use y in the lambda is a big problem
2021-08-22 20:41:39 <dsal> Too much paste
2021-08-22 20:41:51 <junkicide> dsal: sorry about that
2021-08-22 20:42:18 <dsal> But yes, I don't understand what you're trying to do with that lambda
2021-08-22 20:42:57 × azeem quits (~azeem@176.200.243.28) (Ping timeout: 268 seconds)
2021-08-22 20:43:46 <dsal> One thing you might consider is naming those parameters better.
2021-08-22 20:45:00 acidjnk joins (~acidjnk@p200300d0c72b9558d9d86757fde39a6c.dip0.t-ipconnect.de)
2021-08-22 20:45:06 azeem joins (~azeem@176.200.243.28)
2021-08-22 20:45:08 <junkicide> ah I see the problem now
2021-08-22 20:45:37 <junkicide> thanks
2021-08-22 20:46:25 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 248 seconds)
2021-08-22 20:48:41 × reumeth quits (~reumeth@user/reumeth) (Ping timeout: 258 seconds)
2021-08-22 20:49:26 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:fc6b:7277:c769:1dab) (Remote host closed the connection)
2021-08-22 20:50:10 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:fc6b:7277:c769:1dab)
2021-08-22 20:50:23 Xnuk joins (~xnuk@45.76.202.58)
2021-08-22 20:53:55 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2021-08-22 20:54:19 jpds joins (~jpds@gateway/tor-sasl/jpds)
2021-08-22 20:54:40 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:fc6b:7277:c769:1dab) (Ping timeout: 240 seconds)
2021-08-22 20:55:46 × azeem quits (~azeem@176.200.243.28) (Ping timeout: 250 seconds)
2021-08-22 20:56:34 hseg joins (~gesh@IGLD-84-228-238-79.inter.net.il)
2021-08-22 20:57:05 azeem joins (~azeem@176.200.243.28)
2021-08-22 20:57:05 × mestre quits (~mestre@191.177.175.57) (Quit: Lost terminal)
2021-08-22 20:57:59 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
2021-08-22 20:58:45 <hseg> Hi. am getting spooky type errors at a distance. consider the following (ill-formed) program: http://ix.io/3wGQ. ofc, GHC should complain about applying a type to a fully-saturated type. Instead, GHC complains it can't reduce any type family in my program
2021-08-22 20:59:40 <dminuoso> hseg: What's the exact error message?
2021-08-22 21:00:42 <hseg> so am getting the expected "Cannot apply expression of type ‘Bool’ to a visible type argument ‘Ord’" message
2021-08-22 21:01:28 <hseg> but it's buried under a bunch of "Could not match type Sorted NonEmpty with SortedNE" messages, which go away if I delete that offending bit of codee
2021-08-22 21:01:41 <hseg> which, note, has exactly nothing to do with my Sorted type family
2021-08-22 21:02:45 <dminuoso> This error message looks to be expected.
2021-08-22 21:02:46 <hseg> Am similarly getting errors that "Couldn't match type: Item (Map String Int) with: (String, b0) The type 'b0' is ambiguous"
2021-08-22 21:02:48 <dminuoso> Why do you think it shouldnt be there?
2021-08-22 21:03:00 <hseg> the error message itself is not the problem
2021-08-22 21:03:16 <hseg> it's that it causes _other, unrelated_ parts of the code to error
2021-08-22 21:04:44 <dminuoso> hseg: Is this `h` top level binding in your original code?
2021-08-22 21:04:44 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:fc6b:7277:c769:1dab)
2021-08-22 21:04:48 <hseg> yes
2021-08-22 21:05:10 <dminuoso> I see. So if you replaced the definifion of `h` with undefined, these tyfam errors go away?
2021-08-22 21:05:16 <hseg> yup
2021-08-22 21:05:28 <dminuoso> Sounds ripe for a bug report then
2021-08-22 21:05:32 <hseg> same if I remove the @Ord type application
2021-08-22 21:05:55 <maerwald> blergh... who likes word shifting? :D
2021-08-22 21:05:59 <hseg> I only get a "could not deduce c (First a) from context c a" error, as expected
2021-08-22 21:06:22 <dminuoso> hseg: Possibly related, but...
2021-08-22 21:06:25 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
2021-08-22 21:06:32 <dminuoso> hseg: What if you provide a well typed definition for it?
2021-08-22 21:06:34 <maerwald> https://hackage.haskell.org/package/bytestring-0.11.1.0/docs/src/Data.ByteString.html#breakSubstring -- trying to figure out how to make this work with Word16
2021-08-22 21:06:44 <dminuoso> GHC sometimes bails out earlier or later, depending on the type error.
2021-08-22 21:07:59 <maerwald> or you could argue this function isn't defined for Word16 bytestream
2021-08-22 21:08:05 <maerwald> I'm not sure
2021-08-22 21:08:06 <hseg> yeah, am having trouble getting the right permutation to trip ghc up
2021-08-22 21:09:02 <dminuoso> hseg: I think Ive observed GHC sometimes provide a different set of "visible" type errors before. Are the tyfam errors you saw legit?
2021-08-22 21:09:11 <hseg> nope
2021-08-22 21:09:16 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
2021-08-22 21:09:22 <hseg> as I mentioned, if I delete h, ghc compiles clean
2021-08-22 21:09:25 <dminuoso> So if you provide a well-typed definition for `h`, the entire module compiles?
2021-08-22 21:09:27 <dminuoso> Uh
2021-08-22 21:09:30 <dminuoso> Okay, then go file a bug report.
2021-08-22 21:09:32 lavaman joins (~lavaman@98.38.249.169)
2021-08-22 21:09:37 <dminuoso> Do you have any type checker plugins?
2021-08-22 21:09:38 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
2021-08-22 21:09:54 <hseg> no plugins, but quite a few extensions
2021-08-22 21:10:12 <hseg> trying to reeduce to mwe
2021-08-22 21:11:14 <dminuoso> Which GHC version is this with?
2021-08-22 21:11:29 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Remote host closed the connection)
2021-08-22 21:11:49 <hseg> 9.0.1
2021-08-22 21:11:55 × fresheyeball quits (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9)
2021-08-22 21:12:23 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
2021-08-22 21:12:40 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
2021-08-22 21:14:36 markpythonicbtc joins (~textual@2601:647:5a00:35:d936:f2de:ef6:f0f4)
2021-08-22 21:15:49 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
2021-08-22 21:16:19 <dminuoso> hseg: can you provide the full error message with the tyfams you are getting?
2021-08-22 21:16:34 <hseg> a moment, trying to get a mwe
2021-08-22 21:18:27 venue joins (~venue@user/venue)
2021-08-22 21:18:41 roboguy_ joins (~roboguy_@2605:a601:afe7:9f00:2d0e:8bc:c41d:5a84)
2021-08-22 21:19:23 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
2021-08-22 21:19:29 <hseg> ok, reproduced, minimizing
2021-08-22 21:22:26 <hseg> hrm. somehow ANN pragmas are involved?

All times are in UTC.