2025/11/20

Newest at the top

2025-11-20 18:33:38 +0100 <fgarcia> i like it though. ghc can be better at figuring out the types than i am. over half the time i will add the inferences to my source
2025-11-20 18:30:40 +0100 <fgarcia> other times if i write multiple functions without signatures and am trying to figure out why the type checker is mad, adding signatures will help narrow down the exact line causing ghc's wrath
2025-11-20 18:28:53 +0100 <fgarcia> oh, there are times when i have a function and ghci gets confused with the typing. that is what mandates the signature to me. though i also have warnings i have been ignoring too hehe
2025-11-20 18:25:16 +0100 <mauke> MR doesn't apply to this code, though
2025-11-20 18:24:35 +0100 <mauke> that's still a thing
2025-11-20 18:24:31 +0100 <probie> sam113101: In most cases you don't _need_ to, but it's generally a good idea. However with the code you've posted, you should probably write one for `nextCollatz` (if that's what you're still looking at)
2025-11-20 18:24:19 +0100 <chromoblob> there was also "monomorphism restriction" thingy, or got it changed in new GHC versions?
2025-11-20 18:23:51 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection)
2025-11-20 18:23:45 +0100 <mauke> they also help the type checker produce better error messages when something goes wrong
2025-11-20 18:23:24 +0100 <mauke> but top-level type declarations can help the human reader (i.e. me) figure out what's going on
2025-11-20 18:23:01 +0100 <mauke> in most cases types can be inferred automatically
2025-11-20 18:22:45 +0100 <chromoblob> no, not absolutely, though it may help
2025-11-20 18:21:14 +0100poscat(~poscat@user/poscat) (Ping timeout: 256 seconds)
2025-11-20 18:19:40 +0100poscat0x04(~poscat@user/poscat) poscat
2025-11-20 18:19:10 +0100chele(~chele@user/chele) (Remote host closed the connection)
2025-11-20 18:18:11 +0100 <sam113101> do I absolutely need to write the types down?
2025-11-20 18:16:29 +0100 <fgarcia> for multiple lines, it can instead be 'main = do' with the lines under that
2025-11-20 18:15:59 +0100 <fgarcia> you can prefix the line with 'main = '
2025-11-20 18:14:24 +0100 <sam113101> thanks
2025-11-20 18:13:27 +0100 <geekosaur> compiled Haskell is like C or Java, everything must be in a function or be a declaration, and the stuff you want to actually run must be in a function named main
2025-11-20 18:12:55 +0100 <geekosaur> that last line is the problem
2025-11-20 18:12:26 +0100down200(~down200@shell.lug.mtu.edu) down200
2025-11-20 18:12:22 +0100 <geekosaur> not that I'll be able to hep you but I have to run; hopefully someone else is around, but they'll need to see that as well. The whole file, please.
2025-11-20 18:12:04 +0100 <sam113101> https://paste.tomsmeding.com/BaeblCYG
2025-11-20 18:11:43 +0100ChaiTRex(~ChaiTRex@user/chaitrex) ChaiTRex
2025-11-20 18:11:30 +0100tessier(~tessier@ec2-184-72-149-67.compute-1.amazonaws.com) tessier
2025-11-20 18:11:29 +0100Googulator84(~Googulato@2a01-036d-0106-0231-4475-80b4-5cdc-43d6.pool6.digikabel.hu)
2025-11-20 18:11:10 +0100Googulator84(~Googulato@2a01-036d-0106-0231-4475-80b4-5cdc-43d6.pool6.digikabel.hu) (Quit: Client closed)
2025-11-20 18:11:07 +0100tessier_(~tessier@ec2-184-72-149-67.compute-1.amazonaws.com) (Ping timeout: 264 seconds)
2025-11-20 18:11:07 +0100Xe(~Xe@perl/impostor/xe) (Ping timeout: 264 seconds)
2025-11-20 18:10:57 +0100synchromesh(~john@2406:5a00:2412:2c00:b060:d053:cb8a:93d5) (Read error: Connection reset by peer)
2025-11-20 18:10:55 +0100synchrom1(~john@2406:5a00:2412:2c00:394c:fa0b:5fac:c256) synchromesh
2025-11-20 18:10:54 +0100 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
2025-11-20 18:10:54 +0100 <geekosaur> @where paste
2025-11-20 18:10:51 +0100 <geekosaur> what do you have?
2025-11-20 18:10:43 +0100j1n37-(~j1n37@user/j1n37) (Read error: Connection reset by peer)
2025-11-20 18:10:34 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 272 seconds)
2025-11-20 18:10:31 +0100Pixi(~Pixi@user/pixi) (Ping timeout: 264 seconds)
2025-11-20 18:10:31 +0100Dhark8(~Shark8@c-174-56-102-109.hsd1.nm.comcast.net) (Ping timeout: 264 seconds)
2025-11-20 18:10:12 +0100j1n37(~j1n37@user/j1n37) j1n37
2025-11-20 18:10:11 +0100Xe_(~Xe@perl/impostor/xe) Xe
2025-11-20 18:10:05 +0100aditya_an1l(~aditya_an@user/aditya-an1l:63825) aditya_an1l
2025-11-20 18:10:05 +0100 <sam113101> what's that lol
2025-11-20 18:10:03 +0100 <sam113101> or top-level declaration expected.
2025-11-20 18:10:01 +0100 <sam113101> Parse error: module header, import declaration
2025-11-20 18:09:56 +0100divya(divya@140.238.251.170) divya
2025-11-20 18:09:45 +0100ystael(~ystael@user/ystael) ystael
2025-11-20 18:09:40 +0100 <sam113101> alright I'm stuck
2025-11-20 18:09:10 +0100divya(divya@140.238.251.170) (Ping timeout: 265 seconds)
2025-11-20 18:09:02 +0100shr\ke(~shrike@user/shrke:31298) shr\ke