Newest at the top
2024-05-14 13:05:52 +0200 | <just_started_has> | i just quit and startedd , yes it does give an error |
2024-05-14 13:05:07 +0200 | <ncf> | how are you starting ghci? if you run `ghci main.hs` you should get a nice helpful error about `test` lacking an accompanying binding |
2024-05-14 13:03:47 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2024-05-14 13:03:43 +0200 | <just_started_has> | https://drive.google.com/file/d/1yTimzu4dD3rL4GZKVTsXlJEDbaU4tXvO/view?usp=drive_link |
2024-05-14 13:02:35 +0200 | tcard | (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) |
2024-05-14 13:02:15 +0200 | tcard | (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Remote host closed the connection) |
2024-05-14 13:01:36 +0200 | <just_started_has> | one second |
2024-05-14 13:01:19 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 268 seconds) |
2024-05-14 12:59:48 +0200 | <int-e> | Or, well, tries to. |
2024-05-14 12:59:39 +0200 | <int-e> | `ghci main.hs` doesn't execute main.hs as a script. It loads it as a Haskell module. |
2024-05-14 12:58:23 +0200 | <cheater> | show us a screenshot of your terminal |
2024-05-14 12:58:08 +0200 | <int-e> | You can't have just the type signature in a module; you have to have an accompanying definition. |
2024-05-14 12:57:14 +0200 | <just_started_has> | the doc says variable not in scope only happens when it is not declared but it is |
2024-05-14 12:56:41 +0200 | <just_started_has> | i started haskell 4 hours ago , please forgive this noob question if it is |
2024-05-14 12:56:41 +0200 | <just_started_has> | why is that , |
2024-05-14 12:56:40 +0200 | <just_started_has> | it says Variable not in scope |
2024-05-14 12:56:40 +0200 | <just_started_has> | then write test in the ghci of main.hs |
2024-05-14 12:56:39 +0200 | <just_started_has> | in main.hs |
2024-05-14 12:56:39 +0200 | <just_started_has> | i write test :: [Int] -> [Int] |
2024-05-14 12:56:21 +0200 | <just_started_has> | hello |
2024-05-14 12:56:16 +0200 | just_started_has | (~just_star@2401:4900:1cc9:315f:ac5a:52e5:ce3f:eca3) |
2024-05-14 12:38:57 +0200 | rdcdr | (~rdcdr@user/rdcdr) |
2024-05-14 12:38:30 +0200 | rdcdr | (~rdcdr@user/rdcdr) (Quit: ZNC 1.8.2+deb3.1 - https://znc.in) |
2024-05-14 12:32:11 +0200 | son0p | (~ff@186.121.14.247) |
2024-05-14 12:26:56 +0200 | ubert | (~Thunderbi@2a02:8109:ab8a:5a00:d77a:cc4d:acdd:ee1e) |
2024-05-14 12:24:40 +0200 | _bo | (~bo@198.red-83-56-252.dynamicip.rima-tde.net) (Ping timeout: 260 seconds) |
2024-05-14 12:22:13 +0200 | bo_ | (~bo@198.red-83-56-252.dynamicip.rima-tde.net) |
2024-05-14 12:15:08 +0200 | <probie> | I wouldn't mind such behaviour to allow elision of names in a system where all arguments are named arguments |
2024-05-14 12:14:15 +0200 | titibandit | (~titibandi@user/titibandit) |
2024-05-14 12:06:56 +0200 | yin | (~yin@user/zero) |
2024-05-14 12:06:07 +0200 | <cheater> | you're right, hold up, let me implement a parser and a type checker real quick |
2024-05-14 12:05:30 +0200 | yin | (~yin@user/zero) (Ping timeout: 268 seconds) |
2024-05-14 12:00:21 +0200 | <ski> | but i don't want to discourage you from pondering it, if you want to |
2024-05-14 11:59:55 +0200 | <ski> | like, if you can elaborate this in a workable fashion, i'd be interested in taking a look .. i'm just saying i'm not seeing how it could work, in a way i'd consider reasonable |
2024-05-14 11:58:04 +0200 | random-jellyfish | (~developer@user/random-jellyfish) (Ping timeout: 260 seconds) |
2024-05-14 11:56:18 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.1) |
2024-05-14 11:55:09 +0200 | <ncf> | the unordered arguments thing sounds like it would also be garbage wrt type inference |
2024-05-14 11:53:16 +0200 | <ski> | yes |
2024-05-14 11:52:52 +0200 | <ski> | anyway, using records (or labelled multi-arity functions, if available) is one workable approach. what OCaml does, labelled curried arguments, also works |
2024-05-14 11:52:40 +0200 | <lortabac> | if you swap two arguments by mistake and it's obvious enough, an IDE may suggest inverting them |
2024-05-14 11:52:01 +0200 | <lortabac> | I think it would be nice to have this feature as an IDE action, but not baked in the language |
2024-05-14 11:51:52 +0200 | <danse-nr3> | one can also have f (default'{ arg = type }) |
2024-05-14 11:51:26 +0200 | <danse-nr3> | dunno, i just use product types and that gives me 99% of the functionality |
2024-05-14 11:51:21 +0200 | <ski> | danse-nr3 : <https://en.wikipedia.org/wiki/Hanlon's_razor> |
2024-05-14 11:51:10 +0200 | <lortabac> | you can select a record field by type if there is no ambiguity |
2024-05-14 11:50:54 +0200 | <lortabac> | IIRC generic-lens does something similar to what cheater is proposing |
2024-05-14 11:50:45 +0200 | <ski> | danse-nr3 : yea, that's basically that one |
2024-05-14 11:50:23 +0200 | <ski> | perhaps i'd understand it better, cheater, if you made a simple prototype type checker (and maybe parser, if you wish) |
2024-05-14 11:49:59 +0200 | <danse-nr3> | i remember occam's as "the simplest explanation is also the most likely" ... but it is lost in the mists of time. Maybe that was misreferenced |
2024-05-14 11:49:14 +0200 | <ski> | "Don't attribute to malice, what can be adequately explained by ignorance/stupidity." |