Logs: liberachat/#haskell
| 2025-11-24 12:53:08 | × | hakutaku quits (~textual@chen.yukari.eu.org) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2025-11-24 12:56:11 | <younder> | https://paste.tomsmeding.com/LhOsIzUc |
| 2025-11-24 13:01:41 | × | trickard quits (~trickard@cpe-92-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-11-24 13:01:55 | → | trickard_ joins (~trickard@cpe-92-98-47-163.wireline.com.au) |
| 2025-11-24 13:22:31 | × | fp quits (~Thunderbi@2001:708:20:1406::10c5) (Ping timeout: 264 seconds) |
| 2025-11-24 13:23:29 | → | ttybitnik joins (~ttybitnik@user/wolper) |
| 2025-11-24 13:29:43 | → | fp joins (~Thunderbi@130.233.70.108) |
| 2025-11-24 13:36:15 | × | fp quits (~Thunderbi@130.233.70.108) (Ping timeout: 240 seconds) |
| 2025-11-24 13:38:33 | → | fp joins (~Thunderbi@wireless-86-50-141-141.open.aalto.fi) |
| 2025-11-24 13:47:30 | → | Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) |
| 2025-11-24 13:50:11 | → | gorignak joins (~gorignak@user/gorignak) |
| 2025-11-24 14:02:59 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 260 seconds) |
| 2025-11-24 14:03:53 | → | merijn joins (~merijn@77.242.116.146) |
| 2025-11-24 14:11:25 | trickard_ | is now known as trickard |
| 2025-11-24 14:25:21 | × | Googulator49 quits (~Googulato@2a01-036d-0106-01f1-f56c-45b8-e3c8-fdbd.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-24 14:26:31 | → | Googulator joins (~Googulato@2a01-036d-0106-01f1-f56c-45b8-e3c8-fdbd.pool6.digikabel.hu) |
| 2025-11-24 14:30:05 | × | turlando quits (~turlando@user/turlando) (Ping timeout: 250 seconds) |
| 2025-11-24 14:30:06 | → | turlando_ joins (~turlando@user/turlando) |
| 2025-11-24 14:31:20 | → | sindu joins (~sindu@2.148.32.207.tmi.telenormobil.no) |
| 2025-11-24 14:41:07 | → | ystael joins (~ystael@user/ystael) |
| 2025-11-24 14:43:09 | <kuribas> | Why do I get "Failed to find a HLS version for GHC 8.10.7" |
| 2025-11-24 14:43:19 | <kuribas> | In emacs-lsp |
| 2025-11-24 14:43:28 | <kuribas> | It works in another project. |
| 2025-11-24 14:44:24 | <haskellbridge> | <Morj> Did you rule out the obvious problems with PATH already, it picking up a different version of hls and/or ghc? |
| 2025-11-24 14:44:55 | <kuribas> | But path is the same in both projects? |
| 2025-11-24 14:45:41 | <haskellbridge> | <Morj> It might be modified by nix, direnv or your lsp plugin |
| 2025-11-24 14:46:12 | <kuribas> | hmm, there is a .stack-work with ghc-8.10.7 |
| 2025-11-24 14:46:16 | <haskellbridge> | <Morj> Sorry, I'm not familiar with emacs, so I'm doing first-line help advice here |
| 2025-11-24 14:46:38 | <kuribas> | Ah, I think stack is fixing this ghc... |
| 2025-11-24 14:47:21 | <haskellbridge> | <Morj> I prefer to always set system-ghc: true in stack to prevent that |
| 2025-11-24 14:47:52 | <haskellbridge> | <Morj> Some time ago stack also added ghcup integration instead of using its own packages, but I'm not sure how it works |
| 2025-11-24 14:48:08 | <kuribas> | hmm, I can try that |
| 2025-11-24 14:49:11 | × | ttybitnik quits (~ttybitnik@user/wolper) (Remote host closed the connection) |
| 2025-11-24 14:49:29 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection) |
| 2025-11-24 14:49:48 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 2025-11-24 14:52:25 | × | fp quits (~Thunderbi@wireless-86-50-141-141.open.aalto.fi) (Remote host closed the connection) |
| 2025-11-24 14:53:39 | <kuribas> | ok, it works now. |
| 2025-11-24 14:54:16 | <kuribas> | If I do map (\(x:xs) -> ...) $ groupBy .., how do I avoid the exhaustive error? |
| 2025-11-24 14:54:28 | <kuribas> | Empty list is impossible here. |
| 2025-11-24 14:54:34 | <kuribas> | well, warning. |
| 2025-11-24 14:55:49 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 2025-11-24 14:59:34 | <geekosaur> | best you can do is -Wno-incomplete-uni-patterns, I think |
| 2025-11-24 14:59:45 | <geekosaur> | since there's no way to add the other case even if it mattered |
| 2025-11-24 14:59:48 | <kuribas> | It's nice to have, but not here. |
| 2025-11-24 14:59:48 | × | weary-traveler quits (~user@user/user363627) (Quit: Konversation terminated!) |
| 2025-11-24 14:59:55 | <haskellbridge> | <Morj> 1. Refactor all your code to put NonEmpty there ;-) |
| 2025-11-24 14:59:57 | <kuribas> | well, lambdacase |
| 2025-11-24 15:00:04 | → | weary-traveler joins (~user@user/user363627) |
| 2025-11-24 15:00:19 | <Leary> | kuribas: Use `Data.List.NonEmpty.groupBy`. |
| 2025-11-24 15:00:23 | <geekosaur> | (this is why uni-patterns is a separate warning) |
| 2025-11-24 15:01:01 | <haskellbridge> | <Morj> 2. You can use a partial function like "fromJust . uncons" |
| 2025-11-24 15:01:04 | <geekosaur> | well, yes, if you can use NonEmoty then it's not a problem. but I find NonEmpty somewhat annoying and sometimes a bit expensive since it's adding constructors that are pointless at runtime |
| 2025-11-24 15:01:55 | <geekosaur> | imo NonEmpty isn't a solution, it's an ugly hack around Haskell missing that aspect of dependent types |
| 2025-11-24 15:02:08 | <Leary> | `x:|xs` has no more constructors/expense than `x:xs`. |
| 2025-11-24 15:02:22 | → | fp joins (~Thunderbi@130.233.70.108) |
| 2025-11-24 15:02:35 | <Leary> | It's not a solution to every non-empty list problem, but it /is/ a solution to giving `groupBy` a good signature. |
| 2025-11-24 15:02:44 | × | fp quits (~Thunderbi@130.233.70.108) (Read error: Connection reset by peer) |
| 2025-11-24 15:03:34 | <haskellbridge> | <Morj> I find that NonEmpty is fine when you're inside the ecosystem that's more abstract over it's data types. A lot of functions take a list instead of a traversable. I find the pain slightly smaller with mono-traversable and everything that uses it |
| 2025-11-24 15:03:46 | <kuribas> | groupBy in idris uses List1 |
| 2025-11-24 15:04:50 | × | CiaoSen quits (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 256 seconds) |
| 2025-11-24 15:05:36 | <geekosaur> | well, there's also that the case where I personally run into this "correctly" should be solved in xmonad core… by breaking the API of a central structure that's been fixed since at least 0.2 |
| 2025-11-24 15:06:14 | <geekosaur> | and is so core that pretty much everything in both core and contrib would have to be modified |
| 2025-11-24 15:08:44 | × | gustrb quits (~gustrb@user/gustrb) (Read error: Connection reset by peer) |
| 2025-11-24 15:08:55 | × | Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 255 seconds) |
| 2025-11-24 15:09:34 | → | gustrb joins (~gustrb@user/gustrb) |
| 2025-11-24 15:10:31 | → | fp joins (~Thunderbi@2001:708:20:1406::1370) |
| 2025-11-24 15:10:36 | <kuribas> | groupBy should have been forall a. (a -> a -> a) -> [a] -> [(a, [a])] |
| 2025-11-24 15:11:24 | <kuribas> | ah, that's basically NonEmpty... |
| 2025-11-24 15:11:38 | <kuribas> | Maybe a bit less heavy on dependencies. |
| 2025-11-24 15:13:48 | → | Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) |
| 2025-11-24 15:20:21 | <monochrom> | Data.List.Nonempty exports a groupBy :: Foldable f => (a -> a -> Bool) -> f a -> [NonEmpty a] |
| 2025-11-24 15:20:44 | <kuribas> | right :) |
| 2025-11-24 15:20:56 | <monochrom> | Since the input is any Foldable, you can still give it a normal list. |
| 2025-11-24 15:21:57 | × | fp quits (~Thunderbi@2001:708:20:1406::1370) (Quit: fp) |
| 2025-11-24 15:24:05 | <monochrom> | "How groupBy Should Have Ended" |
| 2025-11-24 15:24:53 | <monochrom> | "But this is how groupBy should really have ended: Foldable f => (r :: a -> a -> Bool) -> (proof that r is really an equivalence relation) -> f a -> [NonEmpty a]" >:) |
| 2025-11-24 15:26:28 | <kuribas> | I usually use groupBy ((==) `on` f) ... |
| 2025-11-24 15:26:43 | × | Frostillicus quits (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 246 seconds) |
| 2025-11-24 15:27:11 | <kuribas> | ah, that's groupWith... |
| 2025-11-24 15:27:23 | <monochrom> | Nice. |
| 2025-11-24 15:28:08 | <kuribas> | Even in idris Eq doesn't come with proofs... |
| 2025-11-24 15:30:10 | → | fp joins (~Thunderbi@2001:708:20:1406::1370) |
| 2025-11-24 15:30:26 | → | Frostillicus joins (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) |
| 2025-11-24 15:30:30 | <Leary> | One of the reasons for `*By` functions is because you don't always want to be restricted by the laws associated with `Eq`/`Ord`. Ideally `groupBy` would be rewritten to group /related chains/, then it would make perfect sense regardless of transitivity. |
| 2025-11-24 15:31:30 | <monochrom> | I think it already does that. |
| 2025-11-24 15:31:58 | <Leary> | No, it collects elements related to the first following each break. |
| 2025-11-24 15:32:17 | <monochrom> | Ah, that. |
| 2025-11-24 15:36:14 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 2025-11-24 15:37:38 | × | gmg quits (~user@user/gehmehgeh) (Ping timeout: 272 seconds) |
| 2025-11-24 15:48:37 | × | infinity0 quits (~infinity0@pwned.gg) (Remote host closed the connection) |
| 2025-11-24 15:53:56 | → | infinity0 joins (~infinity0@pwned.gg) |
| 2025-11-24 15:55:06 | → | hakutaku joins (~textual@chen.yukari.eu.org) |
| 2025-11-24 15:56:04 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 2025-11-24 15:56:27 | × | annamalai quits (~annamalai@157.32.136.68) (Read error: Connection reset by peer) |
| 2025-11-24 15:56:47 | → | annamalai joins (~annamalai@157.32.136.68) |
| 2025-11-24 15:58:11 | → | humasect joins (~humasect@dyn-192-249-132-90.nexicom.net) |
| 2025-11-24 16:02:35 | × | humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Ping timeout: 240 seconds) |
| 2025-11-24 16:10:42 | × | Googulator quits (~Googulato@2a01-036d-0106-01f1-f56c-45b8-e3c8-fdbd.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-24 16:10:47 | → | Googulator40 joins (~Googulato@2a01-036d-0106-01f1-f56c-45b8-e3c8-fdbd.pool6.digikabel.hu) |
| 2025-11-24 16:14:06 | × | fp quits (~Thunderbi@2001:708:20:1406::1370) (Ping timeout: 252 seconds) |
All times are in UTC.