Newest at the top
2024-05-13 20:19:06 +0200 | <cheater> | but what if they forget |
2024-05-13 20:18:53 +0200 | <glguy> | if they are, then just think the examples to them :) |
2024-05-13 20:18:28 +0200 | <cheater> | sometimes i wonder |
2024-05-13 20:18:11 +0200 | <glguy> | presumably those devs aren't forming a hivemend or you wouldn't be making examples in the first place |
2024-05-13 20:17:55 +0200 | <cheater> | hmm |
2024-05-13 20:17:47 +0200 | <glguy> | that's fine |
2024-05-13 20:17:39 +0200 | <cheater> | the only other users are the devs of the monorepo |
2024-05-13 20:17:10 +0200 | <glguy> | In the case the example might be useful to the users as it shows what a mess of build-deps they'll need |
2024-05-13 20:16:29 +0200 | <cheater> | the dependency graph looks like that red string meme |
2024-05-13 20:16:07 +0200 | <cheater> | very intertwined |
2024-05-13 20:16:04 +0200 | <cheater> | yeah. i'm just saying it's like, all private interface |
2024-05-13 20:15:50 +0200 | philopsos1 | (~caecilius@user/philopsos) |
2024-05-13 20:15:34 +0200 | <glguy> | that's the "public interface" from Haskell point of view |
2024-05-13 20:15:27 +0200 | <glguy> | the example should have a build-dep: with whatever the library is |
2024-05-13 20:15:25 +0200 | <cheater> | so there isn't even a public interface |
2024-05-13 20:15:09 +0200 | <cheater> | but in this case, i'm working on a massive monorepo with dozens of libs |
2024-05-13 20:14:53 +0200 | <cheater> | i see what you mean |
2024-05-13 20:14:43 +0200 | <cheater> | oh, well |
2024-05-13 20:14:12 +0200 | <glguy> | r |
2024-05-13 20:14:11 +0200 | <glguy> | and the best way to demonstrate the public interface is to be a public interface consume |
2024-05-13 20:13:57 +0200 | <glguy> | and if you don't burden consumers of the library with having to build examples |
2024-05-13 20:13:45 +0200 | <glguy> | You'll get the most out of your examples if they use the public interface to the library |
2024-05-13 20:13:20 +0200 | <cheater> | i don't mean to be overly defensive, i'm just trying to understand the different kinds of arguments for and against |
2024-05-13 20:13:19 +0200 | tremon | (~tremon@83.80.159.219) (Quit: getting boxed in) |
2024-05-13 20:12:56 +0200 | <glguy> | You don't need us to approve, you can just do whatever feels good |
2024-05-13 20:12:33 +0200 | <cheater> | idk that i agree since most haskell code is *only* documented by comments. but even then, if we follow this logic, then neither is Help.hs going to be a replacement for full documentation. |
2024-05-13 20:12:08 +0200 | waleee | (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 268 seconds) |
2024-05-13 20:11:46 +0200 | <glguy> | comments aren't a replacement for full documentation |
2024-05-13 20:11:40 +0200 | <cheater> | we don't put them in /comments/Foo.hs |
2024-05-13 20:11:33 +0200 | <cheater> | idk that it does. doc comments live right next to the function |
2024-05-13 20:10:54 +0200 | <glguy> | Since you're trying to show users how to use your library, it'll make sense for your example usage of it to be "outside" the library |
2024-05-13 20:10:20 +0200 | raehik | (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) |
2024-05-13 20:09:58 +0200 | <cheater> | i'd really prefer for Help.hs to be in the same dir as Foo.hs for which Help.hs is meant |
2024-05-13 20:09:45 +0200 | <cheater> | hmm i wouldn't like Help for a module under /src to live under /somethingelse |
2024-05-13 20:09:38 +0200 | <glguy> | set a flag that causes it to build, for example |
2024-05-13 20:09:30 +0200 | <glguy> | If you're building it in CI you'd just set up your CI environment to build it |
2024-05-13 20:09:11 +0200 | <cheater> | i do want it *built* during a normal local or CI build so that the Help module gets typechecked |
2024-05-13 20:09:05 +0200 | <glguy> | You can make it a test component of your package if it building is part of your testing process |
2024-05-13 20:08:36 +0200 | <glguy> | You might even make it buildable:False by default if it's not something a user of the library needs |
2024-05-13 20:08:29 +0200 | raehik | (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 240 seconds) |
2024-05-13 20:08:23 +0200 | <cheater> | nah it's a lib |
2024-05-13 20:08:09 +0200 | <glguy> | Is your example an executable, then you'd make an extra executable target in the cabal file |
2024-05-13 20:07:53 +0200 | <cheater> | (if any) (this sounds a little tough) |
2024-05-13 20:07:44 +0200 | <cheater> | glguy: what suggestions do you have for that? |
2024-05-13 20:07:12 +0200 | <glguy> | cheater: you'd just need to make sure that your examples didn't get compiled into the library itself. Users of the library shouldn't be including your examples |
2024-05-13 20:04:14 +0200 | <cheater> | or maybe Foo.Bar.Help |
2024-05-13 20:03:59 +0200 | <cheater> | like if i'm writing a reference impl of Foo.Bar.Baz |
2024-05-13 20:00:57 +0200 | <cheater> | [Leary]: what about putting the code right next to module Foo.Bar.Baz in something like Foo.Bar.Reference ? |
2024-05-13 19:58:18 +0200 | gentauro | (~gentauro@user/gentauro) |
2024-05-13 19:57:59 +0200 | hgolden | (~hgolden@2603:8000:9d00:3ed1:2678:8497:aa5c:7fa9) |