2024-04-24 00:01:39 +0200 | acidjnk | (~acidjnk@p200300d6e714dc429de1f5b63f3ace20.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
2024-04-24 00:07:48 +0200 | xstill_1 | (xstill@fimu/xstill) |
2024-04-24 00:07:50 +0200 | xstill_ | (xstill@fimu/xstill) (Ping timeout: 268 seconds) |
2024-04-24 00:07:50 +0200 | xsarnik | (xsarnik@lounge.fi.muni.cz) (Ping timeout: 268 seconds) |
2024-04-24 00:07:51 +0200 | xstill_1 | xstill_ |
2024-04-24 00:08:06 +0200 | xsarnik | (xsarnik@lounge.fi.muni.cz) |
2024-04-24 00:09:44 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2024-04-24 00:20:03 +0200 | gmg | (~user@user/gehmehgeh) (Quit: Leaving) |
2024-04-24 00:24:34 +0200 | xal | (~xal@mx1.xal.systems) () |
2024-04-24 00:26:12 +0200 | xal | (~xal@mx1.xal.systems) |
2024-04-24 00:29:55 +0200 | philopsos | (~caecilius@user/philopsos) |
2024-04-24 00:35:27 +0200 | causal | (~eric@50.35.88.207) |
2024-04-24 00:39:05 +0200 | zzz | (~yin@user/zero) (Ping timeout: 245 seconds) |
2024-04-24 00:39:30 +0200 | yin | (~yin@user/zero) (Ping timeout: 245 seconds) |
2024-04-24 00:41:13 +0200 | zzz | (~yin@user/zero) |
2024-04-24 00:41:18 +0200 | yin | (~yin@user/zero) |
2024-04-24 00:42:01 +0200 | docelalt^ | (~cd@c-98-242-74-66.hsd1.ga.comcast.net) (Remote host closed the connection) |
2024-04-24 00:45:30 +0200 | ph88 | (~ph88@ip5b403f30.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
2024-04-24 00:47:58 +0200 | zzz | (~yin@user/zero) (Quit: leaving) |
2024-04-24 00:56:53 +0200 | oo_miguel | (~Thunderbi@78-11-181-16.static.ip.netia.com.pl) (Ping timeout: 240 seconds) |
2024-04-24 00:58:30 +0200 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2024-04-24 01:03:06 +0200 | zetef | (~quassel@5.2.182.98) (Remote host closed the connection) |
2024-04-24 01:05:51 +0200 | zetef | (~quassel@5.2.182.98) |
2024-04-24 01:15:05 +0200 | zetef | (~quassel@5.2.182.98) (Remote host closed the connection) |
2024-04-24 01:17:28 +0200 | raehik | (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) |
2024-04-24 01:19:55 +0200 | madeleine-sydney | (~madeleine@c-76-155-235-153.hsd1.co.comcast.net) (Quit: Konversation terminated!) |
2024-04-24 01:19:56 +0200 | yin | zwrv |
2024-04-24 01:32:53 +0200 | trev | (~trev@user/trev) (Ping timeout: 240 seconds) |
2024-04-24 01:35:20 +0200 | trev | (~trev@user/trev) |
2024-04-24 01:42:00 +0200 | zwrv | (~yin@user/zero) (Ping timeout: 245 seconds) |
2024-04-24 01:44:12 +0200 | zwrv | (~yin@user/zero) |
2024-04-24 01:55:26 +0200 | peterbecich | (~Thunderbi@47.229.123.186) |
2024-04-24 02:07:25 +0200 | tv | (~tv@user/tv) (Ping timeout: 245 seconds) |
2024-04-24 02:07:43 +0200 | raehik | (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 246 seconds) |
2024-04-24 02:07:48 +0200 | tv | (~tv@user/tv) |
2024-04-24 02:18:37 +0200 | sawilagar | (~sawilagar@user/sawilagar) (Ping timeout: 256 seconds) |
2024-04-24 02:21:29 +0200 | emmanuelux | (~emmanuelu@user/emmanuelux) (Quit: au revoir) |
2024-04-24 02:24:15 +0200 | peterbecich | (~Thunderbi@47.229.123.186) (Ping timeout: 272 seconds) |
2024-04-24 02:34:55 +0200 | zwrv | (~yin@user/zero) (Ping timeout: 245 seconds) |
2024-04-24 02:36:57 +0200 | zwrv | (~yin@user/zero) |
2024-04-24 02:49:42 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
2024-04-24 02:51:20 +0200 | <cheater> | i would like to make it impossible to export a type from my module and i would like to add some checking that will error out if that happens. how can i do this? |
2024-04-24 02:51:49 +0200 | <cheater> | it's a newtype |
2024-04-24 02:52:04 +0200 | <cheater> | i want it usable outside the module using only values i exported which are smart constructors |
2024-04-24 02:52:33 +0200 | <c_wraith> | You need some form of testing for "does not compile" |
2024-04-24 02:53:04 +0200 | <c_wraith> | I know of a package that tests for type errors using -fdefer-type-errors, but there's no equivalent for name errors. Which is what you're really looking for. |
2024-04-24 02:53:53 +0200 | <cheater> | it's mostly to make sure my coworkers don't do something stupid |
2024-04-24 02:54:08 +0200 | <cheater> | which, you know, given that this is an unusual way to use modules, is warranted |
2024-04-24 02:54:27 +0200 | <c_wraith> | not exporting constructors is a pretty common way to use modules... |
2024-04-24 02:54:46 +0200 | <cheater> | yes, but forbidding the exporting is a less common thing |
2024-04-24 02:55:01 +0200 | <cheater> | there isn't really a specific way to say in haskell "these things shall not be exported" |
2024-04-24 02:55:16 +0200 | <cheater> | there's only the negative statement of "these things have not been exported" |
2024-04-24 02:55:22 +0200 | <cheater> | but it's not like an active "do not export these" |
2024-04-24 02:56:16 +0200 | <c_wraith> | Oh! You can use template haskell. |
2024-04-24 02:56:26 +0200 | <cheater> | in what way |
2024-04-24 02:56:57 +0200 | <c_wraith> | > runQ [| Bin |] --> UnboundVarE Bin |
2024-04-24 02:56:58 +0200 | <lambdabot> | <hint>:1:7: error: parse error on input ‘|’ |
2024-04-24 02:57:06 +0200 | <c_wraith> | whoops, didn't mean to prefix that with > |
2024-04-24 02:57:07 +0200 | <c_wraith> | anyway |
2024-04-24 02:57:24 +0200 | <cheater> | i don't get it |
2024-04-24 02:57:29 +0200 | <cheater> | can you explain what it does? |
2024-04-24 02:57:42 +0200 | <c_wraith> | If you runQ a quote containing the name of the constructor, you will get UnboundVarE if the constructor isn't in scope |
2024-04-24 02:58:16 +0200 | ystael | (~ystael@user/ystael) (Ping timeout: 260 seconds) |
2024-04-24 02:58:17 +0200 | <cheater> | ok but how does that help me? i would have to do this in every *other* module |
2024-04-24 02:58:31 +0200 | madeleine-sydney | (~madeleine@c-76-155-235-153.hsd1.co.comcast.net) |
2024-04-24 02:58:52 +0200 | <c_wraith> | Does every other module import a different version of the module containing the hidden constructors? |
2024-04-24 02:59:58 +0200 | <c_wraith> | Someone would have to work really hard to break such a test - moving the constructors to a different module, or renaming them |
2024-04-24 03:00:12 +0200 | <c_wraith> | At that point, they should get the point that they're doing something unapproved |
2024-04-24 03:01:29 +0200 | <cheater> | i don't understand. why are you talking about different versions of module exports? |
2024-04-24 03:01:42 +0200 | <c_wraith> | why are you talking about testing in every other module? |
2024-04-24 03:01:48 +0200 | <c_wraith> | Modules have exactly one export list |
2024-04-24 03:02:00 +0200 | <c_wraith> | You test the export list, not how it's imported in other modules |
2024-04-24 03:02:12 +0200 | <cheater> | well if i have module Foo where would i put that test? |
2024-04-24 03:02:18 +0200 | <c_wraith> | In a test |
2024-04-24 03:02:21 +0200 | <cheater> | if i put it in module Foo then obviously the constructors will be there |
2024-04-24 03:02:26 +0200 | <cheater> | so what, like another module? |
2024-04-24 03:02:27 +0200 | <c_wraith> | No, of course not |
2024-04-24 03:02:34 +0200 | <c_wraith> | Some other module, like all testts |
2024-04-24 03:02:53 +0200 | <cheater> | hmm... |
2024-04-24 03:03:07 +0200 | <cheater> | makes sense |
2024-04-24 03:03:24 +0200 | <geekosaur> | if you try to put your test in the module where you're trying to prevent exports, which might be possible with some evil TH, what would stop someone from deleting your test? |
2024-04-24 03:03:31 +0200 | <geekosaur> | it belongs in the test suite |
2024-04-24 03:03:35 +0200 | zwrv | (~yin@user/zero) (Ping timeout: 264 seconds) |