Newest at the top
| 2025-12-23 19:51:22 +0100 | <monochrom> | <-- uses dad jokes for meaningful names :) |
| 2025-12-23 19:51:18 +0100 | <hololeap> | sure thing |
| 2025-12-23 19:50:56 +0100 | <monochrom> | May I call it Applicable instead? >:) |
| 2025-12-23 19:50:44 +0100 | <hololeap> | which Map is a perfect example of |
| 2025-12-23 19:50:34 +0100 | <monochrom> | Ah thanks. |
| 2025-12-23 19:50:26 +0100 | <hololeap> | it's Applicative sans `pure` |
| 2025-12-23 19:50:15 +0100 | <monochrom> | What is Apply? |
| 2025-12-23 19:49:59 +0100 | <hololeap> | not the most illuminating example :) |
| 2025-12-23 19:49:50 +0100 | <hololeap> | traverse1 (\(x,y) -> Map.singleton x y) :: NonEmpty (x,y) -> Map x (NonEmpty y) |
| 2025-12-23 19:49:04 +0100 | <hololeap> | int-e: I think it would be even more useful if they brought Traversable1 and Apply into base. it lets you traverse _into_ (as oppsed to over) Maps |
| 2025-12-23 19:48:49 +0100 | <monochrom> | (hehe) |
| 2025-12-23 19:48:43 +0100 | <monochrom> | Oh missed a pun opportunity! Here: Please don't bring in Prolog list syntax. :| |
| 2025-12-23 19:47:27 +0100 | gentauro | (~gentauro@user/gentauro) gentauro |
| 2025-12-23 19:47:06 +0100 | <geekosaur> | I'd consider keeping the `:|` |
| 2025-12-23 19:46:56 +0100 | <geekosaur> | it'll also potentially conflict with quasiquotations |
| 2025-12-23 19:46:55 +0100 | <monochrom> | Please don't bring in Prolog list syntax. :( |
| 2025-12-23 19:46:42 +0100 | <int-e> | it keeps surprising me that people find the NonEmpty overhead worthwhile |
| 2025-12-23 19:45:43 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2025-12-23 19:44:52 +0100 | <hololeap> | it's trying to process it as a list comprehension |
| 2025-12-23 19:44:42 +0100 | <hololeap> | Could not deduce ‘Num Bool’ arising from the literal ‘2’ |
| 2025-12-23 19:44:34 +0100 | <hololeap> | ghci> [1 | 2, 3] |
| 2025-12-23 19:44:24 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds) |
| 2025-12-23 19:43:44 +0100 | Pozyomka | (~pyon@user/pyon) pyon |
| 2025-12-23 19:43:34 +0100 | <hololeap> | but [1 | 2, 3] in theory makes sense, but it might overlap with list comprehension syntax |
| 2025-12-23 19:43:05 +0100 | gentauro | (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
| 2025-12-23 19:41:32 +0100 | <hololeap> | esp for tests and things where you control the input |
| 2025-12-23 19:41:13 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2025-12-23 19:40:46 +0100 | <hololeap> | also, I have no shame in throwing a `NonEmpty.fromList [1, 2, 3]` into my code |
| 2025-12-23 19:40:46 +0100 | <haskellbridge> | <loonycyborg> Yes, I think if syntax is shared then there's more potential for ambiguity |
| 2025-12-23 19:39:34 +0100 | <hololeap> | but I might be wrong on the details |
| 2025-12-23 19:39:25 +0100 | <hololeap> | and you have to be careful not to give it [] or else you get a runtime error |
| 2025-12-23 19:39:12 +0100 | Pixi | (~Pixi@user/pixi) Pixi |
| 2025-12-23 19:38:56 +0100 | <hololeap> | but it shares the same syntax with list [1, 2, 3] |
| 2025-12-23 19:38:30 +0100 | <hololeap> | I _think_ you can already do that with OverloadedLists |
| 2025-12-23 19:38:08 +0100 | target_i | (~target_i@user/target-i/x-6023099) target_i |
| 2025-12-23 19:38:08 +0100 | <haskellbridge> | <loonycyborg> Were there any proposals to make NonEmpty a builtin list so you could write [1 | 2, 3] instead of 1 :| [2,3]? |
| 2025-12-23 19:34:11 +0100 | <haskellbridge> | <loonycyborg> ye Foldable1 requires at least 1 item to work with because it has no starting accumulator so it's connected to NonEmpty. |
| 2025-12-23 19:33:45 +0100 | <hololeap> | I missed the discussion where Foldable1 was added to base and why some of the other things from semigroupoids were left out |
| 2025-12-23 19:33:43 +0100 | ttybitnik | (~ttybitnik@user/wolper) (Quit: Fading out...) |
| 2025-12-23 19:33:16 +0100 | <hololeap> | I do think that Traversable1 is more useful https://hackage.haskell.org/package/semigroupoids-6.0.1/docs/Data-Semigroup-Traversable.html |
| 2025-12-23 19:31:42 +0100 | <hololeap> | the fact that toNonEmpty is part of Foldable1 sort of proves that NonEmpty is the canonical Foldable1 |
| 2025-12-23 19:31:03 +0100 | Pixi | (~Pixi@user/pixi) (Quit: Leaving) |
| 2025-12-23 19:30:44 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
| 2025-12-23 19:30:40 +0100 | <hololeap> | with a NonEmpty, you don't have to worry about the case of an empty list, thus you don't need a definition for mempty and can use any Semigroup instead |
| 2025-12-23 19:28:52 +0100 | <haskellbridge> | <loonycyborg> hmm nwm, it seems to be actually Foldable. But I vaguely remember some use of Foldable1 being related to NonEmpty. |
| 2025-12-23 19:28:46 +0100 | LaurentH | (~LaurentH@e7-72-0-245-18.dynamic.sthy.maskatel.ca) () |
| 2025-12-23 19:28:41 +0100 | <hololeap> | it's just that foldMap for NonEmpty carries a Monoid constraint, when Semigroup would be enough |
| 2025-12-23 19:27:56 +0100 | <hololeap> | NonEmpty is Foldable though |
| 2025-12-23 19:26:23 +0100 | <haskellbridge> | <loonycyborg> NonEmpty for example is Foldable1 but not Foldable, so Foldable1 is pretty necessary given the push to use NonEmpty to avoid partial functions. |
| 2025-12-23 19:25:26 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |