Logs: freenode/#haskell
| 2020-10-10 08:34:07 | × | thir quits (~thir@p200300f27f02580060eb7dde324e54c8.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 2020-10-10 08:35:45 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
| 2020-10-10 08:36:07 | → | polyrain joins (~polyrain@2001:8003:e501:6901:44df:4585:3f4:a65c) |
| 2020-10-10 08:36:14 | → | cr0ssw1nd joins (~crosswind@adsl-174.176.58.193.tellas.gr) |
| 2020-10-10 08:38:16 | × | hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-pqpthentcvdfsjfm) (Quit: Connection closed for inactivity) |
| 2020-10-10 08:38:28 | × | sw1nn quits (~sw1nn@host86-173-104-87.range86-173.btcentralplus.com) (Quit: WeeChat 2.9) |
| 2020-10-10 08:38:34 | → | GyroW_ joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) |
| 2020-10-10 08:38:34 | × | GyroW_ quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host) |
| 2020-10-10 08:38:34 | → | GyroW_ joins (~GyroW@unaffiliated/gyrow) |
| 2020-10-10 08:39:07 | × | GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 240 seconds) |
| 2020-10-10 08:39:34 | → | sw1nn joins (~sw1nn@host86-173-104-87.range86-173.btcentralplus.com) |
| 2020-10-10 08:42:26 | × | mrafiee quits (~mrafiee@84.39.117.57) (Remote host closed the connection) |
| 2020-10-10 08:43:12 | → | snakemas1 joins (~snakemast@213.100.206.23) |
| 2020-10-10 08:44:47 | → | m0rphism joins (~m0rphism@HSI-KBW-046-005-177-122.hsi8.kabel-badenwuerttemberg.de) |
| 2020-10-10 08:45:17 | × | GyroW_ quits (~GyroW@unaffiliated/gyrow) (Remote host closed the connection) |
| 2020-10-10 08:45:36 | → | GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) |
| 2020-10-10 08:45:37 | × | GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host) |
| 2020-10-10 08:45:37 | → | GyroW joins (~GyroW@unaffiliated/gyrow) |
| 2020-10-10 08:46:18 | → | coot joins (~coot@37.30.49.218.nat.umts.dynamic.t-mobile.pl) |
| 2020-10-10 08:50:08 | × | GyroW quits (~GyroW@unaffiliated/gyrow) (Remote host closed the connection) |
| 2020-10-10 08:50:26 | → | GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) |
| 2020-10-10 08:50:26 | × | GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host) |
| 2020-10-10 08:50:26 | → | GyroW joins (~GyroW@unaffiliated/gyrow) |
| 2020-10-10 08:53:16 | × | nados quits (~dan@107-190-41-58.cpe.teksavvy.com) (Quit: Leaving) |
| 2020-10-10 08:53:43 | <dminuoso> | ski: They do |
| 2020-10-10 08:53:51 | <dminuoso> | Consider: |
| 2020-10-10 08:53:57 | hackage | uniqueness-periods-vector-examples 0.12.0.0 - Usage examples for the uniqueness-periods-vector series of packages https://hackage.haskell.org/package/uniqueness-periods-vector-examples-0.12.0.0 (OleksandrZhabenko) |
| 2020-10-10 08:55:08 | <dminuoso> | % infixr 5 :*:; data l :*: r = l :*: r deriving Show; |
| 2020-10-10 08:55:09 | <yahb> | dminuoso: |
| 2020-10-10 08:55:13 | <dminuoso> | 1 :*: 2 :*: 3 |
| 2020-10-10 08:55:19 | <dminuoso> | % 1 :*: 2 :*: 3 |
| 2020-10-10 08:55:19 | <yahb> | dminuoso: 1 :*: (2 :*: 3) |
| 2020-10-10 08:55:21 | <dminuoso> | % infixl 5 :*:; data l :*: r = l :*: r deriving Show; |
| 2020-10-10 08:55:21 | <yahb> | dminuoso: |
| 2020-10-10 08:55:23 | <dminuoso> | % 1 :*: 2 :*: 3 |
| 2020-10-10 08:55:23 | <yahb> | dminuoso: (1 :*: 2) :*: 3 |
| 2020-10-10 08:55:41 | × | danso quits (~dan@107-190-41-58.cpe.teksavvy.com) (Quit: WeeChat 2.9) |
| 2020-10-10 08:56:00 | × | inerkick quits (~rohit@117.230.159.179) (Quit: Leaving) |
| 2020-10-10 08:56:34 | × | gnar^2 quits (~user@c-73-118-153-248.hsd1.wa.comcast.net) (Ping timeout: 258 seconds) |
| 2020-10-10 08:56:35 | → | fendor joins (~fendor@91.141.0.104.wireless.dyn.drei.com) |
| 2020-10-10 08:56:46 | → | alp_ joins (~alp@2a01:e0a:58b:4920:bd81:523d:128c:475c) |
| 2020-10-10 08:57:28 | <dminuoso> | "The result of show is a syntactically correct Haskell expression containing only constants, given the fixity declarations in force at the point where the type is declared. It contains only the constructor names defined in the data type, parentheses, and spaces." |
| 2020-10-10 08:57:30 | <dminuoso> | Mmm |
| 2020-10-10 08:57:47 | <dminuoso> | "If the constructor is defined to be an infix operator, then the derived Read instance will parse only infix applications of the constructor (not the prefix form)." |
| 2020-10-10 08:57:52 | <dminuoso> | (The latter one also applies to Show) |
| 2020-10-10 08:58:03 | <dminuoso> | I guess the Haskell report leaves this a bit open to interpretation |
| 2020-10-10 08:58:39 | <dminuoso> | But at the end show doesnt print your ast, which is why something like |
| 2020-10-10 08:59:24 | <dminuoso> | show (1 :*: 2 :*: 3) = 1:*: (2 :*: 3) |
| 2020-10-10 08:59:39 | <dminuoso> | (or not ast, rather cst) |
| 2020-10-10 09:00:36 | → | chaosmasttter joins (~chaosmast@p200300c4a72cce01453e6b536683ac55.dip0.t-ipconnect.de) |
| 2020-10-10 09:00:45 | × | snakemas1 quits (~snakemast@213.100.206.23) (Ping timeout: 240 seconds) |
| 2020-10-10 09:08:02 | → | is_null joins (~jpic@pdpc/supporter/professional/is-null) |
| 2020-10-10 09:14:17 | → | raichoo joins (~raichoo@dslb-188-100-004-167.188.100.pools.vodafone-ip.de) |
| 2020-10-10 09:17:04 | × | jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection) |
| 2020-10-10 09:17:28 | → | jb55 joins (~jb55@gateway/tor-sasl/jb55) |
| 2020-10-10 09:20:35 | → | shatriff joins (~vitaliish@78.111.190.16) |
| 2020-10-10 09:20:54 | <ski> | dminuoso : hm, doesn't seem to me like they do, from those examples |
| 2020-10-10 09:23:59 | <dminuoso> | ski: regarding that latter fact the haskell report is quite clear though |
| 2020-10-10 09:24:20 | <dminuoso> | "Associativity is not used to reduce the occurrence of parentheses, although precedence may be" |
| 2020-10-10 09:26:39 | <ski> | right, as i thought |
| 2020-10-10 09:27:47 | → | snakemas1 joins (~snakemast@213.100.206.23) |
| 2020-10-10 09:27:59 | <ski> | (if/when i do manual `Show' instances, i guess i do tend to take fixity/associativity into account, as well) |
| 2020-10-10 09:28:52 | × | shatriff quits (~vitaliish@78.111.190.16) (Remote host closed the connection) |
| 2020-10-10 09:29:00 | × | drbean quits (~drbean@TC210-63-209-88.static.apol.com.tw) (Ping timeout: 272 seconds) |
| 2020-10-10 09:29:18 | × | cr0ssw1nd quits (~crosswind@adsl-174.176.58.193.tellas.gr) (Ping timeout: 260 seconds) |
| 2020-10-10 09:30:06 | <dminuoso> | Sure, the haskell report has all these rules about Show/Read for deriving generated only. |
| 2020-10-10 09:30:19 | <dminuoso> | So even the `read . show = id` law doesnt matter for handwritten instances |
| 2020-10-10 09:31:25 | × | alp_ quits (~alp@2a01:e0a:58b:4920:bd81:523d:128c:475c) (Ping timeout: 272 seconds) |
| 2020-10-10 09:31:33 | <ski> | yea, i do try to ensure that :) |
| 2020-10-10 09:31:39 | <ski> | (for finite inputs) |
| 2020-10-10 09:32:43 | <dminuoso> | Ultimately I think Show is a misguided typeclass. |
| 2020-10-10 09:32:45 | × | snakemas1 quits (~snakemast@213.100.206.23) (Ping timeout: 240 seconds) |
| 2020-10-10 09:32:47 | × | knupfer quits (~Thunderbi@200116b824272b00e02273e6d9c824b5.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 2020-10-10 09:33:23 | <dminuoso> | Precisely because it has no proper laws, and with the open-world assumptions and singular instances you generally don't have a sensible obvious canonical instance for most things |
| 2020-10-10 09:33:56 | <ski> | elaborate on "open-world assumptions and singular instances" ? |
| 2020-10-10 09:34:14 | <dminuoso> | Well, so lets say you have some library with some fancy data type and you provide a Show instance. |
| 2020-10-10 09:34:38 | <dminuoso> | Why provide that Show instance at all? You can't possibly know how I need to turn that thing into a string, what formatting I want, what sort of visualizatoin |
| 2020-10-10 09:35:02 | <ski> | yea. that's for pretty-printing |
| 2020-10-10 09:35:59 | <dminuoso> | For debugging, sure. Though from experience you quickly hit concrete walls anyway, since you quickly have parametrized types with tyfams (solvable, but it adds more annoyance), or you have functions inside them |
| 2020-10-10 09:35:59 | <ski> | (i guess it might be nice with some kind of pretty-printing (within the bounds of the syntax of Haskell), could still be nice, when testing, debugging) |
| 2020-10-10 09:36:21 | <dminuoso> | Or you have some IO action inside.. things that are just not Showable |
| 2020-10-10 09:36:22 | <ski> | yea, that's a problem |
| 2020-10-10 09:36:42 | <ski> | it's not really a good candidate for serializatoin |
| 2020-10-10 09:37:47 | <dminuoso> | And for pretty printing, a typeclass is a bad fit because any instance you provide resides in the open world, so you either have a very clear canonical way of pretty printing, or you end up with a bunch of `pprFooWithColors, pprFooWithoutDetails` functions |
| 2020-10-10 09:37:58 | → | Guest18 joins (4f7755cb@gateway/web/cgi-irc/kiwiirc.com/ip.79.119.85.203) |
| 2020-10-10 09:38:56 | <ski> | mm. for something that's supposed to bring different pieces of code, possibly done by different people, together, i think only the former of those two could possibly be reasonable |
| 2020-10-10 09:40:18 | <ski> | there's also the option that perhaps we shouldn't really be constructing strings, but some kind of code representation. say `Exp' or `TExp T' |
| 2020-10-10 09:40:25 | → | dcabrejas joins (bcd609cc@188.214.9.204) |
| 2020-10-10 09:41:06 | <ski> | (this could perhaps also solve, or at least help ameliorate, the issue of having different bindings in scope, possibly qualified imports, maybe with renaming, &c.) |
| 2020-10-10 09:41:32 | × | Sgeo quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer) |
| 2020-10-10 09:41:42 | <dminuoso> | Do you mean in the sense of TH quotation? |
| 2020-10-10 09:41:51 | <ski> | yes. or something akin to that |
| 2020-10-10 09:42:08 | <ski> | a representation where identifiers know where they're bound |
| 2020-10-10 09:42:16 | <dminuoso> | At the very least with TH you have proper `id ~ antiquotation . quotation` laws. |
| 2020-10-10 09:43:06 | <ski> | the MLs don't really have `Show', from what i recall. but using a standard generic printer |
| 2020-10-10 09:43:48 | <ski> | (hm, possibly one can register a printer, for a particular type, in the interactor. seem to have a vague memory of something like that) |
| 2020-10-10 09:44:30 | <ski> | but then, how'd one handle abstract data types ? one'd like to present values, in terms of exported API |
| 2020-10-10 09:44:46 | <dminuoso> | I mean the GHC deriving generated Show instance is a standard generic printer. |
| 2020-10-10 09:44:50 | <dcabrejas> | Hi, quick question about testing with stack & quickcheck. I can run tests for my local project by "stack test", however I only have a single test file, is it possible to create multiple test files and then have them all run when running "stack test"? My single file is getting large and I would like to group related tests in different files. Thank |
| 2020-10-10 09:44:50 | <dcabrejas> | you. |
All times are in UTC.