Newest at the top
2025-07-31 14:55:13 +0200 | <__monty__> | Reality2point0: It's just kind of a weird thing to want. Why not the same for List and String? |
2025-07-31 14:55:07 +0200 | <jreicher> | kuribas: I don't think "dynamic typechecking" actually exists. When a runtime for a dynamic language is "consulting" the type, it's not performing a check. |
2025-07-31 14:54:58 +0200 | <Reality2point0> | kuribas: Okay, the indentation syntax should only be allowed for the syntax where you name each field. So you are right, it depends on the `::`. But there’s actually no reason to not allow `data Foo = Foo\n Int`. I don’t think mixing both syntaxes would be necessary though. |
2025-07-31 14:53:03 +0200 | <Reality2point0> | lortabac: Well, of course it is extremely complex when it has two separate parsers and syntaxes wher it only needs one. :D |
2025-07-31 14:52:28 +0200 | <Reality2point0> | lortabac: :D I’d use a visual representation of category theory. But with pure keyboard input, so it still looks like a movie hacker when I code. :D |
2025-07-31 14:52:10 +0200 | xff0x | (~xff0x@2405:6580:b080:900:d00e:8764:de20:d052) |
2025-07-31 14:51:59 +0200 | <lortabac> | the GHC parser is already **extremely** complex, introducing yet another special case makes me very uncomfortable, even if it turns out to be straightforward |
2025-07-31 14:51:49 +0200 | <kuribas> | Int could be on a new line. |
2025-07-31 14:51:44 +0200 | <kuribas> | data Foo = Foo Int |
2025-07-31 14:50:55 +0200 | <Reality2point0> | kuribas: Hmm, is there valid syntax for what goes inside `data` that doesn’t use a `::`? |
2025-07-31 14:50:24 +0200 | tromp | (~textual@2001:1c00:3487:1b00:b928:de3f:1dfd:983a) |
2025-07-31 14:50:10 +0200 | <lortabac> | I have no idea. Personally I'd be fine with s-expressions as the universal syntax for all languages :) |
2025-07-31 14:49:57 +0200 | <kuribas> | But it would depend on the presence of "::". |
2025-07-31 14:49:00 +0200 | <Reality2point0> | *declaration |
2025-07-31 14:48:54 +0200 | <Reality2point0> | Well, if a line starts with `data `, it’s gonna be a data declatation. If the lines below it are indented, they go into that. Seems very straightforward for me. Am I missing something? |
2025-07-31 14:47:34 +0200 | <lortabac> | actually it may be doable without ambiguity for type declarations, but for record construction/matching it looks harder |
2025-07-31 14:47:26 +0200 | Reality2point0 | (~Reality2p@2a02:3035:665:a078:7ac6:f05a:b961:839e) |
2025-07-31 14:45:40 +0200 | <kuribas> | And also, record syntax is easy to recognize now. If you introduce the indataion rule for it, it would not be. |
2025-07-31 14:44:36 +0200 | Reality2point0 | (~Reality2p@2a02:3035:665:a078:7ac6:f05a:b961:839e) (Quit: Client closed) |
2025-07-31 14:44:13 +0200 | caubert | (~caubert@user/caubert) (Ping timeout: 276 seconds) |
2025-07-31 14:43:11 +0200 | <kuribas> | Being a major effort to introduce, and little actual gain. |
2025-07-31 14:42:55 +0200 | <kuribas> | Well, introducing a lot of ambiguity I'd think. |
2025-07-31 14:42:13 +0200 | LainIwakura | (~LainIwaku@user/LainIwakura) (Ping timeout: 272 seconds) |
2025-07-31 14:41:46 +0200 | <Reality2point0> | I mean I can write my own preprocessor that gives me that. So of course GHC can. Or is there a catch that I’m not seeing? |
2025-07-31 14:41:28 +0200 | notzmv | (~umar@user/notzmv) notzmv |
2025-07-31 14:41:18 +0200 | <Reality2point0> | Then that is what should be changed. |
2025-07-31 14:41:07 +0200 | <kuribas> | It just shares the brace. |
2025-07-31 14:41:00 +0200 | <kuribas> | Reality2point0: Because record syntax has nothing to do with indentation rule. |
2025-07-31 14:40:04 +0200 | <Reality2point0> | kuribas: Why? |
2025-07-31 14:39:56 +0200 | <Reality2point0> | I want you to know that #haskell was always an exceptionally nice channel, and I hope this is still the case. |
2025-07-31 14:39:53 +0200 | <kuribas> | Reality2point0: You could make a change request for that syntax, but it has 0 chance to succeed. |
2025-07-31 14:39:15 +0200 | <Reality2point0> | 😂 |
2025-07-31 14:39:15 +0200 | Frostillicus | (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) |
2025-07-31 14:39:05 +0200 | <kuribas> | no :) |
2025-07-31 14:38:44 +0200 | <Reality2point0> | I get it, I want you to be less condescending,and that’s not happening either, right? :P |
2025-07-31 14:38:10 +0200 | <kuribas> | I want to be rich. |
2025-07-31 14:37:55 +0200 | <Reality2point0> | Exactly. I want this to be legal. |
2025-07-31 14:37:43 +0200 | <kuribas> | no |
2025-07-31 14:36:49 +0200 | <Reality2point0> | Is that legal? |
2025-07-31 14:36:32 +0200 | <Reality2point0> | kuribas: Maybe look at this instead: https://pastebin.com/FMwBMt0U |
2025-07-31 14:36:20 +0200 | <Reality2point0> | kuribas: Uuum, the latter way, how I wish I could write it… That’s not legal Haskell, is it? |
2025-07-31 14:33:07 +0200 | <kuribas> | it's the same for defining as for destructuring. |
2025-07-31 14:32:57 +0200 | <kuribas> | Reality2point0: That's record syntax, as __monty__ says. |
2025-07-31 14:31:11 +0200 | <dutchie> | no, you'd need to use a pastebin site for anything of any length |
2025-07-31 14:30:39 +0200 | <Reality2point0> | (IRC doesn’t support line breaks, does it?) |
2025-07-31 14:30:19 +0200 | <Reality2point0> | __monty__: I mean for *defining* a data type. Like this: `data MyData = MyData { getA :: A, getB :: B }` I wish I could write that like this: `data MyData = MyData\n getA :: A\n getB :: B\n` |
2025-07-31 14:24:19 +0200 | Frostillicus | (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 260 seconds) |
2025-07-31 14:21:55 +0200 | <__monty__> | The context-free grammar in the 2010 report confirms I didn't imagine it, IIUC. |
2025-07-31 14:21:02 +0200 | <__monty__> | Reality2point0: I think you're conflating { ...; ... } (blocks) with { ..., ...} (records). |
2025-07-31 14:20:01 +0200 | <Reality2point0> | Hi. I noticed that data definitions are the only ones that don’t use indentation syntax, and rely on curly braces by default. Is there some extension I can enable to just write data record definitions by indenting and no curly braces? |